mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 20:03:53 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user