Toyota: log engine RPM (#31423)

* Update carstate.py

* 42 is safe

* mirai

* we hit this after 30 mins: Exceeded message traversal limit.  See capnp::ReaderOptions.

* too easy to write this bug, no need to be generic yet

* Update ref_commit
old-commit-hash: 04ada8e436
chrysler-long2
Shane Smiskol 1 year ago committed by GitHub
parent cc42100cce
commit 4970ae9ced
  1. 6
      selfdrive/car/toyota/carstate.py
  2. 2
      selfdrive/test/process_replay/ref_commit

@ -95,6 +95,9 @@ class CarState(CarStateBase):
ret.leftBlinker = cp.vl["BLINKERS_STATE"]["TURN_SIGNALS"] == 1
ret.rightBlinker = cp.vl["BLINKERS_STATE"]["TURN_SIGNALS"] == 2
if self.CP.carFingerprint != CAR.MIRAI:
ret.engineRpm = cp.vl["ENGINE_RPM"]["RPM"]
ret.steeringTorque = cp.vl["STEER_TORQUE_SENSOR"]["STEER_TORQUE_DRIVER"]
ret.steeringTorqueEps = cp.vl["STEER_TORQUE_SENSOR"]["STEER_TORQUE_EPS"] * self.eps_torque_scale
# we could use the override bit from dbc, but it's triggered at too high torque values
@ -180,6 +183,9 @@ class CarState(CarStateBase):
("STEER_TORQUE_SENSOR", 50),
]
if CP.carFingerprint != CAR.MIRAI:
messages.append(("ENGINE_RPM", 42))
if CP.carFingerprint in UNSUPPORTED_DSU_CAR:
messages.append(("DSU_CRUISE", 5))
messages.append(("PCM_CRUISE_ALT", 1))

@ -1 +1 @@
21472c7936cbf3a3b585ddda8c08f1b814fdd6d3
bd44a98bdb248f3c7b988f81ee130c2542b18ae7

Loading…
Cancel
Save