sonderbefehle

This commit is contained in:
2024-06-03 00:27:53 +02:00
parent 0b163589db
commit ea6cacfa70
5 changed files with 28 additions and 3 deletions

5
.idea/misc.xml generated
View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<writeAnnotations>
<writeAnnotation name="javafx.fxml.FXML" />
</writeAnnotations>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">

View File

@ -42,6 +42,8 @@ public class Controller_Frontend {
private static double executionTimeMultiplier = 1;
public static double getExecutionTimeMultiplier(){
return executionTimeMultiplier;
}
@ -72,6 +74,9 @@ public class Controller_Frontend {
@FXML
private Label pclLabel;
@FXML
private Label PrescalerLabel;
@FXML
private Label statusLabel;
@ -101,6 +106,8 @@ public class Controller_Frontend {
private static volatile boolean isAutoRunActive = false;
private static volatile boolean isSleeping = false;
@ -409,11 +416,14 @@ public class Controller_Frontend {
@FXML
public void toggleWatchdog(ActionEvent actionEvent) {
if (wdtCheck.isSelected())
if (wdtCheck.isSelected()){
WatchdogTimer.enable();
else
}
else{
WatchdogTimer.disable();
}
}
@FXML
private ToggleButtonGroup bgTRISA0;

View File

@ -10,6 +10,12 @@ public class PreScaler {
return DataRegister.getDirectBit(OPTION, PSA) == 0;
}
public static int getScaler() {
return scaler;
}
public static int getFactor () {
int scale = DataRegister.getDirectRegister(OPTION) & 0b111;
int timer = isPrescalerOnTimer() ? 1 : 0;

View File

@ -79,13 +79,16 @@ public class Table {
Label fsrLabel = new Label("FSR: 0x" + format(Integer.toHexString(DataRegister.getRegister(DataRegister.getFSR())).toUpperCase()));
Label pclathLabel = new Label("PCLATH: 0x" + format(Integer.toHexString(DataRegister.getRegister(DataRegister.getPCLATH())).toUpperCase()));
Label intconLabel = new Label("INTCON: 0x" + format(Integer.toHexString(DataRegister.getRegister(DataRegister.getINTCON())).toUpperCase()));
Label wRegisterLabel = new Label("W Register: 0x" + format(Integer.toHexString(Commands.get_wRegister()).toUpperCase()));
Label PCLabel = new Label("PC: 0x" + format(Integer.toHexString(DataRegister.getPC()).toUpperCase()));
Label Prescaler = new Label("Prescaler: " + format(Integer.toHexString(PreScaler.getScaler())).toUpperCase());
// Erstelle einen VBox, um die TableView und Labels anzuzeigen
VBox table = new VBox();
table.getChildren().addAll(tableView, pclLabel, statusLabel, fsrLabel, pclathLabel, intconLabel);
table.getChildren().addAll(tableView, pclLabel, statusLabel, fsrLabel, pclathLabel, intconLabel, wRegisterLabel, PCLabel, Prescaler);
VBox.setMargin(tableView, new Insets(0, 0, 0, 0));
return table;

View File

@ -67,6 +67,7 @@
<Label fx:id="totalExecutionTimeLabel" text="Total Execution Time: 0µs" />
<CheckBox fx:id="wdtCheck" mnemonicParsing="false" onAction="#toggleWatchdog" text="Watchdog-Timer">
<Label fx:id="watchdogStatusLabel"/>
<VBox.margin>
<Insets top="10.0" />
</VBox.margin>