mirror of https://github.com/rusefi/RomRaider.git
updated ramtune test app
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@655 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
e9b7798044
commit
3e3ec96e9c
|
@ -11,6 +11,7 @@ import enginuity.ramtune.test.command.generator.CommandGenerator;
|
||||||
import enginuity.ramtune.test.command.generator.EcuInitCommandGenerator;
|
import enginuity.ramtune.test.command.generator.EcuInitCommandGenerator;
|
||||||
import enginuity.ramtune.test.command.generator.ReadCommandGenerator;
|
import enginuity.ramtune.test.command.generator.ReadCommandGenerator;
|
||||||
import enginuity.ramtune.test.command.generator.WriteCommandGenerator;
|
import enginuity.ramtune.test.command.generator.WriteCommandGenerator;
|
||||||
|
import enginuity.swing.LookAndFeelManager;
|
||||||
import static enginuity.util.HexUtil.asBytes;
|
import static enginuity.util.HexUtil.asBytes;
|
||||||
import static enginuity.util.HexUtil.asHex;
|
import static enginuity.util.HexUtil.asHex;
|
||||||
import static enginuity.util.ThreadUtil.runAsDaemon;
|
import static enginuity.util.ThreadUtil.runAsDaemon;
|
||||||
|
@ -156,7 +157,7 @@ public final class RamTuneTestApp extends JFrame implements WindowListener {
|
||||||
JPanel addressPanel = new JPanel(new FlowLayout());
|
JPanel addressPanel = new JPanel(new FlowLayout());
|
||||||
addressPanel.add(new JLabel("Address (eg. 020000):"));
|
addressPanel.add(new JLabel("Address (eg. 020000):"));
|
||||||
addressPanel.add(addressField);
|
addressPanel.add(addressField);
|
||||||
addressPanel.add(new JLabel("Length:"));
|
addressPanel.add(new JLabel("Read Length:"));
|
||||||
lengthField.setText("1");
|
lengthField.setText("1");
|
||||||
addressPanel.add(lengthField);
|
addressPanel.add(lengthField);
|
||||||
constraints.gridx = 3;
|
constraints.gridx = 3;
|
||||||
|
@ -375,12 +376,16 @@ public final class RamTuneTestApp extends JFrame implements WindowListener {
|
||||||
//**********************************************************************
|
//**********************************************************************
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
//LookAndFeelManager.initLookAndFeel();
|
LookAndFeelManager.initLookAndFeel();
|
||||||
|
startTestApp(EXIT_ON_CLOSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void startTestApp(final int defaultCloseOperation) {
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
RamTuneTestApp ramTuneTestApp = new RamTuneTestApp("RAMTune - Test App");
|
RamTuneTestApp ramTuneTestApp = new RamTuneTestApp("RAMTune - Test App");
|
||||||
ramTuneTestApp.setIconImage(new ImageIcon("./graphics/enginuity-ico.gif").getImage());
|
ramTuneTestApp.setIconImage(new ImageIcon("./graphics/enginuity-ico.gif").getImage());
|
||||||
ramTuneTestApp.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
ramTuneTestApp.setDefaultCloseOperation(defaultCloseOperation);
|
||||||
ramTuneTestApp.addWindowListener(ramTuneTestApp);
|
ramTuneTestApp.addWindowListener(ramTuneTestApp);
|
||||||
ramTuneTestApp.setLocation(100, 50);
|
ramTuneTestApp.setLocation(100, 50);
|
||||||
ramTuneTestApp.pack();
|
ramTuneTestApp.pack();
|
||||||
|
|
|
@ -26,6 +26,7 @@ import enginuity.ECUEditor;
|
||||||
import enginuity.logger.ecu.EcuLogger;
|
import enginuity.logger.ecu.EcuLogger;
|
||||||
import enginuity.logger.utec.gui.JutecGUI;
|
import enginuity.logger.utec.gui.JutecGUI;
|
||||||
import enginuity.maps.Rom;
|
import enginuity.maps.Rom;
|
||||||
|
import enginuity.ramtune.test.RamTuneTestApp;
|
||||||
|
|
||||||
import javax.swing.ButtonGroup;
|
import javax.swing.ButtonGroup;
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
|
@ -77,6 +78,8 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
|
||||||
private JMenuItem openLogger = new JMenuItem("Launch ECU Logger...");
|
private JMenuItem openLogger = new JMenuItem("Launch ECU Logger...");
|
||||||
private JMenuItem utecLogger = new JMenuItem("Launch UTEC Logger...");
|
private JMenuItem utecLogger = new JMenuItem("Launch UTEC Logger...");
|
||||||
|
|
||||||
|
private JMenu ramTuneMenu = new JMenu("RAMTune");
|
||||||
|
private JMenuItem launchRamTuneTestApp = new JMenuItem("Launch Test App...");
|
||||||
|
|
||||||
private JMenu helpMenu = new JMenu("Help");
|
private JMenu helpMenu = new JMenu("Help");
|
||||||
private JMenuItem about = new JMenuItem("About Enginuity");
|
private JMenuItem about = new JMenuItem("About Enginuity");
|
||||||
|
@ -180,6 +183,13 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
|
||||||
openLogger.addActionListener(this);
|
openLogger.addActionListener(this);
|
||||||
utecLogger.addActionListener(this);
|
utecLogger.addActionListener(this);
|
||||||
|
|
||||||
|
// ramtune menu stuff
|
||||||
|
add(ramTuneMenu);
|
||||||
|
ramTuneMenu.setMnemonic('R');
|
||||||
|
launchRamTuneTestApp.setMnemonic('L');
|
||||||
|
ramTuneMenu.add(launchRamTuneTestApp);
|
||||||
|
launchRamTuneTestApp.addActionListener(this);
|
||||||
|
|
||||||
// help menu stuff
|
// help menu stuff
|
||||||
add(helpMenu);
|
add(helpMenu);
|
||||||
helpMenu.setMnemonic('H');
|
helpMenu.setMnemonic('H');
|
||||||
|
@ -287,6 +297,9 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
|
||||||
} else if (e.getSource() == updateDefinition) {
|
} else if (e.getSource() == updateDefinition) {
|
||||||
BareBonesBrowserLaunch.openURL(parent.getSettings().getEcuDefsURL());
|
BareBonesBrowserLaunch.openURL(parent.getSettings().getEcuDefsURL());
|
||||||
|
|
||||||
|
} else if (e.getSource() == launchRamTuneTestApp) {
|
||||||
|
RamTuneTestApp.startTestApp(DISPOSE_ON_CLOSE);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue