Interrupt/Watchdog Window

This commit is contained in:
2024-05-15 13:46:42 +02:00
parent 0b932966c5
commit 073ad3dada
3 changed files with 24 additions and 10 deletions

View File

@ -12,12 +12,10 @@ public class WatchdogTimer {
public static void testAndTrigger() {
watchdogTime = getTimeFromRegister() * 1000;
if (enabled) {
System.err.println("Remaining: " + ((watchdogTime + lastReset - 1) - Commands.getTotalExecutionTime()));
if (Commands.getTotalExecutionTime() >= (watchdogTime + lastReset - 1)) {
System.err.println("Watchdog Timer triggered");
DataRegister.clearBit(3, 4);
lastReset = Commands.getTotalExecutionTime();
Controller_Frontend.stopRunFromBackend();
Controller_Frontend.stopRunFromBackend("Watchdog Timer");
}
}
}