gps: adapt ui-new and the sensor managers

This commit is contained in:
Florent committed 2026-11-08 08:47:34 -04:00
1 parent a0c5854b59
commit 5303703750
9 files changed
+53 -18

No files matched your search

+2 -2
View File
@@ -64,8 +64,8 @@ bool MASensorManager::querySensors(uint8_t requester_permissions, CayenneLPP& te
void MASensorManager::loop() {
static long next_gps_update = 0;
_location->loop();
if(millis() > next_gps_update && _location->isEnabled()) {
if(_location->isValid()) {
if(millis() > next_gps_update && _location->isGpsOn()) {
if(_location->hasValidFix()) {
node_lat = ((double)_location->getLatitude()) / 1000000.;
node_lon = ((double)_location->getLongitude()) / 1000000.;
node_altitude = ((double)_location->getAltitude()) / 1000.0;