Commit Graph

2990 Commits

Author SHA1 Message Date
Adeeb Shihadeh
abaa9f8968 always build all projects + test libs (#1038)
* always build all projects

* and tests

* fix that
2022-08-19 11:41:34 -07:00
Adeeb Shihadeh
d3e2477231 python lib: disable checks on reconnect 2022-08-18 22:01:12 -07:00
Igor Biletskyy
36b317185c cleanup heartbeat threads from scripts and test_canfd (#1036)
* clean

* remove disable
2022-08-18 10:56:42 -07:00
Adeeb Shihadeh
7e843b370d allow disabling heartbeat while in non-car safety mode (#1035)
* allow disabling heartbeat while in non-car safety mode

* simple test

* clean that up

* remove that
2022-08-17 22:42:18 -07:00
Robbe Derks
ba8772123f Simple integrating fan controller (#1022)
* fast rpm measurement

* fix indentation

* this seems stable

* clip fan integral

* fix misra

* add fan power to health

* board-specific max rpm

* refactor fan enable

* cleanup

* stall detection and reset

Co-authored-by: Comma Device <device@comma.ai>
2022-08-17 20:43:49 -07:00
Adeeb Shihadeh
c7c33219ed delete copy and pasted heartbeat thread 2022-08-17 16:43:22 -07:00
Igor Biletksyy
e42402bc40 examples: query_fw_versions.py forgot import 2022-08-17 16:10:37 -07:00
Igor Biletksyy
600be16459 examples: fix query_fw_versions.py heartbeat 2022-08-17 15:55:49 -07:00
Jason Young
4412eeaf1a VW MQB: Cleanup message counter handling (#1034) 2022-08-15 20:49:06 -07:00
Igor Biletskyy
ba90f6a8c9 CI tests: check app against known good bootstub first (#1033)
* test

* add master bootstub
2022-08-15 20:11:49 -07:00
Igor Biletskyy
54eb42d903 one flash.sh for both H7 and F4 (#1032)
* flash one

* edit readme
2022-08-15 20:11:38 -07:00
Jason Young
199bc10db3 VW PQ: Longitudinal control safety, lateral torque update (#989)
* VW PQ: Updated checksum and counter handling

* first pass PQ long control safety

* refactor stock test to prep for long test

* long control tests

* falling edge enable logic and tests

* accidentally worked but this is better

* test misra/cppcheck evaluation of debug build

* Revert "test misra/cppcheck evaluation of debug build"

This reverts commit 7594fc5e2f.

* allow use of manufacturer ramp-up rate

* soften wheel-touch threshold

* fix tests

* check/test ACC main switch state

* fix CRC for Motor_5

* derp

* retry CI

* try that again

* fuuuu

* fix Motor_5 checksum validation

* use existing acc_main_on global

* re-pin opendbc

* no need for resume spam in longitudinal mode

* concise

* consistency cleanup

* comment and whitespace cleanup

* more cleanup

* more

* restore driver torque threshold

* add long control replay route

* obsolete comment

* proper flag name

* wild to mild-ish

* bump openpilot ref

* Update test_safety_replay.py

* handle non existent routes

* comment consistency/polish

* flip comparison order for falling edge clarity

* restore refs

* read the diff next time, speedy

* srsly

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-08-12 18:50:00 -07:00
Jason Shuler
5e0dde7b48 GM: Add support for cam harness & stock ACC (#962)
* Allow brake TX on PT bus

* Initial Panda GM cam harness support
 * Complete rewrite / simplification
 * Add param for cam harness (default is OBD2)
   - Forward btw 0 and 2
   - Filter LKAS and optionally ACC from cam
 * Add param for stock ACC
   - Allows ACC on PT bus when set, not otherwise
   - Allows ACC from cam when set, not otherwise
 * Add temporary WIP EPS timing workaround in ifdef

* Remove keepalive; regen == braking

* Fix MISRA violations

* EPS timing opt-in by param

* Minor clean up

* remove timing code for readability

fix and formatting

* we only need to send one message if cam harness and stock long

* Simplify params

* Removed dup brake msg

* revised params, split 3-ways

* add test

* clean up a bit, no need to send ACC yet

like this

* split out button enable and pcm enable into seperate tests

* some formatting

some formatting

* GM CAM uses PCM cruise for controls_allowed

* fix gas safety tests

* misra

* fix static analysis

comment

* fix brake pressed

* Add OP VOACC override stock cam

* Add VOACC safetyparam to init.py

* Revert "Add VOACC safetyparam to init.py"

This reverts commit 2e46f8746f.

* Revert "Add OP VOACC override stock cam"

This reverts commit a4b096cc1e.

* better comments

* better comments

better comments

fix

* move non-base msg definitions to subclass

* various comments

* TODO: add button safety

* add button safety

* use new pcm_cruise_check

* revert regen braking change

* only cancel button allowed

* Apply suggestions from code review

* Update board/safety/safety_gm.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* fix suggestion

* Fix tests

* Revert "Fix tests"

This reverts commit 500577921f.

* this is a much simpler fix, do full fix in another PR

* tx button safety

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-08-12 15:56:39 -07:00
Robbe Derks
508ee90f8e Only allow deep sleep if there's been ignition before (#1019)
* add another gate for deepsleep

* Minimum uptime for deep sleep (#1020)

add minimum uptime before going back to deepsleep
2022-08-12 12:43:36 +02:00
Shane Smiskol
acff2c8ec8 safety: common cruise checks (#1025)
* add function for common controls allowed setter (PCM cruise)

* Use new function when possible

fix

* consistent variable types
2022-08-12 00:28:08 -07:00
Adeeb Shihadeh
06592b5c0e Hyundai: rename HDA2 platform to CANFD (#1027)
* Hyundai: rename HDA2 platform to CANFD

* one more
2022-08-11 22:06:54 -07:00
Adeeb Shihadeh
486af79503 Chrysler: add Ram HD support (#1010)
* ram hd safety

* bump opendbc

* dt prefix

* remove that
2022-08-11 14:41:46 -07:00
Adeeb Shihadeh
3598e8105b safety: abstract motor torque limit checks (#1018)
* abstract out motor torque steering safety

* safety: abstract motor torque limit checks

* fix comment
2022-08-09 21:05:36 -07:00
Adeeb Shihadeh
291d9e3eb9 safety: refactor steering safety checks (#1013)
* start with vw

* hyundai

* rest of driver torque cars

* remove hyundai for now

* fix cppcheck crash

* set committer

* revert gm

* remove those
2022-08-09 19:53:15 -07:00
Adeeb Shihadeh
294792c1b5 misra: support rules text if exists (#1017) 2022-08-09 14:56:21 -07:00
Adeeb Shihadeh
995aed6550 make misra tests easy to run locally (#1016)
* make misra tests easy to run locally

* auto install

* fix copy

* test the test

* Revert "test the test"

This reverts commit 418abfc728.
2022-08-09 14:23:12 -07:00
Adeeb Shihadeh
e30f7e8fc7 Chrysler: cleanup + prep for Ram HD (#1012)
* Chrysler: cleanup + prep for Ram HD

* prefix with chrysler
2022-08-08 21:16:28 -07:00
Adeeb Shihadeh
b27e1476a7 CI: update docker login 2022-08-03 21:17:47 -07:00
Robbe Derks
d24971ef8a Communication refactor (#997)
* cleanup is_enumerated, rename comms and init spi

* big comms refactor, building now

* misra fixes

* more fixes

* misra try 3

* cleanup

* this belongs in a separate PR

* remove unneccesary file

* revert llspi changes

* this needs packing

* fix pedal usb

Co-authored-by: Comma Device <device@comma.ai>
2022-08-03 13:11:52 +02:00
Jason Wen
89989abca5 Hyundai: support camera-based SCC cars (#965)
* Hyundai: Car Port for 2022 Kona Electric Camera SCC

* add missing flag

* set camera_scc in other safety modes

* Add safety test

* this will be a stock longitudinal port for now

* common cruise check

make this check common

* Fix comment typo

* Camera SCC HKG send CLU11 on bus 2

* Update CLU11 comment

* fix button test when txing

* just add bus 2 to existing addr checks

* actually no, this will never be on bus 2

* CLU11 is always on bus 0

line

* consistent param ordering

* fix test

fix test

* this is fine

* Mistook SCC for CLU, fix

* try to make this a little more clear

* add comment

* fix that

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-08-03 00:54:41 -07:00
Adeeb Shihadeh
7f6ef7cd00 fix flashing H7 in bootstub + tests (#1007)
Co-authored-by: Bruce Wayne <batman@comma.ai>
2022-08-02 22:28:54 -07:00
Robbe Derks
6bdf249d03 Dynamic sector erase (#1006)
* dynamic sector erase

* fix red panda flash

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-08-02 21:58:56 -07:00
Adeeb Shihadeh
fe3ad834c6 improved HITL test reliability (#897)
* improved HITL test reliability

* little more

* revert that

* little speedup

* some speed up

Co-authored-by: Bruce Wayne <batman@comma.ai>
2022-08-02 17:05:47 -07:00
Adeeb Shihadeh
8b26ce940f rename deepsleep_requested -> deepsleep_allowed 2022-08-01 17:25:48 -07:00
Adeeb Shihadeh
4b86b83991 Subaru: support Outback and Global Gen 2 (#991)
* Subaru: support Outback and Global Gen 2

* send 0x321

* check bus

* fwd that

* gen2 limits

* lower max steer

* update safety replay route
2022-07-29 20:44:41 -07:00
Igor Biletskyy
e9ba54b09b body: allow flasher with no controls_allowed (#1002)
* add flasher check, revert len

* MISRA 10.4

* Update safety_body.h
2022-07-26 22:34:34 -07:00
Igor Biletskyy
74408d64f1 body safety: add addresses to enter can flasher (#1000)
* was bad idea to check length

* msg len?

* comment
2022-07-25 20:24:44 -07:00
Igor Biletskyy
4c433e6d47 CAN flasher: add timeout to CanHandle on transmit (#1001)
add timeout to canhandle
2022-07-25 20:23:16 -07:00
Cameron Clough
3a17c2e07f Ford: add safety code for LCA vehicles (#966)
* Ford: add CAN messages and signal definitions

* Ford: implement safety hooks

* Ford: add safety unit tests

* Use standstill signal

* Rename bus

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Simplify brake pressed

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Ford LKAS msg helper

* Simplify button violation check

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Simplify LKAS action check

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Tidy up tests

* Use standstill signal for tests

* Misra fix

* Unused definition

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Simplify signal bit shifting

* Remove type hints

* Add panda safety type hints

* Fix vehicle moving signal

* Fix button checks

* Fix steer allowed tests

* Fix standstill threshold in tests

* Maybe this works?

* More button tests

* Revert "Simplify button violation check"

This reverts commit c649626984.

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-07-23 16:54:58 -07:00
Igor Biletskyy
4b1d7d0215 body: add tx checks for knee (#996)
* add more tx checks

* remove junk

* ...

* wrong flasher address
2022-07-22 22:57:20 -07:00
Adeeb Shihadeh
a1686ca3ca safety tests: use can packer for counters (#995)
* safety tests: use can packer for counters

* bump opendbc
2022-07-21 18:50:42 -07:00
Adeeb Shihadeh
1dfee5973b Subaru: cleanup counter handling (#992) 2022-07-19 17:18:42 -07:00
Adeeb Shihadeh
f02b43191f Subaru: split legacy safety into its own file (#990) 2022-07-19 15:53:08 -07:00
dependabot[bot]
caf350b62b Bump numpy from 1.21.0 to 1.22.0 (#975)
* Bump numpy from 1.21.0 to 1.22.0

Bumps [numpy](https://github.com/numpy/numpy) from 1.21.0 to 1.22.0.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst)
- [Commits](https://github.com/numpy/numpy/compare/v1.21.0...v1.22.0)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update requirements.txt

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-07-15 10:50:40 -07:00
Jason Young
4ce5b5a44d VW PQ: Updated safety test checksum and counter handling (#964)
* VW PQ: Updated checksum and counter handling

* bump opendbc for Docker/CI
2022-07-15 10:49:34 -07:00
Adeeb Shihadeh
e51aa5ebce safety: fix race condition in engagement heartbeat (#988)
* safety: fix race condition in engagement heartbeat

* move that

* fix  that
2022-07-13 14:20:00 -07:00
Adeeb Shihadeh
2abeab913f EV6: reject fake cruise engagements (#987)
* EV6: reject fake cruise engagements

* bump opendbc

* update comment

* raise to 8

* add addr check
2022-07-12 17:42:13 -07:00
Adeeb Shihadeh
baecd2ecc6 Chrysler: increase Ram rate limits (#981) 2022-07-11 15:01:35 -07:00
Adeeb Shihadeh
ca927fe931 EV6: allow TX of 0x2a4 (#983)
* EV6: allow TX of 0x2a4

* don't fwd
2022-07-08 22:08:54 -07:00
Adeeb Shihadeh
53466f0934 Chrysler: allow resume button (#980) 2022-07-06 23:43:56 -07:00
Adeeb Shihadeh
fae3ee2e81 Chrysler: Ram 1500 support (#969)
* RamInit

* Some fixes

* ram param

* cleanup steering

* invert

* couple fixups

* tests pass

* check that

* misra fixes

* same limits

* revert that

* remove those

Co-authored-by: Jonathan <jraycec@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-07-06 22:50:29 -07:00
Adeeb Shihadeh
6c0d0b43c2 Chrysler: update tests after DBC updates (#979)
* Chrysler: update tests after DBC updates

* lil cleanup
2022-07-05 16:33:12 -07:00
David Cole
64f20ffb5b Correct SAFETY.md link in panda README.md (#977)
Correct SAFETY.md link
2022-07-02 16:17:45 -07:00
Adeeb Shihadeh
2652453892 EV6: adjust steering thresholds (#972)
* EV6: match max torque of rest of Hyundais

* update tests

* adjust that

* Apply suggestions from code review

* Update test_hyundai_hda2.py
2022-06-23 13:41:22 -07:00
Shane Smiskol
4bc85ad40a Chrysler: use correct engaged bit (#973)
* use new engaged bit

* fix msg name

* update signal

* update opendbc ref
2022-06-22 14:46:25 -07:00