mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-05 04:06:31 +02:00
Update watchdog reset message
This commit is contained in:
@ -440,7 +440,7 @@ static void factoryConfigReset(void) {
|
|||||||
static void wdgFeedUpdate(void) {
|
static void wdgFeedUpdate(void) {
|
||||||
ag->watchdog.reset();
|
ag->watchdog.reset();
|
||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println("External watchdog feed");
|
Serial.println("Offline mode or isPostToAirGradient = false: watchdog reset");
|
||||||
Serial.println();
|
Serial.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -584,11 +584,6 @@ static void sendDataToAg() {
|
|||||||
stateMachine.handleLeds(AgStateMachineNormal);
|
stateMachine.handleLeds(AgStateMachineNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Must reset each 5min to avoid ESP32 reset
|
|
||||||
*/
|
|
||||||
static void resetWatchdog() { ag->watchdog.reset(); }
|
|
||||||
|
|
||||||
void dispSensorNotFound(String ss) {
|
void dispSensorNotFound(String ss) {
|
||||||
ss = ss + " not found";
|
ss = ss + " not found";
|
||||||
oledDisplay.setText("Sensor init", "Error:", ss.c_str());
|
oledDisplay.setText("Sensor init", "Error:", ss.c_str());
|
||||||
@ -1101,10 +1096,19 @@ static void updatePm(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void sendDataToServer(void) {
|
static void sendDataToServer(void) {
|
||||||
|
/** Ignore send data to server if postToAirGradient disabled */
|
||||||
|
if (configuration.isPostDataToAirGradient() == false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
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)) {
|
||||||
resetWatchdog();
|
ag->watchdog.reset();
|
||||||
|
Serial.println();
|
||||||
|
Serial.println(
|
||||||
|
"Online mode and isPostToAirGradient = true: watchdog reset");
|
||||||
|
Serial.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
measurements.bootCount++;
|
measurements.bootCount++;
|
||||||
|
Reference in New Issue
Block a user