cause a cruise fault

pull/27731/head
Shane Smiskol 2 years ago
parent 3931517c16
commit 09a6469ac6
  1. 4
      selfdrive/car/honda/carcontroller.py
  2. 4
      selfdrive/car/honda/carstate.py

@ -138,6 +138,7 @@ class CarController:
self.gas = 0.0
self.brake = 0.0
self.last_steer = 0.0
self.stop_sending_acc = False
def update(self, CC, CS, now_nanos):
actuators = CC.actuators
@ -234,6 +235,9 @@ class CarController:
stopping = actuators.longControlState == LongCtrlState.stopping
self.stopping_counter = self.stopping_counter + 1 if stopping else 0
if CC.enabled:
self.stop_sending_acc = True
if not self.stop_sending_acc:
can_sends.extend(hondacan.create_acc_commands(self.packer, CC.enabled, CC.longActive, self.accel, self.gas,
self.stopping_counter, self.CP.carFingerprint))
else:

@ -191,8 +191,8 @@ class CarState(CarStateBase):
# NO_TORQUE_ALERT_2 can be caused by bump or steering nudge from driver
ret.steerFaultTemporary = steer_status not in ("NORMAL", "LOW_SPEED_LOCKOUT", "NO_TORQUE_ALERT_2")
if self.CP.openpilotLongitudinalControl:
self.brake_error = cp.vl["STANDSTILL"]["BRAKE_ERROR_1"] or cp.vl["STANDSTILL"]["BRAKE_ERROR_2"]
# if self.CP.openpilotLongitudinalControl:
# self.brake_error = cp.vl["STANDSTILL"]["BRAKE_ERROR_1"] or cp.vl["STANDSTILL"]["BRAKE_ERROR_2"]
ret.espDisabled = cp.vl["VSA_STATUS"]["ESP_DISABLED"] != 0
ret.wheelSpeeds = self.get_wheel_speeds(

Loading…
Cancel
Save