From 74deb2b95cc920921764e2c8ac9dc33a446fc1d8 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sun, 27 Jan 2019 21:20:09 +0100 Subject: [PATCH] display.cpp: do not show SAT if no NMEA data seen --- src/display.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/display.cpp b/src/display.cpp index b3a3464d..f52286ec 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -156,17 +156,20 @@ void refreshtheDisplay() { // update GPS status (line 2) #ifdef HAS_GPS - u8x8.setCursor(9, 2); - if (!gps.location.isValid()) // if no fix then display Sats value inverse - { - u8x8.setInverseFont(1); - u8x8.printf("Sats:%.2d", gps.satellites.value()); - u8x8.setInverseFont(0); - } else - u8x8.printf("Sats:%.2d", gps.satellites.value()); + // have we ever got valid gps data? + if (gps.passedChecksum() > 0) { + u8x8.setCursor(9, 2); + if (!gps.location.isValid()) // if no fix then display Sats value inverse + { + u8x8.setInverseFont(1); + u8x8.printf("Sats:%.2d", gps.satellites.value()); + u8x8.setInverseFont(0); + } else + u8x8.printf("Sats:%.2d", gps.satellites.value()); + } #endif - // update bluetooth counter + LoRa SF (line 3) + // update bluetooth counter + LoRa SF (line 3) #ifdef BLECOUNTER u8x8.setCursor(0, 3); if (cfg.blescan)