Skip to content

Commit

Permalink
Toyota: use radar in place of abs for platform code ECUs (commaai#31043)
Browse files Browse the repository at this point in the history
* use radar instead of abs

* str the strenum

* Lexus ES: non-TSS2 probably don't have stop and go without DSU-pull and/or pedal

* remove from NO_STOP_TIMER_CAR. this set is so confusing

* Combine ES & ESH (preferring ESH's DSU msgs)

* ES: forgot substitute

* comment

* Highlander: combine, preferring the hybrid for DSU msg mismatches (0x365 and 0x366)

* remove duplicates and sort

* update docs

* toyota non_essential ECU test

* Lexus RX: combine, preferring hybrid's msgs (they all exist on ICE)

* sort and remove dups

* parameterize so we can test with notebook

* this too

* clean up

* clean up

* tuple makes more sense

* update comments

* update

* update

* update
  • Loading branch information
sshane authored Jan 25, 2024
1 parent 8472ae5 commit be15b31
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions selfdrive/car/toyota/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,16 @@ def match_fw_to_car_fuzzy(live_fw_versions, offline_fw_versions) -> Set[str]:
FW_CHUNK_LEN = 16

# List of ECUs that are most unique across openpilot platforms
# TODO: use hybrid ECU, splits similar ICE and hybrid variants
# - fwdCamera: describes actual features related to ADAS. For example, on the Avalon it describes
# when TSS-P became standard, whether the car supports stop and go, and whether it's TSS2.
# On the RAV4, it describes the move to the radar doing ACC, and the use of LTA for lane keeping.
# - abs: differentiates hybrid/ICE on most cars (Corolla TSS2 is an exception)
# Note that the platform codes & major versions do not describe features in plain text, only with
# matching against other seen FW versions in the database they can describe features.
# - fwdRadar: sanity check against fwdCamera, commonly shares a platform code.
# For example the RAV4 2022's new radar architecture is shown for both with platform code.
# - abs: differentiates hybrid/ICE on most cars (Corolla TSS2 is an exception, not used due to hybrid platform combination)
# - eps: describes lateral API changes for the EPS, such as using LTA for lane keeping and rejecting LKA messages
PLATFORM_CODE_ECUS = [Ecu.fwdCamera, Ecu.abs, Ecu.eps]
PLATFORM_CODE_ECUS = (Ecu.fwdCamera, Ecu.fwdRadar, Ecu.eps)

# These platforms have at least one platform code for all ECUs shared with another platform.
FUZZY_EXCLUDED_PLATFORMS: set[CAR] = set()
Expand Down

0 comments on commit be15b31

Please sign in to comment.