This commit is contained in:
2024-05-14 17:17:27 +02:00
parent 8f35f4f914
commit 2258c5a8be
3 changed files with 34 additions and 12 deletions

View File

@ -79,10 +79,18 @@ public class Controller_Frontend {
private CheckBox wdtCheck;
private static volatile boolean isAutoRunActive = true;
private static volatile boolean isSleeping = false;
public static void stopRunFromBackend(){
isAutoRunActive = false;
if (isSleeping)
isSleeping = false;
else
DataRegister.resetPC();
}
public static void sleep() {
isSleeping = true;
}
@FXML
@ -153,8 +161,12 @@ public class Controller_Frontend {
});
// Befehle ausführen
Commands.decode(prog[DataRegister.getPC()]);
DataRegister.increasePC();
if (!isSleeping) {
Commands.decode(prog[DataRegister.getPC()]);
DataRegister.increasePC();
}
else
Commands.decode(0);
WatchdogTimer.testAndTrigger();
Table.refresh();
Stage stage = (Stage) stepintoButton.getScene().getWindow();