mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-16 18:22:09 +02:00
let hw watchdog run independently of POST success
This commit is contained in:
@ -206,11 +206,7 @@ void loop() {
|
|||||||
tvocSchedule.run();
|
tvocSchedule.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Auto reset watchdog timer if offline mode or postDataToAirGradient */
|
watchdogFeedSchedule.run();
|
||||||
if (configuration.isOfflineMode() ||
|
|
||||||
(configuration.isPostDataToAirGradient() == false)) {
|
|
||||||
watchdogFeedSchedule.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Check for handle WiFi reconnect */
|
/** Check for handle WiFi reconnect */
|
||||||
wifiConnector.handle();
|
wifiConnector.handle();
|
||||||
@ -542,13 +538,11 @@ static void sendDataToServer(void) {
|
|||||||
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(),
|
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(),
|
||||||
&ag, &configuration);
|
&ag, &configuration);
|
||||||
if (apiClient.postToServer(syncData)) {
|
if (apiClient.postToServer(syncData)) {
|
||||||
ag.watchdog.reset();
|
|
||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println(
|
Serial.println(
|
||||||
"Online mode and isPostToAirGradient = true: watchdog reset");
|
"Online mode and isPostToAirGradient = true: watchdog reset");
|
||||||
Serial.println();
|
Serial.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
measurements.bootCount++;
|
measurements.bootCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,11 +204,7 @@ void loop() {
|
|||||||
tvocSchedule.run();
|
tvocSchedule.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Auto reset watchdog timer if offline mode or postDataToAirGradient */
|
watchdogFeedSchedule.run();
|
||||||
if (configuration.isOfflineMode() ||
|
|
||||||
(configuration.isPostDataToAirGradient() == false)) {
|
|
||||||
watchdogFeedSchedule.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Check for handle WiFi reconnect */
|
/** Check for handle WiFi reconnect */
|
||||||
wifiConnector.handle();
|
wifiConnector.handle();
|
||||||
@ -594,13 +590,11 @@ static void sendDataToServer(void) {
|
|||||||
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(),
|
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(),
|
||||||
&ag, &configuration);
|
&ag, &configuration);
|
||||||
if (apiClient.postToServer(syncData)) {
|
if (apiClient.postToServer(syncData)) {
|
||||||
ag.watchdog.reset();
|
|
||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println(
|
Serial.println(
|
||||||
"Online mode and isPostToAirGradient = true: watchdog reset");
|
"Online mode and isPostToAirGradient = true: watchdog reset");
|
||||||
Serial.println();
|
Serial.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
measurements.bootCount++;
|
measurements.bootCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,11 +231,7 @@ void loop() {
|
|||||||
tvocSchedule.run();
|
tvocSchedule.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Auto reset watchdog timer if offline mode or postDataToAirGradient */
|
watchdogFeedSchedule.run();
|
||||||
if (configuration.isOfflineMode() ||
|
|
||||||
(configuration.isPostDataToAirGradient() == false)) {
|
|
||||||
watchdogFeedSchedule.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Check for handle WiFi reconnect */
|
/** Check for handle WiFi reconnect */
|
||||||
wifiConnector.handle();
|
wifiConnector.handle();
|
||||||
@ -635,13 +631,11 @@ static void sendDataToServer(void) {
|
|||||||
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(),
|
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(),
|
||||||
&ag, &configuration);
|
&ag, &configuration);
|
||||||
if (apiClient.postToServer(syncData)) {
|
if (apiClient.postToServer(syncData)) {
|
||||||
ag.watchdog.reset();
|
|
||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println(
|
Serial.println(
|
||||||
"Online mode and isPostToAirGradient = true: watchdog reset");
|
"Online mode and isPostToAirGradient = true: watchdog reset");
|
||||||
Serial.println();
|
Serial.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
measurements.bootCount++;
|
measurements.bootCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,11 +298,7 @@ void loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Auto reset watchdog timer if offline mode or postDataToAirGradient */
|
watchdogFeedSchedule.run();
|
||||||
if (configuration.isOfflineMode() ||
|
|
||||||
(configuration.isPostDataToAirGradient() == false)) {
|
|
||||||
watchdogFeedSchedule.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Check for handle WiFi reconnect */
|
/** Check for handle WiFi reconnect */
|
||||||
wifiConnector.handle();
|
wifiConnector.handle();
|
||||||
@ -1240,13 +1236,11 @@ static void sendDataToServer(void) {
|
|||||||
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(),
|
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(),
|
||||||
ag, &configuration);
|
ag, &configuration);
|
||||||
if (apiClient.postToServer(syncData)) {
|
if (apiClient.postToServer(syncData)) {
|
||||||
ag->watchdog.reset();
|
|
||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println(
|
Serial.println(
|
||||||
"Online mode and isPostToAirGradient = true: watchdog reset");
|
"Online mode and isPostToAirGradient = true: watchdog reset");
|
||||||
Serial.println();
|
Serial.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
measurements.bootCount++;
|
measurements.bootCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user