Commit Graph

816 Commits (ad9ecefe65ce4ea7bcaf3bfe692ee2a3fc6b0b63)

Author SHA1 Message Date
Willem Melching ad9ecefe65
Switch panda to scons builder (#635)
* add scons builder

* cleanup 1

* remove building from python code

* add pedal build

* fixup flags

* add EON flag

* change github actions to scons

* fixup automated tests

* move flashing scripts

* fix indent

* remove version.mk

* fix not in git

* fix linker script filename

* untested pedal flashing scripts

* add release option

* better asserts

* swap condition

* enable usb and fix flash script

* usb flash is not supported

* use button to enable dfu mode

* no usb because misra

* remove sleep
2021-03-24 14:44:32 +01:00
Willem Melching d572c012cb
add safetyParam to health (#633)
* add safetyParam to health

* move copies together
2021-03-17 14:19:22 +01:00
Jason Young 9108b82fb0
VW MQB: Updated message and signal data, round 1 (#632)
* EPS_01 -> LH_EPS_03

* Bump openpilot commit ref

* made echo test more stable

* update python to 3.8.5

* Revert "Bump openpilot commit ref"

This reverts commit 75ec1a0c

* Bump openpilot commit ref

* Bump openpilot commit ref

* Update Dockerfile.panda

* fixed torque signal name

* Signal naming fix, round 2

* fix CI

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-14 16:24:53 -07:00
robbederks 0ae2be95a1
fix dos usb power mode (#628) 2021-02-22 16:12:48 +01:00
robbederks f2446c35d6
Move gmlan_alt to TIM12 to fix concurrency issue with IR PWM (#627)
* Moved gmlan_alt to TIM12

* forgot some stuff
2021-02-01 15:53:04 +01:00
Willem Melching 97cd401abf
fix pc detection, remove tools (#626) 2021-02-01 14:57:49 +01:00
George Hotz e035fa1d09
green led on 0xf7 (#619)
* green led on 0xf7

* add python interface

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
2021-01-05 14:51:58 +01:00
Andre Volmensky 72d6b6de69
Nissan Altima port (#612)
* Nissan Altima port

* Added bus check for Cruise Enabled message
2020-12-11 13:41:12 +01:00
robbederks 9f5f437c90
Fix C2 power draw (#614) 2020-12-03 14:32:10 +01:00
robbederks 6b869a6312
Don't turn off the phone power on C2s when changing USB mode (#611) 2020-11-10 11:26:02 +01:00
Adeeb Shihadeh 9fb584b20c
Hyundai: increase max torque (#602)
* increase max hyundai torque

* update test threshold
2020-10-01 12:03:23 -07:00
Robbe Derks 09997428f3 Fixed transceiver spelling 2020-09-28 16:19:09 +02:00
Adeeb Shihadeh 8b41ed3b81
Deprecate ESP (#592)
* remove unused wifi tests

* remove that one too

* no bootmode from ESP

* clean that up

* remove two more wifi tests

* remove boardesp and esptool

* esp_gps -> gps

* missed those

* remove esptool refs

* remove esp certs

* no more wifi

* that was old

* cleanup jenkins dockerfile

* fix linter

* remove more wifi refs

* clone panda jungle from github

* no copy

* always default esp to off
2020-08-26 15:37:50 -07:00
robbederks 5664a0e153
bootkick for dos (#595)
Co-authored-by: Tici <robbe@comma.ai>
2020-08-18 15:59:22 +02:00
robbederks 1515ec8bf5
Siren (#594)
* siren

* fix pedal

* update fault rate

Co-authored-by: Tici <robbe@comma.ai>
2020-08-17 15:04:01 +02:00
robbederks c3b02f3a74
Clock source driver (#580)
* Initial clock source implementation

* fix misra?

* Working now. Still need to fix board detection though

* Always stop pulse

* revert board detection bodge

Co-authored-by: Tici <robbe@comma.ai>
2020-08-17 13:02:41 +02:00
robbederks 1e60160a45
fix board detection for dos (#593) 2020-08-17 12:16:14 +02:00
Willem Melching ed0621137e Reserve Hyundai Community safety mode number 2020-08-10 11:58:06 +02:00
Andre Volmensky 3a8430b9d5
Updating X-Trail/Rogue gas_pressed threshold (#585) 2020-08-08 11:10:32 -07:00
martinl 32199b2e49
Replace pycrypto with pycryptodome (#581)
* replace pycrypto with pycryptodome

* replace all instances with pycryptodome
2020-08-05 12:58:43 -07:00
robbederks caf8670cff
Fix uno getting detected as dos (#578) 2020-07-29 14:36:23 +02:00
Andre Volmensky 4b576ab13d
Bugfix: Fix harness error when starting car (#572)
* Bugfix: Fix harness error when starting car

* fix misra violation

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-07-18 23:08:21 -07:00
Greg Hogan 390b8bce81
k-line 5 baud init (#565)
* k-line slow init

* k-line slow init LED bit blink

* fix misra violations

* better names for k-line methods

* debug prints match names

* switch to timer

* use TIM4 until I figure out TIM5

* tickle faster

* fix bit bug and add stop bit

* TIM5 working

* USB return after addr sent

* fix l-line reset

* fix misra violations

* blink for the ones instead of the zeros

* k-line 5 baud fault type

* lin check

* use TIM5 or wakeup

* better names
2020-07-10 14:18:24 -07:00
robbederks 2fab502cad
Increased pullup delay significantly to maybe improve board detection stability. 10 loops was only tens of ns. (#567) 2020-07-02 23:07:27 +02:00
robbederks 387fd681dd
USB enumeration detection fix (#566)
* testing

* Looks fixed now

* Cleanup
2020-07-02 00:23:12 +02:00
Greg Hogan 31f8a0d862
K line fix (#559)
* enable UART RX interrupts

* update debug prints for python3

* improve kline functions and fix checksum

* k-line wake-up conforming to KWP2000 fast init

* fix timing

* toggle k and l line together by default

* k-line wakeup using timer

* k and l were flipped

* fix misra compliance
2020-06-18 11:17:00 -07:00
Adeeb Shihadeh 1e6854eb8f
Fix GM ignition logic (#561) 2020-06-18 11:12:20 -07:00
Adeeb Shihadeh 5b14945140
Abstract RX checks for gas, brakes, and relay malfunction (#556)
* abstract gas, brake, and relay RX checks

* toyota

* mazda

* vw and subaru

* gm, honda, nissan

* chrysler

* rename

* revert that
2020-06-16 02:01:00 -07:00
Adeeb Shihadeh e13774ba8c remove unused TX msg for toyota safety 2020-06-15 20:06:56 -07:00
Adeeb Shihadeh abb229c9e7
Add gas signal for hyundai EV (#555) 2020-06-15 10:48:33 -07:00
Adeeb d0442fd1e4
add hyundai legacy safety mode (#554) 2020-06-12 18:03:31 -07:00
robbederks d6668fe4ef
Turn on fan if panda is enumerated but not receiving heartbeat (#553)
* fix linter

* Turn on fan if panda is enumerated but not receiving heartbeat

* Upped to 50%
2020-06-11 18:14:41 -07:00
martinl b2c86eb66b
Subaru safety refactoring (#532)
* Update subaru safety tx messages

* Add Subaru preglobal driver torque limits

* fix preglobal desired_torque

* fix subaru preglobal torque rate limit and tx messages

* readability update for desired_torque

* fix preglobal tests

* Subaru safety refactoring, added missing legacy checks and updated test

* Remove subaru_global check from tests

* Reorder legacy constants, remove subaru_init

* Update Subaru legacy safety and tests to match dbc scaling factors

* remove scaling factor from torque_driver

* Change preglobal driver torque scaling factor

* Change driver torque factor to 10

* Fix preglobal dbc name

* Fix Subaru legacy safety test

* update openpilot commit

* init valid with one line
2020-06-11 15:51:05 -07:00
Adeeb Shihadeh 76f347165f gate subaru legacy and vw pq safety modes behind debug flag 2020-06-11 15:31:57 -07:00
Adeeb 20eb68b179
Add pre-commit hooks (#551)
* add more pre-commit hooks

* revert misra coverage table

* fix coverage table exclusion
2020-06-03 15:08:57 -07:00
robbederks a38925a0a4
this fixes the fw on newer compilers. haven't figured out why it broke yet (#549) 2020-06-02 14:21:41 -07:00
Adeeb d7f7b14118
Enable almost all Flake8 checks (#548)
* fix W391

* E262

* E703

* W293

* some E

* E231

* some more E

* E225

* more E

* E252

* no tabs

* more tabs

* E701

* uds.py

* almost all of them

* only e265 left

* not sure why this is triggering on commented out code

* ignore esptool
2020-06-01 01:49:26 -07:00
Adeeb Shihadeh 49ffbe99f6 disable non-universal checks in hyundai safety 2020-05-31 12:08:02 -07:00
Andre Volmensky 098f47a5b4
Fix leaf brake rx check (#547) 2020-05-30 16:43:53 -07:00
Alice Knag 339976c3ca
document tx message addresses better (#543)
* document tx message addresses better

* comment out scc messages for now
2020-05-28 19:59:14 -07:00
Adeeb Shihadeh 9bece64e8f use mazda init 2020-05-28 13:20:46 -07:00
Adeeb Shihadeh 08db086d58 mazda cleanup 2020-05-28 13:15:04 -07:00
Jafar Al-Gharaibeh 89658d0bde
Mazda: safety tests add missing safety checks (#525)
* Mazda: add safety test

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Update mazda safety to capture more events

    * gas press
    * brake press
    * speed - lkas on/off

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Customize safety tests

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Add RX checks

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Format

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Set lkas enable speed at 52 kph

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Test case when speed<enable_lkas_speed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Be consistent with names in other places

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Add test case for lkas on when speed dips below lkas enable speed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Make sure lkas disabled

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Use car's speed signal instead of wheel speed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Allow acc cancel msg

  When gas is pressed OP disenages stock cruise doesn't get disengaged.
panda needs to know when OP engages again. OP re-enageges on cruise button
presses. This commit uses the same re-enage logic in panda.

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* rebase

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* allow acc_cancel in safety tests

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* rename variable, fix comment

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2020-05-28 13:09:54 -07:00
Andre Volmensky bdec1398e5
Fix length of 0x20b in NISSAN_TX_MSGS, wasn't cancelling ACC (#544) 2020-05-27 12:41:19 -07:00
Adeeb Shihadeh a5802cdd15 Hyundai: remove unused message from RX checks 2020-05-26 14:36:44 -07:00
Adeeb 9ebde2535c
Reset state on safety mode init (#542)
* reset state on safety mode init

* more global state

* reset message seen too

* misra
2020-05-26 14:23:39 -07:00
Adeeb d4f3f15c33
Refactor addr check (#541)
* refactor addr checks

* re-enable that

* Willem comment
2020-05-26 11:24:33 -07:00
Adeeb 0657064594
Hyundai checksum (#540)
* 3/5 hyundai checksums done

* cleanup

* these 3 should be universal across all hkg

* fix tests

* fix misra
2020-05-22 14:40:51 -07:00
Adeeb Shihadeh 0610ed1e25 Hyundai wheel speed counter is actually 4 bits spread over two signals 2020-05-17 22:40:51 -07:00
robbederks b2c720bf40
Dos (#533) 2020-05-14 21:05:42 -07:00