ExecutionTime Multiplier, Hex Format
This commit is contained in:
@ -32,13 +32,19 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import static java.lang.Math.max;
|
||||
|
||||
public class Controller_Frontend {
|
||||
|
||||
private int [] prog;
|
||||
private int [][] read;
|
||||
private int [] ind;
|
||||
|
||||
private double executionTimeMultiplier = 1;
|
||||
private static double executionTimeMultiplier = 1;
|
||||
|
||||
public static double getExecutionTimeMultiplier(){
|
||||
return executionTimeMultiplier;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -240,8 +246,7 @@ public class Controller_Frontend {
|
||||
IOPorts.refreshUI(getTRISbuttons(), getPORTbuttons());
|
||||
|
||||
long totalExecutionTime = Commands.getTotalExecutionTime();
|
||||
double adjustedTotalExecutionTime = totalExecutionTime * executionTimeMultiplier;
|
||||
totalExecutionTimeLabel.setText("Total Execution Time: " + adjustedTotalExecutionTime + "µs");
|
||||
totalExecutionTimeLabel.setText("Total Execution Time: " + totalExecutionTime + "µs");
|
||||
}
|
||||
|
||||
private void markSelectedRow(int currentIndex, String selectedRowStyle) {
|
||||
@ -268,6 +273,7 @@ public class Controller_Frontend {
|
||||
File selectedFile = chooseLSTFile();
|
||||
stopAutoRun(null);
|
||||
if(selectedFile != null){
|
||||
String fileAddress = selectedFile.getAbsolutePath();
|
||||
DataRegister.initDataRegister();
|
||||
DataRegister.resetPC();
|
||||
initialize();
|
||||
@ -285,13 +291,23 @@ public class Controller_Frontend {
|
||||
WatchdogTimer.reset();
|
||||
wdtCheck.setSelected(false);
|
||||
Table.refresh();
|
||||
read = ParseFile.parseDatei(selectedFile.getAbsolutePath());
|
||||
read = ParseFile.parseDatei(fileAddress);
|
||||
prog = read [0];
|
||||
ind = read[1];
|
||||
System.out.println(Arrays.toString(Arrays.stream(prog).toArray()));
|
||||
displayLSTFileContent(selectedFile);
|
||||
markSelectedRow(0, "-fx-background-color: red; -fx-text-fill: white;");
|
||||
initializeBreakpoints();
|
||||
int lastSlash = max (fileAddress.lastIndexOf('/'), fileAddress.lastIndexOf('\\'));
|
||||
int lastDot = fileAddress.lastIndexOf('.');
|
||||
String stageTitle;
|
||||
if (lastDot > lastSlash)
|
||||
stageTitle = "Simulator - " + fileAddress.substring(lastSlash + 1, lastDot);
|
||||
else {
|
||||
stageTitle = "Simulator - " + fileAddress.substring(lastSlash + 1);
|
||||
}
|
||||
Stage stage = (Stage) stepintoButton.getScene().getWindow();
|
||||
stage.setTitle(stageTitle);
|
||||
}
|
||||
|
||||
|
||||
@ -345,7 +361,6 @@ public class Controller_Frontend {
|
||||
|
||||
private File chooseLSTFile() {
|
||||
FileChooser fileChooser = new FileChooser();
|
||||
fileChooser.setTitle("Open LST File");
|
||||
fileChooser.getExtensionFilters().addAll(
|
||||
new FileChooser.ExtensionFilter("LST Files", "*.lst", "*.LST"),
|
||||
new FileChooser.ExtensionFilter("All Files", "*.*"));
|
||||
|
||||
Reference in New Issue
Block a user