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
This commit is contained in:
Shane Smiskol
2024-02-12 23:28:16 -06:00
committed by GitHub
parent 78e4508e3b
commit 04ada8e436
2 changed files with 7 additions and 1 deletions

View File

@@ -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))

View File

@@ -1 +1 @@
21472c7936cbf3a3b585ddda8c08f1b814fdd6d3
bd44a98bdb248f3c7b988f81ee130c2542b18ae7