Compare commits

..

6 Commits

Author SHA1 Message Date
royjr 820f723596 Merge branch 'master' into alert-dedup 2026-09-06 15:46:55 -04:00
royjr 45e5620b13 Merge branch 'master' into alert-dedup 2026-09-03 08:01:35 -04:00
royjr 1c3558e017 one liner 2026-08-24 01:37:10 -04:00
royjr bf567847de Update selfdrived.py 2026-08-24 01:30:43 -04:00
royjr bd1d54e239 Update selfdrived.py 2026-08-24 01:30:43 -04:00
royjr 8d49466b62 alert-dedup 2026-08-24 01:30:43 -04:00
3 changed files with 2 additions and 7 deletions
+1 -1
View File
@@ -576,7 +576,7 @@ class SelfdriveD(CruiseHelper):
clear_event_types = set()
if ET.WARNING not in self.state_machine.current_alert_types:
clear_event_types.add(ET.WARNING)
if self.enabled or self.mads.clear_no_entry:
if self.enabled or (ET.NO_ENTRY not in (c := self.state_machine.current_alert_types) and (ET.ENABLE in c or ET.USER_DISABLE in c)):
clear_event_types.add(ET.NO_ENTRY)
pers = LONGITUDINAL_PERSONALITY_MAP[self.personality]
-5
View File
@@ -10,7 +10,6 @@ from openpilot.cereal import log, custom
from opendbc.car import structs
from opendbc.car.hyundai.values import HyundaiFlags
from openpilot.common.params import Params
from openpilot.selfdrive.selfdrived.events import ET
from openpilot.sunnypilot.mads.helpers import MadsSteeringModeOnBrake, read_steering_mode_param, MADS_NO_ACC_MAIN_BUTTON
from openpilot.sunnypilot.mads.state import StateMachine, GEARS_ALLOW_PAUSED_SILENT
@@ -34,7 +33,6 @@ class ModularAssistiveDrivingSystem:
self.enabled = False
self.active = False
self.available = False
self.clear_no_entry = False
self.lateral_mismatch_counter = 0
self.allow_always = False
self.no_main_cruise = False
@@ -220,8 +218,5 @@ class ModularAssistiveDrivingSystem:
if not self.CP.passive and self.selfdrive.initialized:
self.enabled, self.active = self.state_machine.update()
cat = self.selfdrive.state_machine.current_alert_types
self.clear_no_entry = (ET.ENABLE in cat or ET.USER_DISABLE in cat) and ET.NO_ENTRY not in cat
# Copy of previous SelfdriveD states for MADS events handling
self.selfdrive.enabled_prev = self.selfdrive.enabled