mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
add air530 gps sleep support
This commit is contained in:
@@ -85,3 +85,20 @@ uint32_t getValidTime()
|
||||
{
|
||||
return timeSetFromGPS ? getTime() : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch the GPS into a mode where we are actively looking for a lock, or alternatively switch GPS into a low power mode
|
||||
*
|
||||
* calls sleep/wake
|
||||
*/
|
||||
void GPS::setWantLocation(bool on)
|
||||
{
|
||||
if (wantNewLocation != on) {
|
||||
wantNewLocation = on;
|
||||
DEBUG_MSG("WANT GPS=%d\n", on);
|
||||
if (on)
|
||||
wake();
|
||||
else
|
||||
sleep();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user