From d8287e9cdb3dd69a58bbcf8a1dbdabb0a045a57a Mon Sep 17 00:00:00 2001 From: Professr Date: Sun, 21 Jun 2020 17:43:34 -0700 Subject: [PATCH] Removed DOP to string utility function from GPS.cpp since it's now drawn directly in screen.cpp --- src/gps/GPS.cpp | 13 ------------- src/main.cpp | 1 - 2 files changed, 14 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 5b0ad0d74..bb2d30b54 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -68,19 +68,6 @@ void perhapsSetRTC(struct tm &t) perhapsSetRTC(&tv); } -// Generate a string representation of the DOP -// based on Wikipedia "meaning of DOP values" https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)#Meaning_of_DOP_Values -const char *getDOPString(uint32_t dop) { - dop = dop / 100; - if(dop <= 1) return "GPS Ideal"; - if(dop <= 2) return "GPS Exc."; - if(dop <= 5) return "GPS Good"; - if(dop <= 10) return "GPS Mod."; - if(dop <= 20) return "GPS Fair"; - if(dop > 0) return "GPS Poor"; - return "invalid dop"; -} - #include uint32_t getTime() diff --git a/src/main.cpp b/src/main.cpp index 4f55b593a..78a162454 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -334,7 +334,6 @@ void loop() screen.debug()->setNodeNumbersStatus(nodeDB.getNumOnlineNodes(), nodeDB.getNumNodes()); screen.debug()->setChannelNameStatus(channelSettings.name); screen.debug()->setPowerStatus(powerStatus); - screen.debug()->setGPSStatus(gps->isConnected ? (gps->hasLock() ? getDOPString(gps->dop) : "No Sats") : "No GPS"); // No GPS lock yet, let the OS put the main CPU in low power mode for 100ms (or until another interrupt comes in) // i.e. don't just keep spinning in loop as fast as we can.