Always increment bootcount when send measurements data is scheduled (#255)

This commit is contained in:
Samuel Siburian
2024-10-13 15:46:41 +07:00
committed by GitHub
parent 4e41fd5d71
commit 77a23b4202
4 changed files with 12 additions and 4 deletions

View File

@ -1220,6 +1220,9 @@ static void updatePm(void) {
}
static void sendDataToServer(void) {
/** Increment bootcount when send measurements data is scheduled */
measurements.bootCount++;
/** Ignore send data to server if postToAirGradient disabled */
if (configuration.isPostDataToAirGradient() == false || configuration.isOfflineMode()) {
return;
@ -1233,7 +1236,6 @@ static void sendDataToServer(void) {
"Online mode and isPostToAirGradient = true: watchdog reset");
Serial.println();
}
measurements.bootCount++;
}
static void tempHumUpdate(void) {