1
0
forked from IQ.Lvbs/IQ.Pilot

Update selfdrive/selfdrived/selfdrived.py

This commit is contained in:
2026-08-26 11:49:49 -05:00
parent 9f9c9a70cc
commit fa2f1f0f11

View File

@@ -431,13 +431,13 @@ class SelfdriveD(GapButtonActions):
cloudlog.event("process_not_running", not_running=not_running, error=True)
self.not_running_prev = not_running
if self.sm.recv_frame['managerState'] and (not_running - self.ignored_processes):
self.events.add(EventName.processNotRunning)
pass#self.events.add(EventName.processNotRunning)
if 'iqmodeld' in not_running and self.model_download_pending:
self.events_iq.add(custom.IQOnroadEvent.EventName.modelUpdating)
else:
if not SIMULATION and not self.rk.lagging:
if not self.sm.all_alive(self.camera_packets):
self.events.add(EventName.cameraMalfunction)
pass#self.events.add(EventName.cameraMalfunction)
elif not self.sm.all_freq_ok(self.camera_packets):
self.events.add(EventName.cameraFrameRate)
if not REPLAY and self.rk.lagging:
@@ -470,9 +470,9 @@ class SelfdriveD(GapButtonActions):
comm_issue_state = (tuple(logs['not_alive']), tuple(logs['not_freq_ok']))
if (has_not_alive or has_not_freq) and no_system_errors:
if has_not_alive:
self.events.add(EventName.commIssue)
pass#self.events.add(EventName.commIssue)
else:
self.events.add(EventName.commIssueAvgFreq)
pass#self.events.add(EventName.commIssueAvgFreq)
if comm_issue_state != self.logged_comm_issue:
cloudlog.event("commIssue", error=True, **logs)
@@ -488,7 +488,7 @@ class SelfdriveD(GapButtonActions):
# conservative HW alert. if the data or frequency are off, locationd will throw an error
if any((self.sm.frame - self.sm.recv_frame[s])*DT_CTRL > 10. for s in self.sensor_packets):
self.events.add(EventName.sensorDataInvalid)
pass#self.events.add(EventName.sensorDataInvalid)
if not REPLAY:
# Check for mismatch between openpilot and car's PCM
@@ -523,7 +523,7 @@ class SelfdriveD(GapButtonActions):
# GPS checks
gps_ok = self.sm.recv_frame[self.gps_location_service] > 0 and (self.sm.frame - self.sm.recv_frame[self.gps_location_service]) * DT_CTRL < 2.0
if not gps_ok and self.sm['livePose'].inputsOK and (self.distance_traveled > 1500):
self.events.add(EventName.noGps)
pass#self.events.add(EventName.noGps)
if gps_ok:
self.distance_traveled = 0
self.distance_traveled += abs(CS.vEgo) * DT_CTRL