* debugging
* this test works, but find a better place
* make test more generic to start testing more than timings
no need to run again in another test function. eventually we
can simulate ECUs and have IsoTpParallelQuery work properly
* Revert "make test more generic to start testing more than timings"
This reverts commit 58e8536b1d.
* 2nd try
* clean up
* not even MappingProxyType works
* works
* test that too
* clean up
* refactor to avoid modification online
* revert tests
* more revert
* no longer needed
* clean up
old-commit-hash: 56614124f0
* 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
old-commit-hash: f788edb6a5
* 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
old-commit-hash: 9e8936be98
* pass in brand
* needs to be flipped for exact matching since it's subtractive
* new helper
* makes more sense flipped
* clean up
* not that stuff here
* not here
old-commit-hash: 2b07ec4bde
* speed up fingerprinting for CAN fp cars
* add comment to describe this behavior
* more explicit, no defaultdict
* do this later
* fix
* a little more clear I think
old-commit-hash: 9b1095a27e
* query extra ecus (still need to match)
* match against extra ecus
* clean p
* clean p
* switch that around
* can clean that up
* values
old-commit-hash: 6f35d23c06
* query extra ecus (still need to match)
* match against extra ecus
* clean p
* clean p
* switch that around
* can clean that up
* values
* rm
* not used
old-commit-hash: 084e83cda1
* indecisive
* rename to generic FW query
* remove code and update comment
* we need this to start off, unless we set multiplexing immediately
* draft
* draft 2
* try that
* can't do this either, boardd might read Enabled after removing, but before setting new Request param
* this should work
* use one less param
* fix params
* match behavior (set all pandas to safety param of 1, disabling multiplexing for fingerprinting
* clean up (some tests may temp break)
* fix param name and sort
* time it
* yes it does matter
* add to hyundai's bus 5 query
* remove hyundai for now
* this should work
* clean up
* clean up
* flip argument around, clean up
* fix test_startup
* some clean up
* rm line
* comment makes more sense
* required typing
* clean up common type
* comments
* Update selfdrive/car/car_helpers.py
* line
* whoops, need to set before vin!
* fix debug
* annoying
* more debugging
* bug fix (needs both keys always)
* debuGG
debuGG
* Revert "debuGG"
This reverts commit 55b2f42932.
* Revert "more debugging"
This reverts commit 02934c3403.
* Revert "annoying"
This reverts commit 8b4e5e0998.
* clean that up
* bumpback
* bumpback
* every second write param
* flip
* stuff
* move up?
* fix timing out in CI
* rm
old-commit-hash: 42449b482d
* add flag
* actually use in fw_versions.py
* simpler
* not here
* Comment
* better name
* add param and block
* keys
keys
* block
* with a value
with a value
* add query for bosch PT bus
* different name
* fix
* .
* fix test
fix test
* add cloulogs
* mark as logging
old-commit-hash: c4b84783a0
* log responses from logging/debugging queries
* don't add logging FW to FW dict for fingerprinting
* flip?
* fine before
* log if extra in debug ecus
* clean up
* test extra ecus too
* Revert "test extra ecus too"
This reverts commit 8f7867844d.
* bump to master
old-commit-hash: f29e19cf42
* add adas essential ecus
* add adas ecu and query
* add queries
* add name
* after
* presence of adas ecu
* Revert "presence of adas ecu" (POC)
This reverts commit ab88a7e7df.
* no whitelist for debugging
* Apply suggestions from code review
* add adas response
* remove adas version
* temp
* read pandaStates
* works in debug script
* only fwdCamera on tucson
* fix pandaStates reading
* fix test_startup
* fix
* simpler
* use existing socket
* pass in number of pandas
* need to create sm using outcome of fingerprinting, which uses sm
fix
* move default argument
* use sock
* always ignore
always ignore
* add canfd fingerprint test
* Update selfdrive/car/hyundai/tests/test_hyundai.py
* set
old-commit-hash: 7bf70bf7d8
* 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
old-commit-hash: 7e9961b9ac
* revert isotpparallelquery returning rx addr for functional special case
* we don't really use the tx addr (and soon won't make sense with fun querying)
old-commit-hash: 4d7f4b4c9d
* 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
old-commit-hash: 0ef6bb48df
* add model years
* update Focus steer ratio
* Ford: add EU label to Focus Mk4
* add packages
* add Ford Explorer 2020
Package: Co-Pilot 360 Assist+
Optional on XLT
Standard on Limited, Limited Hybrid, ST and Platinum
https://cdn.dealereprocess.org/cdn/brochures/ford/2020-explorer.pdf
* Ford: steering control with path angle
* Ford: add TJA toggle to buttons
* add Ford Explorer 2021
`62241b0c7fea4589|2022-08-30--11-58-24--0`
Package: Co-Pilot 360 Assist+
Optional on XLT
Standard on Limited, Limited Hybrid, ST and Platinum (same as 2020)
https://cdn.dealereprocess.org/cdn/brochures/ford/2021-explorer.pdf
* Ford: add shiftByWire ECU fw
* angle/steer refactor
* try always stop and go for US models
* no dashcam
* car info
* send resume button
* skip explorer
* escape and focus back in dashcam
* passthru buttons
* fordcan set bus for button message
* toggle off stock traffic jam assist so camera does not enforce driver presence checks
* not used
* update ramp rate/precision notes
* cleanup
* bump steering pressed torque to 0.8 Nm
* add standstill
* bump steer ratio
* try increasing delay?
* fix docs
* add kuga car info
* maybe fix tja toggle?
* compensate for ford roll compensation??
* oops
* better ui
* block non-adaptive
* add note on ui warning for hands on wheel
* try only checking/toggling TJA every 2 seconds
* add car test route
* dashcam only again
* send buttons to camera
* add process replay segment
* cleanup
* bump panda
* add extra FW
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
old-commit-hash: 9241de2210
* Try to get Chrysler engine FW
* try this
* Get engine FW for certain Chrysler
* Add our Ram's engine FW
* better name
* no whitelist
* engine and transmission only
old-commit-hash: 08510e2b0a
* Revert "FPv2: fingerprint on all FW combinations (#25204)"
This reverts commit c7e0622fa5bbf3ed8b000c86666f54f2b0a8c63d.
* Revert "Revert "FPv2: fingerprint on all FW combinations (#25204)""
This reverts commit bb68b7bc1c.
* 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
* 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
* 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
* 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>
old-commit-hash: b5f0cb22a5
* only send valid/needed queries
* just do volkswagen
* clean up
* add parameter name
clean up
* add test for whitelist
* rename
* Update selfdrive/car/fw_versions.py
Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
* fix test
* log response addresses
* bump cereal
* handle response pending with IsoTpParallelQuery
* remove response pending stuff
* temporarily disregard cache for easier testing
* revert this
Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
old-commit-hash: 479b66c992
* 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
* eliminate brands based on ECUs that respond to tester present
* make it work
* Add type hint for can message
Use make_can_msg
* Only query for addresses in fingerprints, and account for different busses
* These need to be addresses, not response addresses
* We need to listen to response addresses, not query addresses
* add to files_common
* Unused Optional
Drain sock raw
* add logging
* only query essential ecus
comments
* simplify get_brand_candidates(), keep track of multiple request variants per make and request each subaddress
* fixes
make dat bytes
bus is src
Fix check
* (addr, subaddr, bus) can be common across brands, add a match to each brand
* fix length
* query subaddrs in sequence
* fix
* candidate if a platform is a subset of responding ecu addresses
comment
comment
* do logging for shadow mode
* log responses so we can calculate candidates offline
* get has_subaddress from response set
* one liner
* fix mypy
* set to default at top
* always log for now
* log to make sure it's taking exactly timeout time
* import time
* fix logging
* 0.1 timeout
* clean up
Co-authored-by: Greg Hogan <gregjhogan@gmail.com>
old-commit-hash: cccab50b16