fix: BUG-11 — Dashboard GPS now shows lat/lon from API when stale, Status page uses same 30s staleness threshold
This commit is contained in:
+4
-1
@@ -215,7 +215,10 @@ function renderHealth(health) {
|
||||
|
||||
function renderGpsAndCellular(gps, cellularHat) {
|
||||
const liveFix = gps.thread_alive && gps.has_fix;
|
||||
if (liveFix) {
|
||||
const staleFix = liveFix && gps.fix_age_seconds != null && gps.fix_age_seconds > 30;
|
||||
if (staleFix) {
|
||||
setBadge('gps-badge', 'Stale fix', 'text-bg-warning');
|
||||
} else if (liveFix) {
|
||||
setBadge('gps-badge', 'Live fix', 'text-bg-success');
|
||||
} else if (gps.thread_alive) {
|
||||
setBadge('gps-badge', 'No fix', 'text-bg-warning');
|
||||
|
||||
Reference in New Issue
Block a user