From b460d2ae90a617119a96ac211e19a9c4420b5463 Mon Sep 17 00:00:00 2001 From: Gernby Date: Tue, 2 Apr 2019 02:21:23 -0500 Subject: [PATCH] Eliminate unnecessary temporary disengagements (#584) This status was defined as a bump error, but it isn't actually due to bumps. It's also triggered by driver overrides that are somewhat higher than the "steer_override" threshold. By removing this temporary disengagement, the car is much more predictable on bumpy roads AND in turns that require assistance from the driver. old-commit-hash: ca2f30989de8881b068609980fafe68a10b9e3a8 --- selfdrive/car/honda/carstate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index f4c7cade8c..718e7ae61e 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -198,11 +198,11 @@ class CarState(object): cp.vl["DOORS_STATUS"]['DOOR_OPEN_RL'], cp.vl["DOORS_STATUS"]['DOOR_OPEN_RR']]) self.seatbelt = not cp.vl["SEATBELT_STATUS"]['SEATBELT_DRIVER_LAMP'] and cp.vl["SEATBELT_STATUS"]['SEATBELT_DRIVER_LATCHED'] - # 2 = temporary; 3 = TBD; 4 = temporary, hit a bump; 5 = (permanent); 6 = temporary; 7 = (permanent) + # 2 = temporary; 3 = TBD; 4 = significant steering wheel torque; 5 = (permanent); 6 = temporary; 7 = (permanent) # TODO: Use values from DBC to parse this field self.steer_error = cp.vl["STEER_STATUS"]['STEER_STATUS'] not in [0, 2, 3, 4, 6] - self.steer_not_allowed = cp.vl["STEER_STATUS"]['STEER_STATUS'] != 0 - self.steer_warning = cp.vl["STEER_STATUS"]['STEER_STATUS'] not in [0, 3] # 3 is low speed lockout, not worth a warning + self.steer_not_allowed = cp.vl["STEER_STATUS"]['STEER_STATUS'] not in [0, 4] # 4 can be caused by bump OR steering nudge from driver + self.steer_warning = cp.vl["STEER_STATUS"]['STEER_STATUS'] not in [0, 3, 4] # 3 is low speed lockout, not worth a warning if self.CP.radarOffCan: self.brake_error = 0 else: