mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-03 08:41:41 +08:00
Update selfdrived.py radar disable failure calls
This commit is contained in:
@@ -45,6 +45,7 @@ LaneChangeDirection = log.LaneChangeDirection
|
||||
EventName = log.OnroadEvent.EventName
|
||||
ButtonType = car.CarState.ButtonEvent.Type
|
||||
SafetyModel = car.CarParams.SafetyModel
|
||||
DashcamOnlyReason = car.CarParams.DashcamOnlyReason
|
||||
TurnDirection = custom.ModelDataV2SP.TurnDirection
|
||||
|
||||
IGNORED_SAFETY_MODES = (SafetyModel.silent, SafetyModel.noOutput)
|
||||
@@ -161,7 +162,10 @@ class SelfdriveD(CruiseHelper):
|
||||
self.events.add(EventName.carUnrecognized, static=True)
|
||||
set_offroad_alert("Offroad_CarUnrecognized", True)
|
||||
elif self.CP.passive:
|
||||
self.events.add(EventName.dashcamMode, static=True)
|
||||
if self.CP.dashcamOnlyReason == DashcamOnlyReason.radarDisableEngineOn:
|
||||
self.events.add(EventName.dashcamModeRadDisEngOn, static=True)
|
||||
else:
|
||||
self.events.add(EventName.dashcamMode, static=True)
|
||||
|
||||
self.events_sp = EventsSP()
|
||||
self.events_sp_prev = []
|
||||
@@ -237,6 +241,9 @@ class SelfdriveD(CruiseHelper):
|
||||
(CS.regenBraking and (not self.CS_prev.regenBraking or not CS.standstill)):
|
||||
self.events.add(EventName.pedalPressed)
|
||||
|
||||
if CS.radarDisableFailed:
|
||||
self.events.add(EventName.radarDisableFailed)
|
||||
|
||||
# Create events for temperature, disk space, and memory
|
||||
if self.sm['deviceState'].thermalStatus >= ThermalStatus.red:
|
||||
self.events.add(EventName.overheat)
|
||||
|
||||
Reference in New Issue
Block a user