fix: EnvironmentSensorManager.cpp: don't update location if GPS is turned off.

previously the location would always snap to the last heard GPS location after GPS had been on.
Этот коммит содержится в:
taco
2025-06-21 10:09:28 +10:00
родитель 7f0f3b7753
Коммит 83842e4b25
+1 -1
Просмотреть файл
@@ -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);