mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-29 19:03:52 +00:00
Use fixed position regardless of gps lock (#2744)
This commit is contained in:
parent
c2ae38405e
commit
03dc36ea12
@ -327,16 +327,16 @@ int MeshService::onGPSChanged(const meshtastic::GPSStatus *newStatus)
|
|||||||
// load data from GPS object, will add timestamp + battery further down
|
// load data from GPS object, will add timestamp + battery further down
|
||||||
pos = gps->p;
|
pos = gps->p;
|
||||||
} else {
|
} else {
|
||||||
// The GPS has lost lock, if we are fixed position we should just keep using
|
// The GPS has lost lock
|
||||||
// the old position
|
|
||||||
#ifdef GPS_EXTRAVERBOSE
|
#ifdef GPS_EXTRAVERBOSE
|
||||||
LOG_DEBUG("onGPSchanged() - lost validLocation\n");
|
LOG_DEBUG("onGPSchanged() - lost validLocation\n");
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
// Used fixed position if configured regalrdless of GPS lock
|
||||||
if (config.position.fixed_position) {
|
if (config.position.fixed_position) {
|
||||||
LOG_WARN("Using fixed position\n");
|
LOG_WARN("Using fixed position\n");
|
||||||
pos = ConvertToPosition(node->position);
|
pos = ConvertToPosition(node->position);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Finally add a fresh timestamp and battery level reading
|
// Finally add a fresh timestamp and battery level reading
|
||||||
// I KNOW this is redundant with refreshLocalMeshNode() above, but these are
|
// I KNOW this is redundant with refreshLocalMeshNode() above, but these are
|
||||||
|
Loading…
Reference in New Issue
Block a user