Commit Graph

275 Commits

Author SHA1 Message Date
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: 29d3ed2ce6
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: 4e310b807f
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: 84a3c355e5
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: fc3bdef891
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: 655a64b603
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: bd9966c477
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: 61c30a95cb
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: ed8d676870
2022-08-30 11:23:42 -07:00
Adeeb Shihadeh
35ff65121e pre-commit: add codespell (#25571)
old-commit-hash: 6590fb2b93
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: 19810f2dcc
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: 45cfcfa3bb
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: 35338196ac
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: d810d45421
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: 3117c069d8
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: 937013e488
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: 4212aface7
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: ee081f278b
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: 18f2a50501
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: 3a8f17111c
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: aadaaabd54
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: 94c8717cac
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: 1382e28aa0
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: 30cb9ac962
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: ea241bf3dc
2022-07-06 19:42:58 -07:00
Adeeb Shihadeh
2445fdc4d0 remove mypy ignore from a few scripts
old-commit-hash: 11b5d51da6
2022-06-30 15:36:40 -07:00
Adeeb Shihadeh
262839b534 count_events improvements
old-commit-hash: 1dffd48a2b
2022-06-23 15:07:34 -07:00
Willem Melching
7c2ef148e6 live_cpu_and_temp: handle duplicate proc names
old-commit-hash: cd87772e03
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: 0fce5d9045
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh
77224f3332 count events: add simple camera debugging
old-commit-hash: 66bc246210
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: e5b189416d
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: e32a735a58
2022-05-26 13:59:19 -07:00
Willem Melching
01c2070a59 remove debug print
old-commit-hash: fd63de71f0
2022-05-18 12:29:24 +02:00
Willem Melching
f957c16a7b make normal logreader more robust (#24577)
old-commit-hash: 194e5fdf1c
2022-05-18 12:21:01 +02:00
Adeeb Shihadeh
a6bcd14abd show which cameras are malfunctioning (#24558)
old-commit-hash: 0b1f6e3620
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: b1858df00e
2022-05-16 21:19:38 -07:00
Adeeb Shihadeh
5e03fb3de5 can_printer: add frequency
old-commit-hash: 28a08ff12e
2022-05-12 17:07:32 -07:00
Adeeb Shihadeh
8abd24a15e ftrace profiling script
old-commit-hash: c8629a4b36
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: c007c7e681
2022-05-12 15:09:37 +02:00
Dylan Herman
2dfba97175 add mypy check for return-any (#24379)
* add mypy check for return-any

* remove unused import

* typing

* remove unnecessary variable typing

* cleanup

* cleanup

* bump submodules

* small fixes

* only a problem on mac

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: d2eef1955c
2022-05-12 14:59:00 +02:00
Adeeb Shihadeh
ce48c81299 remove eon debug scripts
old-commit-hash: b16e612102
2022-05-05 19:42:18 -07:00
Keyvan Fatehi
576ae03e43 Fix spelling in dump.py help output (#24381)
old-commit-hash: 7b394510cb
2022-04-29 20:13:44 -07:00
grekiki
77d6d9a083 mypy: enable --warn-unused-ignores (#24287)
* this is the easy part to check

* Not sure what this fixes, 8aaf00c6a4

* bump laika

* works here

* cleanup

* add types-certifi

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 049b163ea0
2022-04-27 14:26:15 -07:00
Adeeb Shihadeh
75174c93d7 more verbose debug alerts (#24126)
old-commit-hash: 70987fd9d9
2022-04-22 16:12:54 -07:00
grekiki
cc943ac9a5 mypy: enable --warn-unreachable (#24282)
* Optional solves mypy assuming None is always None

* oops

* spaces

* Update registration.py

* fix local error

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b8b15d5cf1
2022-04-21 18:27:45 +02:00
Adeeb Shihadeh
5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86
2022-04-18 17:55:23 -07:00
Willem Melching
7f623e4092 filter_log_message: support errorLogMessage from qlogs
old-commit-hash: f1ca848ff7
2022-04-15 11:06:28 -07:00
Adeeb Shihadeh
2569e85349 agl plugins work nicely on latest profiler
old-commit-hash: 1fa1c44342
2022-04-14 21:34:14 -07:00
Shane Smiskol
d2edbf520b uiview: show model (#24210)
* assume not car when using uiview

* write carparams
old-commit-hash: 52e5aa8409
2022-04-14 16:37:09 -07:00
Adeeb Shihadeh
2b56bba1f4 test fw query: add nissan
old-commit-hash: 5b098a1db5
2022-04-13 22:54:45 -07:00
Adeeb Shihadeh
60c3bb2da3 add mpld3 python pacakge (#24138)
* add mpld3 python pacakge

* move to dev

* fix for new pylint
old-commit-hash: 6013d733a3
2022-04-05 15:00:35 -07:00