From 2aa2031352b7727468fc8f433c0b67dd5a8e8c14 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 28 Jan 2022 14:29:40 -0800 Subject: [PATCH] Honda: minor carState cleanup --- selfdrive/car/honda/carstate.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index 75f8d23204..e745dcd161 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -163,6 +163,7 @@ class CarState(CarStateBase): self.shifter_values = can_define.dv[self.gearbox_msg]["GEAR_SHIFTER"] self.steer_status_values = defaultdict(lambda: "UNKNOWN", can_define.dv["STEER_STATUS"]["STEER_STATUS"]) + self.brake_error = False self.brake_switch_prev = 0 self.brake_switch_prev_ts = 0 self.cruise_setting = 0 @@ -203,9 +204,7 @@ class CarState(CarStateBase): # LOW_SPEED_LOCKOUT is not worth a warning ret.steerWarning = steer_status not in ("NORMAL", "LOW_SPEED_LOCKOUT", "NO_TORQUE_ALERT_2") - if not self.CP.openpilotLongitudinalControl: - self.brake_error = 0 - else: + 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