From e9b318073793fd922c672d219cdce7c316dea60c Mon Sep 17 00:00:00 2001 From: whoisdomi Date: Thu, 17 Sep 2026 13:56:01 -0500 Subject: [PATCH] see sat 2 --- selfdrive/ui/onroad/starpilot/gnss_health.py | 13 ++++++++++--- selfdrive/ui/ui_state.py | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/selfdrive/ui/onroad/starpilot/gnss_health.py b/selfdrive/ui/onroad/starpilot/gnss_health.py index 829b478b40..1e4b9dcc41 100644 --- a/selfdrive/ui/onroad/starpilot/gnss_health.py +++ b/selfdrive/ui/onroad/starpilot/gnss_health.py @@ -55,6 +55,16 @@ class GnssHealth: def _update(self) -> None: sm = ui_state.sm + + # qcomgpsd publishes gpsLocation; gpsLocationExternal is only used by ublox/car-GPS devices, + # so checking that socket alone leaves hasFix stuck False on this hardware. + for service in ("gpsLocation", "gpsLocationExternal"): + if sm.valid.get(service, False) and sm.recv_frame[service] > 0: + self._has_fix = sm[service].hasFix + break + + # qcomGnss multiplexes measurement/drMeasurement/svPoly, so only act on the variant that + # carries per-satellite status rather than returning early on the others. if not sm.valid.get("qcomGnss", False): return @@ -77,9 +87,6 @@ class GnssHealth: noise = [sv.carrierNoise for sv in svs if sv.carrierNoise > 0] self._cno = sum(noise) / len(noise) if noise else 0.0 - if sm.valid.get("gpsLocationExternal", False): - self._has_fix = sm["gpsLocationExternal"].hasFix - def render(self, bounds: rl.Rectangle) -> None: self._update() diff --git a/selfdrive/ui/ui_state.py b/selfdrive/ui/ui_state.py index 4f4497ef8d..b9fca33ce1 100644 --- a/selfdrive/ui/ui_state.py +++ b/selfdrive/ui/ui_state.py @@ -64,6 +64,7 @@ class UIState: "selfdriveState", "longitudinalPlan", "gpsLocationExternal", + "gpsLocation", "qcomGnss", "mapdOut", "carOutput",