Commit Graph

2013 Commits

Author SHA1 Message Date
Adeeb Shihadeh
80dac4cd94 cleanup CAN definitions (#1170) 2022-11-29 15:56:43 -08:00
Shane Smiskol
702e5281d8 remove unused scons argument (#1169)
* clean

* also here
2022-11-29 01:28:46 -08:00
Shane Smiskol
8accca13ad VW: explicitly test for inactive accel (#1167)
* explicitely test for inactive accel

* fix the safety

* and catch the mistake

* revert
2022-11-28 22:37:59 -08:00
Shane Smiskol
ba6b3710db GM: use common steering safety test (#1166)
gm is the last
2022-11-28 22:30:23 -08:00
Robbe Derks
360f8e63df reconnecting debug console 2022-11-24 16:09:39 +01:00
Jason Young
e4c4253964 VW MQB: Redundant brake pressed signals (#1137)
* VW MQB: Redundant brake pressed signals

* bump timer for safety tests in CI

* use nicer f-string syntax

* don't need that
2022-11-22 14:27:52 -08:00
Adeeb Shihadeh
c075050d5d Revert "F4: cleanup clock source (#1160)"
This reverts commit f0f67ccf85.
2022-11-21 20:31:01 -08:00
Adeeb Shihadeh
2e90b6f308 cleanup python lib imports 2022-11-21 16:59:21 -08:00
Adeeb Shihadeh
15a945d303 tres: IR LEDs (#1163) 2022-11-17 21:23:35 -08:00
Adeeb Shihadeh
ae66bbcaa8 tres fan (#1162)
* fan on

* little cleanup

* move to main
2022-11-17 21:02:37 -08:00
Adeeb Shihadeh
e5e34b16f5 som debug script 2022-11-17 17:06:28 -08:00
Adeeb Shihadeh
3df9099660 Misc cleanup (#1161)
* unused python stuff

* green led

* docs cleanup

* little more
2022-11-17 11:46:43 -08:00
Robbe Derks
5aa5f855e4 setup UART for SOM debugging (#1151)
* cleanup external debug serial

* wip: bring up uart7

* more wip

* this does something

* this works

* increase fifo size

* fix misra

* cleanup

* fix misra again

* add SOM debug enum

* reduce SOM buffer on F4

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-11-17 17:59:11 +01:00
Adeeb Shihadeh
f0f67ccf85 F4: cleanup clock source (#1160)
* F4: cleanup clock source

* little more

* void
2022-11-17 07:49:26 -08:00
hoomoose
5dc5cd8e20 Hyundai: longitudinal support for all CAN-FD EV + Hybrid (#1128)
* Update safety_hyundai_canfd.h

* Update safety_hyundai_canfd.h

* Update safety_hyundai_canfd.h

* cleanup

* add test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-11-15 14:48:45 -08:00
Adeeb Shihadeh
e7131fcee0 H7 SPI comms (#1158)
* getting health packets

* start cleanup

* pull state machine out

* cleanup
2022-11-14 13:52:52 -08:00
Robbe Derks
9db0ae7056 Remove external debug UART support (#1159)
cleanup external debug serial
2022-11-14 11:46:04 +01:00
Adeeb Shihadeh
c75c276301 add has_spi board property (#1153)
* always spi for h7

* disable for now
2022-11-13 19:57:20 -08:00
Shane Smiskol
c0632cd32b GM: enable on rising edge of resume (#1157)
* rising edge of resume

* fix test

* comment

* todo fix tests

* fix test

* we want to test the transition from btn prev to btn cur, not unpressed to x to y

* range
2022-11-13 19:10:45 -08:00
Shane Smiskol
0096d0c4fc GM: handle run-away set speed (#1156)
* Revert "GM: enable on rising edge of resume (#1155)"

This reverts commit 5aa33e1b2f.

* allow set/resume to any other button (except cancel)

* explicit test

* This is a test of both PRs combined

* Revert "This is a test of both PRs combined"

This reverts commit c7fdc3b00c12da64763c371f8cf017faa0273b1d.

* fix test
2022-11-12 01:55:41 -08:00
Shane Smiskol
ff48ecc34e Revert "GM: enable on rising edge of resume (#1155)"
This reverts commit 5aa33e1b2f.
2022-11-12 01:47:13 -08:00
Shane Smiskol
5aa33e1b2f GM: enable on rising edge of resume (#1155)
* rising edge of resume

* fix test

* comment
2022-11-12 00:01:15 -08:00
Igor Biletskyy
cc3b7d9470 H7: add comments on buses clocks (#1154)
comment
2022-11-11 15:30:37 -08:00
Shane Smiskol
d573111268 Hyundai: fix button enable controls mismatch (#1152)
* fix hyundai long button controls mismatch

* test

* comment
2022-11-11 14:43:35 -08:00
Adeeb Shihadeh
966f7e0539 SPI: fixes + fake bulk transfers (#1150)
* check spi checkusm

* ugh, fix control handler

* fake bulk xfer

* cleanup

* one more

* unused

* fix linter

* some typing

Co-authored-by: Comma Device <device@comma.ai>
2022-11-10 21:34:43 -08:00
Igor Biletskyy
a9e0357883 H7: enable USB LDO and fix RGB LED gpios (#1148)
* enable USB LDO

* open drain for RGB LED gpios

* naming

* comment
2022-11-10 19:29:44 -08:00
Igor Biletskyy
eae58b378b F4 CAN: fix SCE IRQ double fire (#1149)
fix
2022-11-10 19:29:22 -08:00
Shane Smiskol
72fd7775ab safety replay: fix gm segments (#1147)
get torque on gm for safety replay
2022-11-10 17:14:32 -08:00
Robbe Derks
d574f4aebc STM32F4: SPI communications (#998)
* 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

* llspi misra fix

* enable SPI on F4 and setup gpio

* duh

* wip: spi comms

* more spi wip

* dynamic sector erasing

* Revert "dynamic sector erasing"

This reverts commit fce1215a2ede45e5e2a0e97ca23a86c1d8bfa94a.

* more sectors to be erased

* debugging

* woah, this works

* cleanup on the panda side

* add sync and checksum checks, and fix recovery on errors

* this seems relatively stable

* add retrying

* this is stabler

* some endianness and endpoint fixes

* builds

* revert that

* add that back

* checksum start

* start splitting up driver

* spi behind flag

* cleanup test

* bump up timeout

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-11-09 18:46:20 -08:00
Shane Smiskol
281eb7731b GM Camera: use ECM brake pressed bit (#1138)
* GM camera: use ECM brake pressed bit

* back to ECMEngineStatus

* length 8

* common gmcamera class

* move to longitudinal base

* Revert "move to longitudinal base"

This reverts commit 67abe4c86b0e5e00432ab0ab80a8db6061f3cc3e.

* fix
2022-11-08 20:17:02 -08:00
Shane Smiskol
8f7befa9bb GM: clean up safety classes (#1143)
* add PCM_CRUISE flag to GM safety tests (like safety code)

* pcm_status_msg

* rm 2
2022-11-08 19:50:11 -08:00
Shane Smiskol
a01513d970 safety replay: fix hyundai segments (#1140)
* fix hyundai safety replay

* clean up
2022-11-08 13:37:02 -08:00
Jason Wen
1ccdff90c5 HKG CAN-FD: support radar ACC cars (#1134)
* HKG: Car Port for Genesis GV70 2023

* Revert "HKG: Car Port for Genesis GV70 2023"

This reverts commit 01bfda6dff4d8d2de4fd9b485b3f352e3e038000.

* 0x1a0 rx check

* Wrong one oops

* Check 0x1a0 based on param

* no need

* getting a bit messy, clean up soon!

* clean up

* clean up

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-11-07 22:44:13 -08:00
Shane Smiskol
ca681ff829 Hyundai: CAMERA_SCC works on both safety modes (#1139)
* Make camera SCC work on both safety modes

* update in safety

* move to common
2022-11-07 22:13:17 -08:00
Jason Wen
f3fc343262 Hyundai CAN-FD: support for ICE cars (#1031)
* Hyundai: Car Port for Santa Cruz 2022

New struct and params for CAN-FD ICE models

fixup! New struct and params for CAN-FD ICE models

* Longitudinal Control: ICE CAN-FD models

* fixup! Longitudinal Control: ICE CAN-FD models

* fixup! Longitudinal Control: ICE CAN-FD models

* fixup! Longitudinal Control: ICE CAN-FD models

* fixup! Longitudinal Control: ICE CAN-FD models

* Gate radar disable behind HDA2 only

* Remove unnecessary HDA2 checks

* Fix MISRA violation

* not needed, in HYUNDAI_CANFD_HDA2_LONG_TX_MSGS

* revert longitudinal changes

* fix addr check logic, clean up

* revert more long stuff

* fix addr check

* temp

* tests

* work?

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-11-04 16:43:33 -07:00
Shane Smiskol
34cfc43b40 Hyundai CAN-FD: more complete tests (#1133)
* more complete tests

* use parameterized_class

* make clear this only tests EV right now

* fix python linter

* rename reference

* clean up and fix python linter again
2022-11-04 15:34:16 -07:00
Adeeb Shihadeh
0b86dfa5fb python lib: only import spidev as necessary 2022-11-04 11:35:40 -07:00
Shane Smiskol
c8d108e2b8 Hyundai CAN-FD long: fix brake address check (#1132)
* we don't check 0x65 any more

* fix

* that too
2022-11-04 00:54:54 -07:00
Adeeb Shihadeh
a42b104c35 SPI handle in python lib (#1131)
* SPI handle in python lib

* add spidev

* unify those

* clean up connect

* clean that up

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
2022-11-03 22:18:12 -07:00
Adeeb Shihadeh
2e0cba00c2 bump timeout for full HITL tests 2022-11-03 20:50:42 -07:00
Adeeb Shihadeh
b3e9292922 HITL test fixups (#1117)
* automated -> hitl

* simplify

* jenkinsfile cleanup

* cleanup

* fix new linter errors

* fix ws cleanup

* some retry

* more cleaning up after ourselves

* unpin scons

* bump opendbc

* fix quotes

* enable flaky

* debug print

Co-authored-by: Bruce Wayne <batman@comma.ai>
2022-11-03 17:24:28 -07:00
Adeeb Shihadeh
49e2034098 tres (#1130)
* tres

* pull out chiplet

* add to python lib
2022-11-03 16:34:18 -07:00
Adeeb Shihadeh
bfce4c72f0 Hyundai: update tests with new DBC names (#1129)
* Hyundai: update tests with new DBC names

* fixed
2022-11-03 14:36:09 -07:00
Shane Smiskol
73a4099efb safety replay: fix setting desired torque (#1127)
* .

* Update tests/safety_replay/helpers.py
2022-11-03 00:23:42 -07:00
Igor Biletskyy
9147cba1af F4: more RAM (#1126)
* F4 more ram

* more flash
2022-11-02 16:57:14 -07:00
Igor Biletskyy
f7c74e08c6 bugfix: D2 SRAM clocks and CRun CPU state (#1125)
D2 SRAM clocks
2022-11-02 14:28:23 -07:00
Jason Young
0ca6d9d924 VW MQB: Longitudinal safety (#920)
* VW MQB: Longitudinal safety

* disregard ACC_13 for now

* abstraction cleanup

* fix long control flag name

* quick hack

* VW MQB: Cleanup message counter handling

* various cleanup

* try without ACC_04

* follow DBC updates

* bump Docker opendbc ref

* additional main switch and cancel handling/testing

* pacify linter

* style

* handle the overlap tests like HKG CANFD

* update replay route

* commonize elements between MQB and PQ

* Apply suggestions from code review

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

* proper use of globals/conventions

* make these global

* this is better for now

* better comment on accel boundary scaling

* spelling error

* reset on init

* try bumping openpilot

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-11-01 08:13:58 -07:00
Jason Shuler
cf4aa6bb30 GM: longitudinal support for camera-integrated cars (#1014)
* 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

* openpilot long safety

* do this in another PR

* add back

* add safety tests

* rename

* struct for safety

* not used

* temporary fault fix

* adjust max gas

* allow PSCMStatus in long mode

* stash

* fix max gas

* fix and clean up tests

* clean up longitudinal tests into a common class

* fix pylint

* subclass

* clean that up

* rm

* blocking

* comment

* comment

* lower case

* brake bus

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-11-01 00:58:18 -07:00
Shane Smiskol
997e328074 Nissan: check two wheel speeds for standstill (#1124)
* safety

* use already parsed wheel speed
2022-10-31 19:40:44 -07:00
Shane Smiskol
494c5a403a GM Cam: pass on useless tests (#1122)
* pass

* Caps
2022-10-27 21:23:36 -07:00