no gps warning after 5 minutes (#1692)

This commit is contained in:
Willem Melching
2020-06-12 16:03:35 -07:00
committed by GitHub
parent 1ea80bedad
commit 684f7b2cc0
3 changed files with 11 additions and 1 deletions
+1 -1
Submodule cereal updated: b93b165a5c...d4d52a567b
+2
View File
@@ -202,6 +202,8 @@ class Controls:
if not self.sm['liveLocationKalman'].inputsOK and os.getenv("NOSENSOR") is None:
if self.sm.frame > 5 / DT_CTRL: # Give locationd some time to receive all the inputs
self.events.add(EventName.sensorDataInvalid)
if not self.sm['liveLocationKalman'].gpsOK and os.getenv("NOSENSOR") is None:
self.events.add(EventName.noGps)
if not self.sm['pathPlan'].paramsValid:
self.events.add(EventName.vehicleModelInvalid)
if not self.sm['liveLocationKalman'].posenetOK:
+8
View File
@@ -517,6 +517,14 @@ EVENTS = {
ET.NO_ENTRY: NoEntryAlert("No Data from Device Sensors"),
},
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.),
},
EventName.soundsUnavailable: {
ET.PERMANENT: Alert(
"Speaker not found",