mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-14 17:12:08 +00:00
Removed DOP to string utility function from GPS.cpp since it's now drawn directly in screen.cpp
This commit is contained in:
parent
c66e064f42
commit
d8287e9cdb
@ -68,19 +68,6 @@ void perhapsSetRTC(struct tm &t)
|
|||||||
perhapsSetRTC(&tv);
|
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 <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
uint32_t getTime()
|
uint32_t getTime()
|
||||||
|
@ -334,7 +334,6 @@ void loop()
|
|||||||
screen.debug()->setNodeNumbersStatus(nodeDB.getNumOnlineNodes(), nodeDB.getNumNodes());
|
screen.debug()->setNodeNumbersStatus(nodeDB.getNumOnlineNodes(), nodeDB.getNumNodes());
|
||||||
screen.debug()->setChannelNameStatus(channelSettings.name);
|
screen.debug()->setChannelNameStatus(channelSettings.name);
|
||||||
screen.debug()->setPowerStatus(powerStatus);
|
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)
|
// 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.
|
// i.e. don't just keep spinning in loop as fast as we can.
|
||||||
|
Loading…
Reference in New Issue
Block a user