Subaru: set cruiseState.standstill (#25320)

* Subaru: set cruiseState.standstill

* only global
old-commit-hash: 9eb27259c7
taco
Adeeb Shihadeh 3 years ago committed by GitHub
parent 2108b7f061
commit 3c275a5b26
  1. 3
      selfdrive/car/subaru/carstate.py
  2. 2
      selfdrive/test/process_replay/ref_commit

@ -57,6 +57,9 @@ class CarState(CarStateBase):
ret.cruiseState.available = cp_cruise.vl["CruiseControl"]["Cruise_On"] != 0
ret.cruiseState.speed = cp_cam.vl["ES_DashStatus"]["Cruise_Set_Speed"] * CV.KPH_TO_MS
if self.car_fingerprint not in PREGLOBAL_CARS:
ret.cruiseState.standstill = cp_cam.vl["ES_DashStatus"]["Cruise_State"] == 3
if (self.car_fingerprint in PREGLOBAL_CARS and cp.vl["Dash_State2"]["UNITS"] == 1) or \
(self.car_fingerprint not in PREGLOBAL_CARS and cp.vl["Dashlights"]["UNITS"] == 1):
ret.cruiseState.speed *= CV.MPH_TO_KPH

@ -1 +1 @@
01e23eec1394b07d2c537f0e28493b10e05923c2
20c140b10eef52b6f6d6b9e142ed944264865bac
Loading…
Cancel
Save