Browse Source

Merge pull request #430 from oltaco/gps-update-fix

fix: EnvironmentSensorManager.cpp: don't update location if GPS is turned off
pull/436/head
ripplebiz 12 months ago
committed by GitHub
parent
commit
485749a053
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/helpers/sensors/EnvironmentSensorManager.cpp

2
src/helpers/sensors/EnvironmentSensorManager.cpp

@ -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…
Cancel
Save