only kick watchdog if its enabled
This commit is contained in:
parent
a339810b75
commit
0f9627c73c
@ -50,7 +50,9 @@ class Adafruit_MQTT_FONA : public Adafruit_MQTT {
|
|||||||
bool connectServer() {
|
bool connectServer() {
|
||||||
char server[40];
|
char server[40];
|
||||||
strncpy_P(server, servername, 40);
|
strncpy_P(server, servername, 40);
|
||||||
|
#ifdef ADAFRUIT_SLEEPYDOG_H
|
||||||
Watchdog.reset();
|
Watchdog.reset();
|
||||||
|
#endif
|
||||||
|
|
||||||
// connect to server
|
// connect to server
|
||||||
DEBUG_PRINTLN(F("Connecting to TCP"));
|
DEBUG_PRINTLN(F("Connecting to TCP"));
|
||||||
@ -116,7 +118,9 @@ class Adafruit_MQTT_FONA : public Adafruit_MQTT {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#ifdef ADAFRUIT_SLEEPYDOG_H
|
||||||
Watchdog.reset();
|
Watchdog.reset();
|
||||||
|
#endif
|
||||||
timeout -= MQTT_FONA_INTERAVAILDELAY;
|
timeout -= MQTT_FONA_INTERAVAILDELAY;
|
||||||
timeout -= MQTT_FONA_QUERYDELAY; // this is how long it takes to query the FONA for avail()
|
timeout -= MQTT_FONA_QUERYDELAY; // this is how long it takes to query the FONA for avail()
|
||||||
delay(MQTT_FONA_INTERAVAILDELAY);
|
delay(MQTT_FONA_INTERAVAILDELAY);
|
||||||
|
Loading…
Reference in New Issue
Block a user