From fd79d0150a674d6dfd4297745b3b441145590e70 Mon Sep 17 00:00:00 2001 From: rbiasini Date: Thu, 29 Nov 2018 20:36:34 -0800 Subject: [PATCH] Honda Nidec: avoid giraffe setting alert when car is turned off (#449) old-commit-hash: 9d76070ab71bb46dd5b62abe58554eb24521c5c5 --- selfdrive/car/honda/interface.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index 3ab57b899e..e074900e59 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -494,12 +494,15 @@ class CarInterface(object): events.append(create_event('commIssue', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) else: self.can_invalid_count = 0 + if not self.CS.cam_can_valid and self.CP.enableCamera: self.cam_can_invalid_count += 1 - if self.cam_can_invalid_count >= 5 and self.CS.CP.carFingerprint not in HONDA_BOSCH: + # wait 1.0s before throwing the alert to avoid it popping when you turn off the car + if self.cam_can_invalid_count >= 100 and self.CS.CP.carFingerprint not in HONDA_BOSCH: events.append(create_event('invalidGiraffeHonda', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT])) else: self.cam_can_invalid_count = 0 + if self.CS.steer_error: events.append(create_event('steerUnavailable', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT])) elif self.CS.steer_warning: