mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-14 00:52:05 +00:00
Put back
This commit is contained in:
parent
2853323379
commit
d47f74dc06
@ -1791,19 +1791,21 @@ bool GPS::whileActive()
|
|||||||
}
|
}
|
||||||
void GPS::enable()
|
void GPS::enable()
|
||||||
{
|
{
|
||||||
LOG_INFO("GPS - enabling");
|
LOG_INFO("GPS - disabling");
|
||||||
// ensure we are marked as enabled in config
|
// Clear the old scheduling info (reset the lock-time prediction)
|
||||||
config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED;
|
scheduling.reset();
|
||||||
// Start our thread
|
|
||||||
setIntervalFromNow(0); // Run right away
|
enabled = true;
|
||||||
shouldPublish = true;
|
setInterval(GPS_THREAD_INTERVAL);
|
||||||
|
|
||||||
|
scheduling.informSearching();
|
||||||
|
setPowerState(GPS_ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t GPS::disable()
|
int32_t GPS::disable()
|
||||||
{
|
{
|
||||||
LOG_INFO("GPS - disabling");
|
LOG_INFO("GPS - disabling");
|
||||||
config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_DISABLED;
|
enabled = false;
|
||||||
|
|
||||||
// Clear any resources
|
// Clear any resources
|
||||||
setPowerState(GPS_OFF);
|
setPowerState(GPS_OFF);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user