mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-12-02 02:13:41 +08:00
Check Startup Cruise After Vehicle Events
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user