adjust gps alert

old-commit-hash: 6ef95f7a91
pull/32199/head
Adeeb Shihadeh 12 months ago
parent 3d19b4fe3a
commit a6faeb03ce
  1. 2
      cereal
  2. 2
      selfdrive/controls/controlsd.py
  3. 16
      selfdrive/controls/lib/events.py

@ -1 +1 @@
Subproject commit 861144c136c91f70dcbc652c2ffe99f57440ad47 Subproject commit 284206878d6184747b1e1af03f91ac9e718ff326

@ -386,7 +386,7 @@ class Controls:
# TODO: fix simulator # TODO: fix simulator
if not SIMULATION or REPLAY: if not SIMULATION or REPLAY:
# Not show in first 1 km to allow for driving out of garage. This event shows after 5 minutes # Not show in first 1 km to allow for driving out of garage. This event shows after 5 minutes
if not self.sm['liveLocationKalman'].gpsOK and self.sm['liveLocationKalman'].inputsOK and (self.distance_traveled > 1000): if not self.sm['liveLocationKalman'].gpsOK and self.sm['liveLocationKalman'].inputsOK and (self.distance_traveled > 1500):
self.events.add(EventName.noGps) self.events.add(EventName.noGps)
if self.sm['liveLocationKalman'].gpsOK: if self.sm['liveLocationKalman'].gpsOK:
self.distance_traveled = 0 self.distance_traveled = 0

@ -251,13 +251,6 @@ def calibration_incomplete_alert(CP: car.CarParams, CS: car.CarState, sm: messag
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2) Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2)
def no_gps_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
return Alert(
"Poor GPS reception",
"Hardware malfunctioning if sky is visible",
AlertStatus.normal, AlertSize.mid,
Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=300.)
# *** debug alerts *** # *** debug alerts ***
def out_of_space_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: def out_of_space_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
@ -559,9 +552,6 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
}, },
# Unused # Unused
EventName.gpsMalfunction: {
ET.PERMANENT: NormalPermanentAlert("GPS Malfunction", "Likely Hardware Issue"),
},
EventName.locationdTemporaryError: { EventName.locationdTemporaryError: {
ET.NO_ENTRY: NoEntryAlert("locationd Temporary Error"), ET.NO_ENTRY: NoEntryAlert("locationd Temporary Error"),
@ -696,7 +686,11 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
}, },
EventName.noGps: { EventName.noGps: {
ET.PERMANENT: no_gps_alert, ET.PERMANENT: Alert(
"Poor GPS reception",
"Ensure device has a clear view of the sky",
AlertStatus.normal, AlertSize.mid,
Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=600.)
}, },
EventName.soundsUnavailable: { EventName.soundsUnavailable: {

Loading…
Cancel
Save