mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-07 14:42:08 +08:00
update no GPS alert for comma two users
old-commit-hash: b3101998ed6457e83e326f87be9f062ac97c0030
This commit is contained in:
@@ -166,6 +166,9 @@ class EngagementAlert(Alert):
|
||||
Priority.MID, VisualAlert.none,
|
||||
audible_alert, .2, 0., 0.),
|
||||
|
||||
|
||||
# ********** alert callback functions **********
|
||||
|
||||
def below_steer_speed_alert(CP, sm, metric):
|
||||
speed = int(round(CP.minSteerSpeed * (CV.MS_TO_KPH if metric else CV.MS_TO_MPH)))
|
||||
unit = "kph" if metric else "mph"
|
||||
@@ -184,6 +187,14 @@ def calibration_incomplete_alert(CP, sm, metric):
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2)
|
||||
|
||||
def no_gps_alert(CP, sm, metric):
|
||||
two = sm['thermal'].hwType == log.HealthData.HwType.uno
|
||||
return Alert(
|
||||
"Poor GPS reception",
|
||||
"Contact Support" if two else "Check GPS antenna placement",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2, creation_delay=300.),
|
||||
|
||||
EVENTS = {
|
||||
# ********** events with no alerts **********
|
||||
|
||||
@@ -536,11 +547,7 @@ EVENTS = {
|
||||
},
|
||||
|
||||
EventName.noGps: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Poor GPS reception",
|
||||
"Check GPS antenna placement",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2, creation_delay=300.),
|
||||
ET.PERMANENT: no_gps_alert,
|
||||
},
|
||||
|
||||
EventName.soundsUnavailable: {
|
||||
|
||||
Reference in New Issue
Block a user