SLEEP
This commit is contained in:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user