Commit Graph

287 Commits

Author SHA1 Message Date
Shane Smiskol
ab91420b6a 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
old-commit-hash: 48b059d3670e8082eae785c850508f88b1181188
2023-02-15 15:59:23 -08:00
Jason Wen
6b3d88dc9c Hyundai: Enable radar tracks for Santa Fe 2019 (#27175)
old-commit-hash: b740bdc99c213a73628081b9f07b559420072d99
2023-02-01 13:01:26 -08:00
Shane Smiskol
5bb9a667b8 Fix fuzz_fw_fingerprint.py script
old-commit-hash: 7090a8841935d3a1c67fd915e4898a9880c237b5
2023-01-24 00:04:56 -08:00
Jason Young
fd29973e28 VW MQB: Add diagnostic firewall note to config tool (#26975)
old-commit-hash: f6dc12a735b4856d2ac6225ec9a2f2aa36d2c2de
2023-01-15 13:13:50 -08:00
Shane Smiskol
d56edcf5f3 Fix car docs diff bot (#26955)
fix
old-commit-hash: 406d12b7c17ff0d3d4fb713a90b178978c36d042
2023-01-13 17:20:45 -08:00
Shane Smiskol
0ceb423ccc 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 🤦
old-commit-hash: b00bc4f57e2c9a3acb9e3b10528b7e30cbde43f1
2023-01-12 12:25:24 -08:00
Adeeb Shihadeh
b67646e1ab Revert "Car interface: require fingerprint and FW versions to get params (#26766)"
This reverts commit ff80ac0f7525916211da2cd0fce2c9c5f35ef89d.

old-commit-hash: f14deae475f32af5b04fc2ef3744a77445ad8177
2023-01-12 11:28:04 -08:00
Shane Smiskol
28ceb52c33 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
old-commit-hash: b68dabb689104ef0819a6c881b800076deb866f6
2023-01-11 23:44:50 -08:00
Adeeb Shihadeh
7c96e7876a cleanup panda types everywhere (#26574)
* cleanup panda types everywhere

* one more
old-commit-hash: 65fa87a96965000986e76604ac868891e35a86bc
2022-11-21 23:43:24 -08:00
Adeeb Shihadeh
b63326c89a 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>
old-commit-hash: c35e2b8e305b2648ce392ffdefd5d90b39ce353e
2022-10-20 19:55:04 -07:00
Adeeb Shihadeh
60cb813af5 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>
old-commit-hash: 15b8c7d1dc3a75d78c0bbaa4f6b866374f6e8672
2022-10-17 17:14:38 -07:00
Jason Young
5812735bbe VW MNB: Add EPS config script support (#26007)
old-commit-hash: 46e741c7cc652a9b1b266c0881ef6f9c30f5a226
2022-10-07 12:50:35 -07:00
Kurt Nistelberger
fb06d2769f 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>
old-commit-hash: 29d3ed2ce63a65f793dc0ecb553180a0d0fba03e
2022-09-29 14:31:54 -07:00
Cameron Clough
23a4e66b17 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.
old-commit-hash: 4e310b807fb1ccdde4b2078468fab46e5324dfa2
2022-09-27 20:43:05 -07:00
Willem Melching
7451db46cf 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>
old-commit-hash: 84a3c355e5fdb7bb2f50847f925e894eecfa8918
2022-09-12 22:29:31 -07:00
calledit
88d173a925 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>
old-commit-hash: fc3bdef89143721172230bcf413a08a0091bca32
2022-09-09 11:20:59 -07:00
Adeeb Shihadeh
e4f9781c17 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
old-commit-hash: 655a64b60318ce44ef0271e03de16e8b135b5268
2022-09-07 17:12:49 -07:00
Shane Smiskol
e422f77099 test_fw_query_on_routes: find first non-none path (#25628)
find first non-none path
old-commit-hash: bd9966c4777a7b4393d65cc0f62d726a9fdf1ff1
2022-08-31 17:54:21 -07:00
Shane Smiskol
6d188f95a4 Car docs diff bot: auto-generate column header (#25622)
* Fix bot

* test

* Revert "test"

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

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

This reverts commit c7e0622fa5bbf3ed8b000c86666f54f2b0a8c63d.

* 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
old-commit-hash: 45cfcfa3bba6ae75c89114e58de445eaef4c5627
2022-08-12 23:36:50 -07:00
Shane Smiskol
e801b06515 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
old-commit-hash: 35338196aca2619e8d32d8f75c03b400ae9ece5b
2022-08-01 17:44:22 -07:00
Shane Smiskol
6e176a8ea3 Car docs diff: print detail sentence changes (#25332)
* Detail sentence changes

* fix

* after everything else

* fix static analysis

* nice emoji
old-commit-hash: d810d45421aa3af9ee62fb2026aa56f1e6d4fb8a
2022-08-01 17:07:30 -07:00
Shane Smiskol
178d7fca52 Car docs diff: fix new platform detection (#25252)
* Fix new platform detection

* add some helpful comments and clean up

* slightly better
old-commit-hash: 3117c069d8ce28ca7c4f19afaae8016158992b9a
2022-07-22 13:51:08 -07:00
Shane Smiskol
430a888fc3 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
old-commit-hash: 937013e48867862bccf0153064f104778e356f5d
2022-07-21 16:35:47 -07:00
Shane Smiskol
ad19051ddf 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
old-commit-hash: 4212aface76b7a780f94a1f237d846821461fd29
2022-07-20 12:56:22 -07:00
Shane Smiskol
e4024c4d9a 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
old-commit-hash: ee081f278b090b5bd4a06f12749fffeb780c6162
2022-07-18 17:05:16 -07:00
Shane Smiskol
9c7e9f292d disable_ecu.py: remove duplicate file (#25154)
* remove duplicate function

* make executable
old-commit-hash: 18f2a50501d67345e2fa2e44b6046d412c3452de
2022-07-13 12:43:36 -07:00
Shane Smiskol
661655b4cf Log VIN response address (#25148)
* log vin rx addr

* clean up
old-commit-hash: 3a8f17111c3439cb22eb627aec805898d9d9a41a
2022-07-13 01:10:56 -07:00
Shane Smiskol
c862387703 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
old-commit-hash: aadaaabd54988a286704ef2bea0bacf4bd62fa8b
2022-07-12 18:58:46 -07:00
Erich Moraga
c9dc7a9458 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>
old-commit-hash: 94c8717cac0cfad4603d57a8da108a124019dd73
2022-07-08 20:03:21 -07:00
Adeeb Shihadeh
8b81a3ac2f add pandas and tabulate packages (#25076)
* add pandas and tabulate packages

* remove that
old-commit-hash: 1382e28aa0b32923a44efa28c5b25d9b02c41d68
2022-07-07 20:02:07 -07:00
Shane Smiskol
ab7beb99de FW query debug script: print version brand (#25058)
* test_fw_query_on_routes: print brand

* dynamic paddign
old-commit-hash: 30cb9ac962395a86464fdfc079b5f0030c7b9b9d
2022-07-07 00:28:21 -07:00
Shane Smiskol
4eabd3b9d9 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
old-commit-hash: ea241bf3dc1d6dec2610bec9fceb1b8659014436
2022-07-06 19:42:58 -07:00
Adeeb Shihadeh
2445fdc4d0 remove mypy ignore from a few scripts
old-commit-hash: 11b5d51da61cac111fb4e5af3b1df6091d860dfc
2022-06-30 15:36:40 -07:00
Adeeb Shihadeh
262839b534 count_events improvements
old-commit-hash: 1dffd48a2bab07512af71cfa73e572d602977340
2022-06-23 15:07:34 -07:00
Willem Melching
7c2ef148e6 live_cpu_and_temp: handle duplicate proc names
old-commit-hash: cd87772e036acde3b7b74857f8c03e87f3af63c1
2022-06-17 11:52:30 +02:00
Adeeb Shihadeh
3c48bc47b7 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
old-commit-hash: 0fce5d90459b77bf2cfa70f55f322f0e1fb8d01c
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh
77224f3332 count events: add simple camera debugging
old-commit-hash: 66bc246210b4471e0a5fa3ab792c4d9fe0316406
2022-06-10 16:10:06 -07:00
Shane Smiskol
5f1990aa05 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
old-commit-hash: e5b189416d756c1b4f364c6f01b30d97b62710a5
2022-06-02 17:23:05 -07:00
Shane Smiskol
998d5ae1a1 test_fw_query_on_routes: warn on no CarParams (#24655)
add warning for no carparams
old-commit-hash: e32a735a58706d9be732748b555a6dbeee00511e
2022-05-26 13:59:19 -07:00
Willem Melching
01c2070a59 remove debug print
old-commit-hash: fd63de71f092f55613d3a4e8fcb034339c253a50
2022-05-18 12:29:24 +02:00
Willem Melching
f957c16a7b make normal logreader more robust (#24577)
old-commit-hash: 194e5fdf1c9ba2e01e2ec7faa62432d2a3b1870b
2022-05-18 12:21:01 +02:00
Adeeb Shihadeh
a6bcd14abd show which cameras are malfunctioning (#24558)
old-commit-hash: 0b1f6e3620793a0a06708464387613cec2937591
2022-05-16 22:01:04 -07:00
Adeeb Shihadeh
cfc16a88c5 improved alert verbosity (#24434)
* improved alert verbosity

* better testing script

* better description

* speed diff

* touch ups

* fix that
old-commit-hash: b1858df00e40f96832f812cb5b42596b8f522ab7
2022-05-16 21:19:38 -07:00
Adeeb Shihadeh
5e03fb3de5 can_printer: add frequency
old-commit-hash: 28a08ff12ec661770e31a7460e9880fe66ef5e69
2022-05-12 17:07:32 -07:00
Adeeb Shihadeh
8abd24a15e ftrace profiling script
old-commit-hash: c8629a4b36b286972338fe92daced0ca63e04361
2022-05-12 11:58:56 -07:00
Jason Young
a5b2304b06 Improved steering accuracy measurement script (#23583)
* move steering accuracy measurement script

* git rebase is utterly worthless

* fix header width
old-commit-hash: c007c7e68131ed7dc4220700fa1e889e526954f7
2022-05-12 15:09:37 +02:00