diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index 063427f14..c8dbfde5b 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -94,7 +94,11 @@ class CarState(CarStateBase): torque_sensor_angle_deg = cp.vl["STEER_TORQUE_SENSOR"]["STEER_ANGLE"] # dp - zss controller - ret.steeringAngleDeg = self.zssc.get_steering_angle_deg(cp.vl["PCM_CRUISE_2"]["MAIN_ON"], cp.vl["PCM_CRUISE"]["CRUISE_ACTIVE"], ret.steeringAngleDeg) + if self.CP.carFingerprint in UNSUPPORTED_DSU_CAR: + main_on = cp.vl["DSU_CRUISE"]["MAIN_ON"] != 0 + else: + main_on = cp.vl["PCM_CRUISE_2"]["MAIN_ON"] != 0 + ret.steeringAngleDeg = self.zssc.get_steering_angle_deg(main_on, cp.vl["PCM_CRUISE"]["CRUISE_ACTIVE"], ret.steeringAngleDeg) # On some cars, the angle measurement is non-zero while initializing if abs(torque_sensor_angle_deg) > 1e-3 and not bool(cp.vl["STEER_TORQUE_SENSOR"]["STEER_ANGLE_INITIALIZING"]):