|
@ -56,11 +56,13 @@ void hardwareSetup() { |
|
|
void hardwareLoop() { |
|
|
void hardwareLoop() { |
|
|
|
|
|
|
|
|
// Heartbeat
|
|
|
// Heartbeat
|
|
|
static unsigned long last = 0; |
|
|
|
|
|
if ((last == 0) || (millis() - last > HEARTBEAT_INTERVAL)) { |
|
|
|
|
|
last = millis(); |
|
|
|
|
|
heartbeat(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#if HEARTBEAT_ENABLED
|
|
|
|
|
|
static unsigned long last = 0; |
|
|
|
|
|
if ((last == 0) || (millis() - last > HEARTBEAT_INTERVAL)) { |
|
|
|
|
|
last = millis(); |
|
|
|
|
|
heartbeat(); |
|
|
|
|
|
} |
|
|
|
|
|
#endif // HEARTBEAT_ENABLED
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -177,6 +179,11 @@ void setup() { |
|
|
schSetup(); |
|
|
schSetup(); |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// 3rd party code hook
|
|
|
|
|
|
#if USE_EXTRA
|
|
|
|
|
|
extraSetup(); |
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
// Prepare configuration for version 2.0
|
|
|
// Prepare configuration for version 2.0
|
|
|
migrate(); |
|
|
migrate(); |
|
|
|
|
|
|
|
@ -241,6 +248,11 @@ void loop() { |
|
|
mdnsClientLoop(); |
|
|
mdnsClientLoop(); |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// 3rd party code hook
|
|
|
|
|
|
#if USE_EXTRA
|
|
|
|
|
|
extraLoop(); |
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
// Power saving delay
|
|
|
// Power saving delay
|
|
|
delay(_loopDelay); |
|
|
delay(_loopDelay); |
|
|
|
|
|
|
|
|