Compare commits

..

8 Commits

Author SHA1 Message Date
royjr 87ea97ce6a Merge branch 'master' into ccnc-port-alert-dedup 2026-09-06 15:46:33 -04:00
royjr 112d2fa559 Merge branch 'master' into ccnc-port-alert-dedup 2026-09-03 08:01:13 -04:00
royjr 82585cd6b2 Update opendbc_repo 2026-09-03 08:01:07 -04:00
royjr ed55ce98f8 move to mads 2026-08-30 16:59:42 -04:00
royjr 42cd751550 one liner 2026-08-24 01:38:50 -04:00
royjr 4950efbf94 Update selfdrived.py 2026-08-24 01:25:52 -04:00
royjr dc0a1b0dca Update selfdrived.py 2026-08-24 01:17:32 -04:00
royjr fa433ae25f alert-dedup 2026-08-24 01:08:56 -04:00
2 changed files with 6 additions and 1 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:
if self.enabled or self.mads.clear_no_entry:
clear_event_types.add(ET.NO_ENTRY)
pers = LONGITUDINAL_PERSONALITY_MAP[self.personality]
+5
View File
@@ -10,6 +10,7 @@ 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
@@ -33,6 +34,7 @@ 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
@@ -218,5 +220,8 @@ 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