* switch to pytest
* static analysis
* fix the helpers
* static analysis
* remove that
* more parallel test
* cleanup
* static analysis
* durations min and tolerance
* reduce those iterations
* sleep time could be decreased too
* in case it's negative
* try using caching
* remove parallelization for first PR
* PR Cleanup
* reduce diff
* fix that
* bump panda
* put one subaddr in parallel_addrs
* p
* remove print
* update test refs
* test
* revert test changes
* do same in present ECU query, lower threshold to catch (~0.82 to ~0.72 right within bounds)
* type
* clean up
* update test ref
* Revert "Nissan FPv2: log different diagnostic session types (#28585)"
This reverts commit 2f2b94758b.
* switch to standard KWP2000 diagnostic session type
* we're speedy again
* request callbacks
* support in IsoTpParallelQuery
* tiny bit simpler
* shorter lines
* need to check length again, could return empty list
* takes in prev response
* typing
* test
* only test
* simple test
* revert this
* subtest!
* put one subaddr in parallel_addrs
* p
* remove print
* update test refs
* test
* revert that
* clean up
* clean up
* fix
* print results
* fixup cmt
* move down
* put one subaddr in parallel_addrs
* p
* remove print
* update test refs
* test
* revert that
* clean up
* clean up
* only clean up
* clean up
* rm
* type
* one line
* this is fine
* get gas/ev/hev from FW (not all correct, poc)
* add test for essential ecus for fuzzy fingerprinting
* kinda works
* stash
* clean up
* add code
* simpler
* use the function
* test it with our cars
* no re
no re
no re
* debugging
* handle empty dict
* simpl
* this is promising
start on making existing fingerprinting functions use the config, instead of entirely replacing them
* needs to allow 1 match
* lay out how this should look
* changes
* executable
* some work
* use config
* fuzzy ecus
* config test
* comment and some clean up
* test platform codes
* use regex, simpler and fixes bug
* in func
* rm bad func
* typing for new func and remove old from dc
* todo done
* tested!
* remove fake platform codes
* thought we needed this, but actually...
* not needed
* not applicable any more
* use config for essential ecus
* first draft of test to make adding/removing fuzzy FP platform intentional
* compile
* clean up test
* even cleaner
* fix default ecus type
* temp fix
* this is mostly in tests now
* test every fuzzy ecu fw returns one platform code
* experiment with dates
* Revert "experiment with dates"
This reverts commit 3251b9cc5c.
* clean that up
* comment
* test
* work on all cars
* fix fuzz_fw_fingerprint
* comment
* get first by search
* bit more clean up
* and more
* use compiled pattern for nicer syntax
* default
* flip dat around, much cleaner
* clean up hyundai test a bit
* flip order
same here
* rename test and flip subTest
* fix pylint
* revert fw changes
revert fw changes
* line
* add original functions to test
* needs to be a list
* cmt
* draft (need to count one ecu as a match)
* tiny clean up
* todo: date range
* only in notebook
* remove comment (still can be either list or set)
* same, only notebook
* more consistent signature
* copilot inspired
* copilot no good
* test for date parsing
* better name
* good, now we don't have to worry about the dates mismatching in another test/logic
* comment up+
* some stuff
* clean up
fix test
fix test
* test
* comment
* use utils
* clean up (utils are cleaner and less buggy)
* clean up (utils are cleaner and less buggy)
* fixup test
* use a dash (prettier) and remove some platforms that can fingerprint now!
* compile global pattern
* same as what we do in values
* remove comments
* fuzzy_get_platform_codes is one or none here
* more clean up
* sort imports
* woah woah woah
* add comment
* fix reassigning different types
* add types
* adapt fuzzy test recently added (nice it caught this!)
* update lock
* options
comments
* stash
* comments and fixes
* better comments
* better
* test: run on exact fuzzy matching logic, same results!
* use match_fw_to_car
* test all fw
* ex
* unused random
* this is a possibility
* this is more clear
* fix
* revert
* revert to needing both ECUs to match to reduce false positives, test
* fix excluded platform test :( but it's ok
* add comment
* we actually want to only test fuzzy ecus to make it explicit
* fix mypy
* comment for tomorrow
* just add matches with fuzzy FP
* add comment
* this was the cleanest I could think of, but still working on it. not very easy to understand
* think this is better, but also worse...
* comment: reframing how this works
* revert back to what we did before
* was swapped
* else set
* remove old comment
* fixes from merge
* remove fuzzy_min_match_count from this pr
* fix static analysis
* also unused
* different method first draft
* copy existing fuzzy func
* check all possible ecus exist, only platform codes, slightly refactor main loop
* fix
* Revert recent
Revert "fix"
This reverts commit 5cdb7bda83.
Revert "check all possible ecus exist, only platform codes, slightly refactor main loop"
This reverts commit d3e918fa20.
Revert "copy existing fuzzy func"
This reverts commit 34c8c05450.
Revert "different method first draft"
This reverts commit b91139055d.
* new func
* fixup test
* remove changes from v1 from fw_versions.py
* clean up a bit
* return part as part of code
* fix test
* add original fuzzy function
* add an ecu match if the date is within range (or date doesn't exist)
* add format for what we're going to do
* not working stash
* the exact matching function does more of what we want with less code and less custom logic
* we don't care about found versions, only codes and dates
* actually we do have an exception
* this works pretty nicely now
* up here
* this is better
* some minor clean up
* old function=now junk
* fix platform code test
* remove old platform code function
* now rename _new to
* use FW_QUERY_CONFIG
* clean up imports
* rename that too
* one line
* correct typing
correct typing
* draft tests
* so that works
* fixup excluded platform test now too
* this is tested by excluded platform test
* test parts and dates
* remove old comment
* old import
* take platform code stuff out of FwQueryConfig
* fix test
* revert debug script
* flip order
* make this a set by default
* revert this part
* correct typing
* clean up comments
* clean that test up too/pylint
* combine these three tests ina clean way
* not right
* more general
* be consistent with quotes
* comment
* comment
* comment in fw_versions
* flip order
* this is more readable
* could test all this, but it's tested in test_hyundai and doesn't do a lot here
* only assert brands which use this
* invalidate all CAN FD ICE and hybrid
* tuple
* can get away without filtering
* add comment reasons
* fix
* some review suggestions
* this works (first draft)
* this is better
* script to print platform codes and dates
* sanity check for dates are in correct ecus and platforms
* mypy
* better variable name and comment
* rename
* same
* slightly better name
* subset
* exclude platforms and live car without dates
* consistent
* self explan
* better name
* test to make sure the functions agree
* clean that up
* comment
* we get other responses from queries not in DB, only check any
* not used or typed
* bring platform codes out of config for now (can re-introduce later)
* clean that up
* flake8
* comment
* comments and better test names
* typo
* Update selfdrive/car/hyundai/tests/test_hyundai.py
* Update selfdrive/car/hyundai/tests/test_hyundai.py
* add config options
* you know what, platform codes don't need to be related to fuzzy fingerprinting at all
* better comment?
* add comment
* add test from other PR
* add platform code function to hyundai
* comment and add eps!
* clean up config test
* fix test
* add error message to test
* until we have multiple ways a brand can set up fuzzy FP, let's leave func name fuzzy-specific
* rename in comment too
* hyundai tests
* simpler test!
* check all ecus with platform codes
* add types-python-dateutil = "^2.8.19.13"
* these aren't used any more
* Update selfdrive/car/hyundai/tests/test_hyundai.py
* not to imply this is active yet
* first attempt trying to do it implicitly bad
* back to lists and explicitly do this
* continue checking if candidate switches on these, that's fine to check
* debugging
* clean up
* more clean up
* spot free
* only need to create/update on change
* fix test
* draft
* Revert "draft"
This reverts commit dbe32f58b1.
* Revert "fix test"
This reverts commit 1d34269fe2.
* fix test for real
* first draft of test
* this should be good
* can replace existing fuzzy test
* rm
* matching
* test non-empty fws
* TEST DOWN HERE
* no test
* unique + fix skip message + comment + clean up
* less confusing
* ing
* better
* can FP time
* add
* move the ref up
* assert function
* all brands
* Update selfdrive/car/tests/test_fw_fingerprint.py
* can this can vary a bit more
* or can it
* add timing unit test
* formatting
* not clean
* Revert "not clean"
This reverts commit dab35d582c.
* Revert "formatting"
This reverts commit 56a1ae4bb7.
* need to consider subaddrs (0.3 to 0.7s for toyota)
* clean up
* move to test_fw_fingerprint
* use a thread to get real time
* lower threshold
* revert that
* ?
* some sleep
* at top
* use the config
* function to measure query time, similar to opendbc's convention
* revert that
* avg
* Update selfdrive/car/tests/test_fw_fingerprint.py
* draft
* starting a thread takes a long time!
* refs
* uncomment
* 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
* Add VMCU address for EV6
* Rename vmcu
* add to tests
add to tests
* rename to more generic name
* more explicit
* remove print
* Like this much better, removes subtle fingerprinting problems
* clean up
* add test and clean up
* remove hyundai stuffs
* global
* Fpv2Config class
* fix missing fw versions from import order
* unused
* revert for now
* test for fpv2 configs with subtests
* subtests don't work that way
* remove this
* .
* intersection
* print ecus
* shorter
* fix typing
* use config
* Add VMCU address for EV6
* Rename vmcu
* add to tests
add to tests
* rename to more generic name
* more explicit
* remove print
* Like this much better, removes subtle fingerprinting problems
* clean up
* add test and clean up
* remove hyundai stuffs
* global
* Fpv2Config class
* fix missing fw versions from import order
* unused
* revert for now
* test for fpv2 configs with subtests
* subtests don't work that way
* do toyota as an example
* revert
revert
* do chrysler
* do rest
* stash
* much smaller of a diff than the alternative
* remove unused test
* fix tests
* remove brand from Request
* Make StandardQueries class
* add missing_ecus
clean up
* rename file
* unused
* test implemented
* add comment and rename
add comment and rename
add comment and rename
* should be impossible now
* this is a fixme
* rename to fw_query
* rename this too
* and this
* move vin queries to class
* order
* can use p16!
* formatting
* whoops, this wasn't gated on not len(found_versions)
* make this clear
* Standardize manufacturer software version query
* Chrylser FPv2
* Update fw_versions.py
* formatting and remove default
* fix rx offset
* move to end
* add fw versions
* this won't be fingerprinted on as it returns from Mazda
* only log FW versions
* add type annotation
* fix typing
* Skip if FW versions are for read/request-only
* Fix crash if no fw versions
Fix crash if no fw versions
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* 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
* Subaru: remove A/C fw version
* add test to ensure the ecu isn't added again
* check CP.carName
* clean up
one line
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* Replace lists with generators v2
* Replace set with {}
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Replace more set() with {}
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Fuzzy match on 3+ ECUs
* reuse dict
* exclude some shared ecus to be sure
* show alert for fuzzy match
* use title case
* require community toggle
* refactor
* do both exact and fuzzy in test script
* update test script
* add fuzz test and lower matches to >= 2
* strip alert length
* sort mismatches
* add fw tests to test_startup
* bump cereal