Commit Graph

2138 Commits

Author SHA1 Message Date
Adeeb Shihadeh
416981d1f7 CI: setup tres (#1322) 2023-04-01 19:28:54 -07:00
Adeeb Shihadeh
6a8ed7f147 CI: setup dos (#1321)
* CI: setup dos

* just build and flash for now

* fix new device setup
2023-04-01 18:52:32 -07:00
Shane Smiskol
8efbcf041c IsoTpMessage: return if consecutive frame last received (#1314)
* what about

* actually this is what we want

* more explicit about this condition

* frame type

* add enum

* use in func
2023-03-31 20:11:53 -07:00
Shane Smiskol
a12c0a7956 IsoTpMessage: don't skip a byte when sending consecutive frames to subaddress (#1320)
handle
2023-03-31 19:44:46 -07:00
Shane Smiskol
189f0436ba IsoTpMessage: check CAN frame length (#1315)
* Revert "Revert "IsoTpMessage: check CAN frame length (#1312)""

This reverts commit 09fee3e7ea.

* need to pad for the check to work

* pass rx_offset up from can client

* detect from internal can_client and just use it for the checks

* move

* revert this for another PR

* fix
2023-03-31 19:22:16 -07:00
Shane Smiskol
c92f8ecfde IsoTpMessage: fix rx_len sanity checks (#1319)
fix a bug
2023-03-31 19:17:16 -07:00
Adeeb Shihadeh
cb35309160 spi tx timeout print 2023-03-31 14:39:30 -07:00
Shane Smiskol
02eb84936b UdsClient: support sub addresses (#1317)
* UdsClient: support sub addresses

* Update python/uds.py

* Update python/uds.py
2023-03-31 13:59:02 -07:00
Shane Smiskol
09fee3e7ea Revert "IsoTpMessage: check CAN frame length (#1312)"
This reverts commit 9349337ebb.
2023-03-31 12:11:13 -07:00
Shane Smiskol
7933635b54 IsoTpMessage: rx_len sanity checks (#1311)
* add some more sanity checks for _isotp_rx_next

* another PR

* Update python/uds.py

* cannot be bigger than 0xfff
2023-03-30 23:23:42 -07:00
Shane Smiskol
23563cec7c IsoTpMessage: check not reserved frame (#1313)
* add some more sanity checks for _isotp_rx_next

* another PR

* rever

* can remove return

* add back the space here tho :(

* raise
2023-03-30 22:35:02 -07:00
Shane Smiskol
9349337ebb IsoTpMessage: check CAN frame length (#1312)
* add some more sanity checks for _isotp_rx_next

* another PR

* revert
2023-03-30 22:14:35 -07:00
Adeeb Shihadeh
12b9b65985 fake_siren: add fault on codec enable failure (#1308)
* fake_siren: add fault on codec enable failure

* little shorter

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-29 15:07:12 -07:00
Vivek Aithal
a1e1451d1c GM: Reduce steer down limit and increase driver allowance (#1281)
reduce steer down limit and increase driver allowance
2023-03-29 10:39:25 -07:00
Shane Smiskol
7392f24868 Honda tests: check endswith Base to skip test (#1305)
check endswith base
2023-03-28 00:05:35 -07:00
royjr
db6c50cd09 Honda Bosch Radarless longitudinal safety (#1008)
* civic22_long

use long flag

* maybe?

* Update safety_honda.h

* revert the 0x1c8 addition

* init radarless safety check

* correct accel parsing

* add test class (WIP)

* remove current_controls_allowed

* Fix ACC_HUD

* patch

* Add missing safety to test name

* Pass irrelevant test

* move comment

* remove unused comments

* add comment to TestHondaBoschRadarlessSafety

* Fix message overlap

The "exceptions for common msgs across different hondas" fix does not seem to be working. Created another exception for TestHondaBoschRadarless based on the HondaNidec exception above

* Fix base

* remove comment

* remove buttons from LONG TX

* make a base Radarless test class

* can't remove them, since safety doesn't check bosch

* test accel limits

* test accel limits

* we can do the clean up in another pr

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: sshane <shane@smiskol.com>
2023-03-27 23:10:25 -07:00
Igor Biletksyy
01ea26e342 prevent host from setting wrong returned flag 2023-03-27 10:38:04 -07:00
AlexandreSato
6cb3561f16 safety replay: update Honda steer value getter (#1292)
* safety replay: update Honda steer value getter 

I think now it´s right!

```
BO_ 228 STEERING_CONTROL: 5 EON
  SG_ STEER_TORQUE : 7|16@0- (1,0) [-4096|4096] "" EPS
```

* ops
2023-03-25 19:02:34 -07:00
Shane Smiskol
f29125f6ad DriverTorqueSteeringSafetyTest: remove useless function (#1275)
Update common.py
2023-03-22 21:57:18 -07:00
Adeeb Shihadeh
7aaca348c2 HITL tests: nose -> pytest (#1301)
* HITL tests: nose -> pytest

* run all

* add back partial tests

* big speed up

* fix skipping

* enable all

* that's expected

* clean up after ourselves

* jungle is fixture

* fix

---------

Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-03-22 21:38:37 -07:00
Adeeb Shihadeh
c5cd0a0232 Enable siren for multi-panda setups (#1300) 2023-03-21 18:49:58 -07:00
Adeeb Shihadeh
ba7d21805a ci: lower safety test timeout 2023-03-21 18:49:47 -07:00
Shane Smiskol
ba50c2ffee safety tests: fix for common longitudinal accel class (#1299)
* fix

* fix

* something that would catch this
2023-03-21 12:42:02 -07:00
Shane Smiskol
2136e2e45b safety tests: add common longitudinal accel class (#1298)
* add longitudinal safety test class

* rename to accel_cmd_msg

* line

* do hyundai

* set default min and max accel

* revert

* thanks pylint
2023-03-21 12:24:33 -07:00
Adeeb Shihadeh
d70fa4e120 tres: fix fan spin on startup (#1297)
* tres: fix fan spin on startup

* new init
2023-03-21 11:19:12 -07:00
Adeeb Shihadeh
f658ecdd75 ci: speedup safety tests 2023-03-18 20:35:59 -07:00
Shane Smiskol
e4cc97d882 Toyota: check SETME_X64 signal for LTA (#1296)
* check SETME_X64

* use itertools.product for better coverage

* fine
2023-03-16 22:56:25 -07:00
Shane Smiskol
c83d6894ef Toyota: base LTA safety (#1295)
* part 1 of clean up

* make it work and pass

* remove lta stuff

* remove commented lta tests

* more

* move test back to where it was

* rm line

* rename that

* fix that

* start to add LTA

* angle test

* fix tests and add base stock longitudinal class

* formatting

* clean that up

* convention

* add ALLOW_DEBUG
2023-03-16 22:32:56 -07:00
Shane Smiskol
7fdc66b957 Toyota: more modular safety tests (#1294)
* part 1 of clean up

* make it work and pass

* remove lta stuff

* remove commented lta tests

* more

* move test back to where it was

* rm line

* rename that

* fix that

* we always want to enforce LTA disallowed actually

* not sure if these are helpful

* endswith("Base")
2023-03-16 21:58:38 -07:00
Robbe Derks
c0aea3273a Tres: fan cooldown + no stall recovery (#1287)
* add fan cooldown

* refactor to be inside the fan driver

* fix rebase

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-16 14:15:43 +01:00
Robbe Derks
56fae8a283 pin SCons to fix safety tests 2023-03-16 11:24:57 +01:00
AlexandreSato
6585cae978 safety replay: update steer value getter (#1273)
* toyota torque on toyota for safety replay

* Honda torque on Honda for safety replay

* Chrysler torque on Chrysler for safety replay

* Subaru torque on Subaru for safety replay

* fix

* Honda is Big Endian!

* Update helpers.py

* we already do this every where

* Update tests/safety_replay/helpers.py

* Update tests/safety_replay/helpers.py

* Update tests/safety_replay/helpers.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-03-15 21:19:05 -07:00
Adeeb Shihadeh
09ad59489e tres: adjust siren volume (#1290)
Co-authored-by: Comma Device <device@comma.ai>
2023-03-14 21:48:42 -07:00
Igor Biletskyy
75792fb255 Fix different ADC scales (#1288)
* different ADC scales

* add HITL

* we had it, remove
2023-03-14 14:49:39 -07:00
Vincent Wright
0afee2e0ff Raise max steer limits for Ram DT (#1284)
* Raise max steer limits for Ram DT

* Update test_chrysler.py

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-03-13 17:24:02 -07:00
martinl
f674084db5 MacOS: use gcc-12 for building tests (#1241)
* MacOS: use gcc-12 for building tests

* Update README.md

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-03-13 16:21:43 -07:00
Jason Young
3a5bbc6f20 VW PQ: Corrected message name for ACC_GRA_Anzeige (#1286) 2023-03-13 13:36:41 -07:00
Adeeb Shihadeh
b231281c8b python: check SPI response length (#1280)
* python: check SPI response length

* fix read bytes

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-07 20:12:23 -08:00
Adeeb Shihadeh
79210e8c2b faster timeout for initial connect 2023-03-07 15:18:11 -08:00
Adeeb Shihadeh
2de7140117 SPI support in bootstub (#1227)
* always build spi

* no dos for now

* spi gpio init

* detect bootstub

* cleanup

* revert that

* move fx stuff

* fix linter

* set erase timeout

* fix types

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-07 14:55:15 -08:00
Adeeb Shihadeh
deaad254d9 python: non-zero default timeout (#1279)
* non-zero default timeout

* respect timeout in spi
2023-03-07 14:44:10 -08:00
Adeeb Shihadeh
df7952ec13 python: add helper to check if up to date (#1269)
* python: add helper to check if up to date

* current

* handle is always basehandle

* update that

* Update __init__.py

---------

Co-authored-by: Bruce Wayne <batman@workstation-production.internal>
2023-03-07 13:47:55 -08:00
Adeeb Shihadeh
544cf2ba82 bootstub: add hw type endpoint (#1278) 2023-03-06 22:26:56 -08:00
Adeeb Shihadeh
efb36197bb PandaDFU: SPI support (#1270)
* PandaDFU: SPI support

* get mcu type

* program bootstub

* little cleanup

* more cleanup

* connect by dfu serial

* time to remove that

* none

* fix linter

* little more

* catch

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-06 21:52:08 -08:00
Adeeb Shihadeh
18230831f3 PandaDFU: abstract out USB comms (#1274)
* wip

* revert that

* split list + connect

* some more

* mypy fix

* add clear status back

* rename

* cleanup

* cleaner mypy fix

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-06 09:24:00 -08:00
Adeeb Shihadeh
946f952aa7 DFU HITL tests (#1276)
* DFU HITL tests

* fix + types

* fix

* clear first
2023-03-05 20:19:27 -08:00
Shane Smiskol
e0e754de2c safety replay: make Ford work (#1272)
* make replay work for ford

* revert debugging stuff

* clean that up
2023-03-03 20:48:04 -08:00
Shane Smiskol
f7ba061279 Ford: test quality flags (#1266)
* adeeb

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

* check checksum

* think pylint won't like this

* complete test

* do this

* no need

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-03-01 19:17:40 -08:00
Shane Smiskol
cb0cbf10d7 Ford: set quality flags, checksum in safety tests (#1265)
set quality flags, checksum
2023-02-24 23:03:21 -08:00
Shane Smiskol
8bb62cf226 Ford: check quality flag (#1264)
* quality flag support

* add NULL to other safety modes

* add to safety helpers debug print

* comment

* rename to quality_flag and add comment
2023-02-24 22:54:51 -08:00