Toyota: fix rare panda standstill mismatch (#31232)

* fix

* clean up

* just use 2x lower threshold so we're not on edge again
pull/31218/head
Shane Smiskol 1 year ago committed by GitHub
parent bc5fdf24ae
commit bd1678e71f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      selfdrive/car/toyota/carstate.py

@ -71,7 +71,7 @@ class CarState(CarStateBase):
ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw)
ret.vEgoCluster = ret.vEgo * 1.015 # minimum of all the cars
ret.standstill = ret.vEgoRaw == 0
ret.standstill = abs(ret.vEgoRaw) < 1e-3
ret.steeringAngleDeg = cp.vl["STEER_ANGLE_SENSOR"]["STEER_ANGLE"] + cp.vl["STEER_ANGLE_SENSOR"]["STEER_FRACTION"]
ret.steeringRateDeg = cp.vl["STEER_ANGLE_SENSOR"]["STEER_RATE"]

Loading…
Cancel
Save