1
0
mirror of https://github.com/sethm/symon.git synced 2025-08-15 20:27:20 +00:00

Reset WIP

This commit is contained in:
Seth Morabito
2014-07-27 11:33:08 -07:00
parent 2dc0078deb
commit b1e1e75555

View File

@@ -209,7 +209,7 @@ public class Simulator {
resetButton.addActionListener(new ActionListener() { resetButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) { public void actionPerformed(ActionEvent actionEvent) {
handleReset(); handleReset(false);
} }
}); });
@@ -235,7 +235,7 @@ public class Simulator {
mainWindow.setVisible(true); mainWindow.setVisible(true);
console.requestFocus(); console.requestFocus();
handleReset(); handleReset(false);
} }
public MAIN_CMD waitForCommand() { public MAIN_CMD waitForCommand() {
@@ -268,7 +268,7 @@ public class Simulator {
/* /*
* Perform a reset. * Perform a reset.
*/ */
private void handleReset() { private void handleReset(boolean isColdReset) {
if (runLoop != null && runLoop.isRunning()) { if (runLoop != null && runLoop.isRunning()) {
runLoop.requestStop(); runLoop.requestStop();
runLoop.interrupt(); runLoop.interrupt();
@@ -283,6 +283,8 @@ public class Simulator {
console.reset(); console.reset();
// Reset the trace log. // Reset the trace log.
traceLog.reset(); traceLog.reset();
// If we're doing a cold reset, clear the memory.
// TODO: Clear memory
// Update status. // Update status.
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
public void run() { public void run() {