Skip to content

Instantly share code, notes, and snippets.

@nelsonjchen
Created October 3, 2024 17:24
Show Gist options
  • Save nelsonjchen/20079fd8b4e539fd71e1a1dcfef94a0f to your computer and use it in GitHub Desktop.
Save nelsonjchen/20079fd8b4e539fd71e1a1dcfef94a0f to your computer and use it in GitHub Desktop.
diff --git a/selfdrive/car/toyota/fingerprints.py b/selfdrive/car/toyota/fingerprints.py
index 95fd6a156..fe8d5cdd0 100644
--- a/selfdrive/car/toyota/fingerprints.py
+++ b/selfdrive/car/toyota/fingerprints.py
@@ -1131,25 +1131,27 @@ FW_VERSIONS = {
(Ecu.fwdRadar, 0x750, 0xf): [
b'\x018821F0R01100\x00\x00\x00\x00',
],
- (Ecu.fwdCamera, 0x750, 0x6d): [
- b'\x028646F0R02100\x00\x00\x00\x008646G0R01100\x00\x00\x00\x00',
- ],
},
CAR.RAV4_PRIME: {
(Ecu.engine, 0x700, None): [
- b'\x018966342S7000\x00\x00\x00\x00'
+ b'\x01896634AJ7000\x00\x00\x00\x00',
+ b'\x018966342S7000\x00\x00\x00\x00',
],
(Ecu.abs, 0x7b0, None): [
- b'\x01F15264228300\x00\x00\x00\x00'
+ b'\x01F15264284100\x00\x00\x00\x00',
+ b'\x01F15264228300\x00\x00\x00\x00',
],
(Ecu.eps, 0x7a1, None): [
- b'\x018965B4209000\x00\x00\x00\x00'
+ b'\x018965B4233100\x00\x00\x00\x00',
+ b'\x018965B4209000\x00\x00\x00\x00',
],
(Ecu.fwdRadar, 0x750, 0xf): [
- b'\x018821F3301400\x00\x00\x00\x00'
+ b'\x018821F6201300\x00\x00\x00\x00',
+ b'\x018821F3301400\x00\x00\x00\x00',
],
(Ecu.fwdCamera, 0x750, 0x6d): [
- b'\x028646F4205200\x00\x00\x00\x008646G4202000\x00\x00\x00\x00'
+ b'\x028646F4210100\x00\x00\x00\x008646G3305000\x00\x00\x00\x00',
+ b'\x028646F4205200\x00\x00\x00\x008646G4202000\x00\x00\x00\x00',
],
},
CAR.RAV4_TSS2_2023: {
diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py
index a29008dca..5067c02e6 100644
--- a/selfdrive/car/toyota/interface.py
+++ b/selfdrive/car/toyota/interface.py
@@ -97,7 +97,7 @@ class CarInterface(CarInterfaceBase):
ret.lateralTuning.pid.kf = 0.00004
break
- elif candidate in (CAR.RAV4H, CAR.CHR, CAR.CAMRY, CAR.SIENNA, CAR.LEXUS_CTH, CAR.LEXUS_NX):
+ elif candidate in (CAR.RAV4H, CAR.CHR, CAR.CAMRY, CAR.SIENNA, CAR.LEXUS_CTH, CAR.LEXUS_NX, CAR.RAV4_PRIME):
# TODO: Some of these platforms are not advertised to have full range ACC, are they similar to SNG_WITHOUT_DSU cars?
stop_and_go = True
@@ -139,7 +139,7 @@ class CarInterface(CarInterfaceBase):
# - TSS-P DSU-less cars w/ CAN filter installed (no radar parser yet)
if ret.flags & ToyotaFlags.SECOC.value: # Lateral only for now
- ret.openpilotLongitudinalControl = False
+ ret.openpilotLongitudinalControl = True
else:
ret.openpilotLongitudinalControl = use_sdsu or \
ret.enableDsu or \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment