mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
_location->loop() should be in the next tick
This commit is contained in:
parent
62e180dc0f
commit
df3cb3d192
1 changed files with 3 additions and 3 deletions
|
|
@ -695,9 +695,9 @@ void EnvironmentSensorManager::loop() {
|
||||||
static long next_gps_update = 0;
|
static long next_gps_update = 0;
|
||||||
|
|
||||||
#if ENV_INCLUDE_GPS
|
#if ENV_INCLUDE_GPS
|
||||||
_location->loop();
|
|
||||||
|
|
||||||
if (millis() > next_gps_update) {
|
if (millis() > next_gps_update) {
|
||||||
|
_location->loop();
|
||||||
|
|
||||||
if(gps_active){
|
if(gps_active){
|
||||||
#ifdef RAK_WISBLOCK_GPS
|
#ifdef RAK_WISBLOCK_GPS
|
||||||
if ((i2cGPSFlag || serialGPSFlag) && _location->isValid()) {
|
if ((i2cGPSFlag || serialGPSFlag) && _location->isValid()) {
|
||||||
|
|
@ -717,7 +717,7 @@ void EnvironmentSensorManager::loop() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
next_gps_update = millis() + gps_update_interval_sec;
|
next_gps_update = millis() + (gps_update_interval_sec * 1000);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue