mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Merge pull request #430 from oltaco/gps-update-fix
fix: EnvironmentSensorManager.cpp: don't update location if GPS is turned off
This commit is contained in:
commit
485749a053
1 changed files with 1 additions and 1 deletions
|
|
@ -220,7 +220,7 @@ void EnvironmentSensorManager::loop() {
|
|||
_location->loop();
|
||||
|
||||
if (millis() > next_gps_update) {
|
||||
if (_location->isValid()) {
|
||||
if (gps_active && _location->isValid()) {
|
||||
node_lat = ((double)_location->getLatitude())/1000000.;
|
||||
node_lon = ((double)_location->getLongitude())/1000000.;
|
||||
MESH_DEBUG_PRINTLN("lat %f lon %f", node_lat, node_lon);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue