Commit Graph

265 Commits

Author SHA1 Message Date
Adeeb Shihadeh
038d34aa7f tizi: affine IRQ by action instead of number (#27811)
* tizi: affine IRQ by action instead of number

* do camera irqs

* debug script

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-04-05 16:35:27 -07:00
Jason Wen
f9c112e9b8 Hyundai: add Sonata FW version to enable radar tracks (#27463) 2023-03-20 13:31:50 -07:00
Robbe Derks
d26d8b3ba9 Improve OX frame timing jitter (#27582)
* frame timing script

* enable vsync output and improve fsin tracking

* increase measurement time

* fix python linting

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-16 10:59:27 +01:00
Shane Smiskol
7f10c736ab test_fw_query_on_routes.py: don't print FW for logging 2023-03-01 15:57:11 -08:00
Shane Smiskol
48b059d367 CAN fingerprint script improvements (#27355)
* match online logic

* 0 and 2 are different buses. on gm, same address has different lengths

* match fingerprint_from_route
2023-02-15 15:59:23 -08:00
Jason Wen
b740bdc99c Hyundai: Enable radar tracks for Santa Fe 2019 (#27175) 2023-02-01 13:01:26 -08:00
Shane Smiskol
7090a88419 Fix fuzz_fw_fingerprint.py script 2023-01-24 00:04:56 -08:00
Jason Young
f6dc12a735 VW MQB: Add diagnostic firewall note to config tool (#26975) 2023-01-15 13:13:50 -08:00
Shane Smiskol
406d12b7c1 Fix car docs diff bot (#26955)
fix
2023-01-13 17:20:45 -08:00
Shane Smiskol
b00bc4f57e Car interface: require fingerprint and FW versions to get params (#26932)
* require fingerprint and FW versions

* add get_non_essential_params()

* comment

* all required

* classmethod, need to allow subclasses to override _get_params

* fix that

* fix

* fix

* wrong fix 🤦
2023-01-12 12:25:24 -08:00
Adeeb Shihadeh
f14deae475 Revert "Car interface: require fingerprint and FW versions to get params (#26766)"
This reverts commit b68dabb689.
2023-01-12 11:28:04 -08:00
Shane Smiskol
b68dabb689 Car interface: require fingerprint and FW versions to get params (#26766)
* require fingerprint and FW versions

* add get_non_essential_params()

* comment

* all required

* classmethod, need to allow subclasses to override _get_params

* fix that

* fix
2023-01-11 23:44:50 -08:00
Adeeb Shihadeh
65fa87a969 cleanup panda types everywhere (#26574)
* cleanup panda types everywhere

* one more
2022-11-21 23:43:24 -08:00
Adeeb Shihadeh
c35e2b8e30 Hyundai: common CAN-FD brake pressed signal (#26170)
* Hyundai: common CAN-FD brake pressed signal

* new name

* bump panda

* bump opendbc to master

* bump opendbc

* bump panda

* bump panda

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-10-20 19:55:04 -07:00
Adeeb Shihadeh
15b8c7d1dc ui: publish draw times + add test (#26119)
* ui: publish draw times + add test

* add some checks

* adjust

* fix linter

* update max

Co-authored-by: Comma Device <device@comma.ai>
2022-10-17 17:14:38 -07:00
Jason Young
46e741c7cc VW MNB: Add EPS config script support (#26007) 2022-10-07 12:50:35 -07:00
Kurt Nistelberger
29d3ed2ce6 Sensor events splitup (#25714)
* PoC of reading sensors via interrupts instead of polling

* add Gyro and draft for magn

* add more functionality to gpio.cc

* change LSM gyro to interrupt

* resolve rebase conflict

* update BMX accel interrupt impl

* add interrupt collector thread to fetch in parallel

* change get_event interface to return true on successful read

* update BMX gyro interrupt impl

* update gpio.h/.cc according to comments

* address comments, rename Edgetype enum

* Edgetype to EdgeType

* update sensor interrupt interface

* add error handling, and read fd on trigger

* avoid sending empty messages

* fix build

* use gpiochip

* less diff

* gpiochip on both edges, but skip falling edge if rising edge is detected

* init last_ts with 0

* update sensord testcases

* update sensord testsweet

* test for pipeline

* readd with_process

* add null check

* move tests update to seperate PR

* sensord: improve test coverage (#25683)

* update sensord-interrupt testsweet

* address review comments

* inc stddev threshold

* fix format string

* add version 0 check again

* relax strictness after c3 with bmx tests

* relax strictness after tests

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>

* address PR comments

* fix typo

* remove 4ms limit, and skip first 0.5sec of data

* revert disable_interuppt change to destructor

* fix and remove timing skip

* make gpiochip generic

* sensord port

* change from sensorEvents to separated events

* fix gyro usage

* add splitted sensor tests

* modify debug script sensor_data_to_hist.py

* refactor get_event interface to remove sensorEvent message type

* update locationd to non sensorEvent usage

* tmp commit

* fix replay

* fix accelerometer type

* fix sensor to hist debug script

* update sensord tests to split events

* remove rebase artifacts

* port test_sensord.py

* small clean up

* change cereal to sensorEvents-splitup branch

* upate sensorEvents in regen

* fix route generation for splitted sensor events

* regen cleanUp from sensorEvents change

* .

* remove light and temp from locationd

* add generic init delay per sensor

* .

* update routes

* move bmx gyro/accel to its own channel

* adopt sensor tests to bmx channel

* remove rebase artifacts

* fix sensord test

* handle bmx not present

* add bmx sockets to regen

* .

* .

* code cleanUp

* .

* address PR comments

* address PR comments

* address PR comments

* lsm clean up

* readd sensorEvents

* rever regen.py

* .

* update replay refs

* move channels

* fix artifact

* bump cereal

* update refs

* fix timing issue

Co-authored-by: Bruce Wayne <batman@workstation-eu-intern2.eu.local>
Co-authored-by: gast04 <kurt.nistelberger@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-09-29 14:31:54 -07:00
Cameron Clough
4e310b807f configure mypy outside of pre-commit environment (#25892)
* add mypy config matching precommit

* use local mypy, add files to config

* excludes too

* fix config

* pylint is sad now... did it get updated?

* fix typing hints

* ignore

* this should be a regexp

* mypy doesn't like Deque despite inheriting MutableSequence

* more excludes

* Revert "pylint is sad now... did it get updated?"

This reverts commit 250c632f18ecb3d33ffb931e15425f9314a0964b.
2022-09-27 20:43:05 -07:00
Willem Melching
84a3c355e5 sensord: use interrupts to improve LSM6DS3 timing accuracy (#24525)
* change LSM6DS3TR(-c) gyroscope  and accelerometer to interrupt

* add pthread for linking

* add interrupt collector thread to fetch in parallel to non interrupt based sensors

* change get_event interface to return true on successful read

* fetch sensor interrupts via gpiochip

* avoid sending empty messages (interrupt only, non interupt magn can leave a gap in the orphan block)

* add verifier script to sensor interrupts (sensor_data_to_hist.py)

* add/update sensord testsweet (test_sensord.py)

* add poll timed out check

* unexport interrupt gpio pins

* gpiochip on both edges, but skip falling edge if rising edge is detected, this is handled in the sensor as the status flag is checked if new data is availble

* add test to sensord to verify 100Hz interrupt frequency

* add sensor shutdown/low power mode functionality on sensord exit

* relax test, will be readded in the splitup PR

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-09-12 22:29:31 -07:00
calledit
fc3bdef891 VW MQB: Added support for APA racks to EPS configuration tool (#25556)
* Added support for APA racks

APA steering racks use a different bit to represent whether the ECU should enable steering assist.
This change supports those APA steering racks.

* Static analysis fix

* Static analysis fix2

* Code cleanup

* Update selfdrive/debug/vw_mqb_config.py

* Apply suggestions from code review

Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
2022-09-09 11:20:59 -07:00
Adeeb Shihadeh
655a64b603 single longitudinal toggle for e2e and disable radar (#25688)
* single longitudinal toggle for e2e and disable radar

* write disable radar param

* rename

* better param name

* clean that up

* update refs

* update translations

* not live for experimental

* write it out

* vanish
2022-09-07 17:12:49 -07:00
Shane Smiskol
bd9966c477 test_fw_query_on_routes: find first non-none path (#25628)
find first non-none path
2022-08-31 17:54:21 -07:00
Shane Smiskol
61c30a95cb Car docs diff bot: auto-generate column header (#25622)
* Fix bot

* test

* Revert "test"

This reverts commit ba4a67cd8c88f8b7e082fb1fad5a1e10b51012ab.
2022-08-30 21:27:18 -07:00
Shane Smiskol
ed8d676870 Car docs diff bot: remove tier (#25611)
* fix car docs diff bot

* rm line
2022-08-30 11:23:42 -07:00
Adeeb Shihadeh
6590fb2b93 pre-commit: add codespell (#25571) 2022-08-30 11:20:55 -07:00
Shane Smiskol
19810f2dcc Silence a PytestCollectionWarning (#25537)
Silence PytestCollectionWarning: cannot collect test class 'TestRoute' because it has a __new__ constructor (from: test_models.py)
2022-08-23 17:26:29 -07:00
Shane Smiskol
45cfcfa3bb Revert "FPv2: fingerprint on all FW combinations" (#25417)
* Revert "FPv2: fingerprint on all FW combinations (#25204)"

This reverts commit ee081f278b.

* Revert "Revert "FPv2: fingerprint on all FW combinations (#25204)""

This reverts commit bb68b7bc1c28ba8c67f3051b8f99fabc42e85771.

* For breaking, match only with current brand's FW

* Add comment for fuzzy matching

* fingerprint (online) only using FW from that brand

* test_fw_query_on_routes fingerprints like online

* extend match_fw_to_car to work for test_fw_query_on_routes

* Apply suggestions from code review
2022-08-12 23:36:50 -07:00
Shane Smiskol
35338196ac CarInfo: detail sentence exception for Toyota stock longitudinal (#25331)
* Exception for 2022 RAV4

* Exception for all stock long Toyota

Exception for all stock long Toyota

* fix exception

fix

fix

fix
2022-08-01 17:44:22 -07:00
Shane Smiskol
d810d45421 Car docs diff: print detail sentence changes (#25332)
* Detail sentence changes

* fix

* after everything else

* fix static analysis

* nice emoji
2022-08-01 17:07:30 -07:00
Shane Smiskol
3117c069d8 Car docs diff: fix new platform detection (#25252)
* Fix new platform detection

* add some helpful comments and clean up

* slightly better
2022-07-22 13:51:08 -07:00
Shane Smiskol
937013e488 FPv2: log all responses (#25239)
* should be all that's required

* try using rx_addr (should be the same)

* log bus

* bump cereal

* remove debugging

* bump cereal to master

* rm line

* add printing to offline debug script
2022-07-21 16:35:47 -07:00
Shane Smiskol
4212aface7 Car docs diff bot: detect name + year changes (#25224)
* These cars have TSS-P standard

* temp

* debug close matching

* check everything

* clean up

* combine and use a dict

* programmatic

* revert

* clean up match_cars

* comment

* clean up

* clean up

* restore car changes

* test

* Revert "test"

This reverts commit e96f6936816051720db44072768f4df4e2cf5e82.

* we don't need this

* fix footnotes on model column
2022-07-20 12:56:22 -07:00
Shane Smiskol
ee081f278b FPv2: fingerprint on all FW combinations (#25204)
* Try to fingerprint on all possible combinations

* build_fw_dict creates set dict, tries each fw version for addr, subaddr

* clean up

* static analysis

* comment

* fix comment

* revert changes to test_fw_query_on_routes

* remove comment
2022-07-18 17:05:16 -07:00
Shane Smiskol
18f2a50501 disable_ecu.py: remove duplicate file (#25154)
* remove duplicate function

* make executable
2022-07-13 12:43:36 -07:00
Shane Smiskol
3a8f17111c Log VIN response address (#25148)
* log vin rx addr

* clean up
2022-07-13 01:10:56 -07:00
Shane Smiskol
aadaaabd54 compatibility docs: print diff from PR (#24941)
* print docs diff

* revert car changes

* cause a diff

* temp so it works

* text diff

* tier inline is a bit too much

* comments

* fix

* use paths

* fix

* temp

* temp

* diff

* fix

* remove something

* more text diff

* Delete comment if outdated

* Smaller diff

* remove

* no diff

* Don't try to run on fork PRs

* cause some errors

* Fix

* Fix

* Doesn't support env in job if, only step if

* in case file was moved, don't throw error

* See if this does what I think it does

* See if this does what I think it does

* should work

* change something

* revert

* uncomment

* no comment

* this shouldn't fail

* rename to base

* Remove true

* Remove other true
2022-07-12 18:58:46 -07:00
Erich Moraga
94c8717cac Add missing HIGHLANDERH_TSS2 ESP & engine f/w (#25066)
* Add missing HIGHLANDERH_TSS2 ESP & engine f/w

`@pkozlowski#5214` 2022 Highlander Hybrid (Poland)  DongleID/route b2e9858e29db492b|2022-07-07--17-57-24

* Fix test_fw_query_on_routes with older routes

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-07-08 20:03:21 -07:00
Adeeb Shihadeh
1382e28aa0 add pandas and tabulate packages (#25076)
* add pandas and tabulate packages

* remove that
2022-07-07 20:02:07 -07:00
Shane Smiskol
30cb9ac962 FW query debug script: print version brand (#25058)
* test_fw_query_on_routes: print brand

* dynamic paddign
2022-07-07 00:28:21 -07:00
Shane Smiskol
ea241bf3dc FW fingerprinting: log all FW versions (#25042)
* get_fw_versions returns all fw versions with request's brand

* keep track of everything received

* debug

* need to regen or write a hack in build_fw_dict

* to be safe, still replace old responses within same brands (hyundai responds to two queries, can fix later)

to be safe, still replace old responses within same brands (hyundai responds to two queries, can fix later)

* update test_fw_query_on_routes

* clean up

* better name

* slightly cleaner

* fix test_startup unit test

del

* fix imports

* fix test_fw_fingerprint

fix test_fw_fingerprint

fix

* fingerprint on all FW_VERSIONS, not just brands with requests

* support old routes in test_fw_query_on_routes

* regen and update refs

* similar function style to before

* better comment

* space

switch name

* try to exact match first

* useless else

* fix debug script

* simpler dictionary

* bump cereal to master
2022-07-06 19:42:58 -07:00
Adeeb Shihadeh
11b5d51da6 remove mypy ignore from a few scripts 2022-06-30 15:36:40 -07:00
Adeeb Shihadeh
1dffd48a2b count_events improvements 2022-06-23 15:07:34 -07:00
Willem Melching
cd87772e03 live_cpu_and_temp: handle duplicate proc names 2022-06-17 11:52:30 +02:00
Adeeb Shihadeh
0fce5d9045 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh
66bc246210 count events: add simple camera debugging 2022-06-10 16:10:06 -07:00
Shane Smiskol
e5b189416d test_models: support for running on any route (#24002)
* run test_models on route

* clean up a bit

clean up a bit

clean up a bit

* remove

remove

* make route positional

* fixes from merge

* not working as I expected

* finally working, easiest way seems to make a new subclass dynamically

* bring back routes

* remove comments

* revert skiptest

* fix subclass name

* car first

* this should be here...

* this should work

* comment

* pytest doesn't support dynamically loading with load_tests

* minimize test_models.py diff, and make new file for running on a route

* fix static analysis

* remove print

* clean up a tiny bit

* rename and make required

* auto detect car fingerprint if not given

* move to location that makes more sense

* Add ci argument for running route from routes.py
2022-06-02 17:23:05 -07:00
Shane Smiskol
e32a735a58 test_fw_query_on_routes: warn on no CarParams (#24655)
add warning for no carparams
2022-05-26 13:59:19 -07:00
Willem Melching
fd63de71f0 remove debug print 2022-05-18 12:29:24 +02:00
Willem Melching
194e5fdf1c make normal logreader more robust (#24577) 2022-05-18 12:21:01 +02:00
Adeeb Shihadeh
0b1f6e3620 show which cameras are malfunctioning (#24558) 2022-05-16 22:01:04 -07:00