From 654abc4104d5357f717bc1ae8e2ef70c7bfcd29c Mon Sep 17 00:00:00 2001 From: kegman Date: Sun, 16 Dec 2018 00:07:13 -0500 Subject: [PATCH 1/4] Always send loud alert when cruise disables For users without the pedal there are sometimes instances where 1. the car brakes because lead car is slowing, 2. the car falls below the minimum cruise threshold and cruise disables 3. the lead car pulls away 4. car is now below cruise so can't accelerate, the non-loud alert is displayed and OP is disabled - the user doesn't notice 5. the lead car brakes 6. the user is caught flat footed because they weren't aware that step 4 happened because couldn't hear / see the subtle alert that OP was disabled This is a safety concern as it happened to me a few times before I got my pedal. Sending the loud alert mitigates this risk. --- selfdrive/car/honda/interface.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index e6c4ed4de1ef93..c7097afe8c6c0f 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -543,10 +543,8 @@ def update(self, c): # it can happen that car cruise disables while comma system is enabled: need to # keep braking if needed or if the speed is very low if self.CP.enableCruise and not ret.cruiseState.enabled and c.actuators.brake <= 0.: - # non loud alert if cruise disbales below 25mph as expected (+ a little margin) + # send loud alert if cruise disables below 25mph as expected (+ a little margin) if ret.vEgo < self.CP.minEnableSpeed + 2.: - events.append(create_event('speedTooLow', [ET.IMMEDIATE_DISABLE])) - else: events.append(create_event("cruiseDisabled", [ET.IMMEDIATE_DISABLE])) if self.CS.CP.minEnableSpeed > 0 and ret.vEgo < 0.001: events.append(create_event('manualRestart', [ET.WARNING])) From 4bdeffeca867eecfca9dc439e46e439994cc1ec6 Mon Sep 17 00:00:00 2001 From: kegman Date: Wed, 19 Dec 2018 15:59:56 -0500 Subject: [PATCH 2/4] Revert "Always send loud alert when cruise disables" This reverts commit 654abc4104d5357f717bc1ae8e2ef70c7bfcd29c. --- selfdrive/car/honda/interface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index c7097afe8c6c0f..e6c4ed4de1ef93 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -543,8 +543,10 @@ def update(self, c): # it can happen that car cruise disables while comma system is enabled: need to # keep braking if needed or if the speed is very low if self.CP.enableCruise and not ret.cruiseState.enabled and c.actuators.brake <= 0.: - # send loud alert if cruise disables below 25mph as expected (+ a little margin) + # non loud alert if cruise disbales below 25mph as expected (+ a little margin) if ret.vEgo < self.CP.minEnableSpeed + 2.: + events.append(create_event('speedTooLow', [ET.IMMEDIATE_DISABLE])) + else: events.append(create_event("cruiseDisabled", [ET.IMMEDIATE_DISABLE])) if self.CS.CP.minEnableSpeed > 0 and ret.vEgo < 0.001: events.append(create_event('manualRestart', [ET.WARNING])) From 677d22a17d0b6f4e24d2cd02070bd51bea907340 Mon Sep 17 00:00:00 2001 From: kegman Date: Wed, 19 Dec 2018 16:34:20 -0500 Subject: [PATCH 3/4] Louder alert when OP disengages under cruise min speed --- selfdrive/controls/lib/alerts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/alerts.py b/selfdrive/controls/lib/alerts.py index cc9b19d5d4fa70..54deaad74502c3 100644 --- a/selfdrive/controls/lib/alerts.py +++ b/selfdrive/controls/lib/alerts.py @@ -432,7 +432,7 @@ def __gt__(self, alert2): "openpilot Canceled", "Speed too low", AlertStatus.normal, AlertSize.mid, - Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.), + Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 1., 3., 4.), Alert( "invalidGiraffeHonda", From 403c3ab574c293ad2b231babf00a51955955e293 Mon Sep 17 00:00:00 2001 From: kegman Date: Wed, 19 Dec 2018 16:39:27 -0500 Subject: [PATCH 4/4] Call speedTooLowNoEntry if OP not engaged --- selfdrive/car/honda/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index e6c4ed4de1ef93..f0d1f5acdde207 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -530,7 +530,7 @@ def update(self, c): events.append(create_event('parkBrake', [ET.NO_ENTRY, ET.USER_DISABLE])) if self.CP.enableCruise and ret.vEgo < self.CP.minEnableSpeed: - events.append(create_event('speedTooLow', [ET.NO_ENTRY])) + events.append(create_event('speedTooLowNoEntry', [ET.NO_ENTRY])) # disable on pedals rising edge or when brake is pressed and speed isn't zero if (ret.gasPressed and not self.gas_pressed_prev) or \