Check Startup Cruise After Vehicle Events

This commit is contained in:
firestar5683
2026-11-28 11:58:37 -06:00
parent f688655147
commit 5344126ab0
+5 -5
View File
@@ -483,11 +483,6 @@ class SelfdriveD:
set_offroad_alert("Offroad_DriverMonitoringUncertain", True)
self.dm_uncertain_alerted = True
if not getattr(self, "startup_cruise_checked", False) and CS.canValid and not CS.canTimeout:
self.startup_cruise_checked = True
if CS.cruiseState.enabled and not CS.accFaulted and not self.events.contains(ET.ENABLE) and not REPLAY:
self.events.add(EventName.startupCruiseCanceled)
# Create events for temperature, disk space, and memory
if self.sm['deviceState'].thermalStatus >= ThermalStatus.overheated:
self.events.add(EventName.overheat)
@@ -632,6 +627,11 @@ class SelfdriveD:
if self.car_event_sample_count > 1:
for event in envelope_errors:
self.events.add(event)
if not getattr(self, "startup_cruise_checked", False) and CS.canValid and not envelope_errors:
self.startup_cruise_checked = True
if CS.cruiseState.enabled and not CS.accFaulted and not self.events.contains(ET.ENABLE) and not REPLAY:
self.events.add(EventName.startupCruiseCanceled)
self.event_car_state = CS
if reconcile_input:
self._update_steering_authority(CS)