mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Fix watchdog code in repeater
This commit is contained in:
parent
9df34e09d0
commit
53ff4ed57f
3 changed files with 29 additions and 6 deletions
|
|
@ -141,11 +141,16 @@ void SolarExWatchdog::loop() {
|
|||
}
|
||||
|
||||
unsigned long SolarExWatchdog::getIntervalMs() const {
|
||||
return next_feed_watchdog - millis();
|
||||
unsigned long interval_ms = 0;
|
||||
interval_ms = next_feed_watchdog - millis();
|
||||
if(interval_ms > EX_WATCHDOG_TIMEOUT_MS) {
|
||||
interval_ms = EX_WATCHDOG_TIMEOUT_MS;
|
||||
}
|
||||
return interval_ms;
|
||||
}
|
||||
|
||||
void SolarExWatchdog::feed() {
|
||||
digitalWrite(EX_WATCHDOG_DONE_PIN, HIGH);
|
||||
delay(1);
|
||||
digitalWrite(EX_WATCHDOG_DONE_PIN, LOW);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue