Update moving backward definition

pull/31257/head
Eric Brown 1 year ago
parent dc5ad73b11
commit eda99eb0e9
  1. 3
      selfdrive/car/gm/carstate.py

@ -33,7 +33,8 @@ class CarState(CarStateBase):
self.cruise_buttons = pt_cp.vl["ASCMSteeringButton"]["ACCButtons"] self.cruise_buttons = pt_cp.vl["ASCMSteeringButton"]["ACCButtons"]
self.buttons_counter = pt_cp.vl["ASCMSteeringButton"]["RollingCounter"] self.buttons_counter = pt_cp.vl["ASCMSteeringButton"]["RollingCounter"]
self.pscm_status = copy.copy(pt_cp.vl["PSCMStatus"]) self.pscm_status = copy.copy(pt_cp.vl["PSCMStatus"])
self.moving_backward = (pt_cp.vl["EBCMWheelSpdRear"]["MovingBackward"] != 0) and not (pt_cp.vl["EBCMWheelSpdRear"]["MovingForward"] != 0) # 0 - unknown, 1 - forward, 2 - reverse, 3 - unsupported, 4 - fault
self.moving_backward = (pt_cp.vl["EBCMWheelSpdRear"]["RLWheelDir"] != 2) and (pt_cp.vl["EBCMWheelSpdRear"]["RRWheelDir"] != 2)
# Variables used for avoiding LKAS faults # Variables used for avoiding LKAS faults
self.loopback_lka_steering_cmd_updated = len(loopback_cp.vl_all["ASCMLKASteeringCmd"]["RollingCounter"]) > 0 self.loopback_lka_steering_cmd_updated = len(loopback_cp.vl_all["ASCMLKASteeringCmd"]["RollingCounter"]) > 0

Loading…
Cancel
Save