diff --git a/java_console/ui/src/com/irnems/Launcher.java b/java_console/ui/src/com/irnems/Launcher.java index 9ae431dfef..d06a1bc433 100644 --- a/java_console/ui/src/com/irnems/Launcher.java +++ b/java_console/ui/src/com/irnems/Launcher.java @@ -19,7 +19,7 @@ import javax.swing.*; * @see WavePanel */ public class Launcher extends FrameHelper { - public static final int CONSOLE_VERSION = 20141010; + public static final int CONSOLE_VERSION = 20141013; public static final boolean SHOW_STIMULATOR = true; private final String port; @@ -45,7 +45,7 @@ public class Launcher extends FrameHelper { tabbedPane.addTab("LE controls", new FlexibleControls().getPanel()); // tabbedPane.addTab("ADC", new AdcPanel(new BooleanInputsModel()).createAdcPanel()); - if (SHOW_STIMULATOR) { + if (SHOW_STIMULATOR && !SimulatorHelper.RUNNING_SIMULATOR) { EcuStimulator stimulator = EcuStimulator.getInstance(); tabbedPane.add("ECU stimulation", stimulator.getPanel()); } diff --git a/java_console/ui/src/com/rusefi/PortLookupFrame.java b/java_console/ui/src/com/rusefi/PortLookupFrame.java index 8f3a87e832..6e5e535ce7 100644 --- a/java_console/ui/src/com/rusefi/PortLookupFrame.java +++ b/java_console/ui/src/com/rusefi/PortLookupFrame.java @@ -18,9 +18,15 @@ import java.util.List; /** * This frame is used on startup to select the port we would be using * - * @author Andrey Belomutskiy 2/14/14 + * @author Andrey Belomutskiy + *

+ * 2/14/14 */ public class PortLookupFrame { + + public static final String RUS_EFI_C_2012_2014 = "rusEfi (c) 2012-2014"; + public static final String URI = "http://rusefi.com/?java_console"; + public static void chooseSerialPort() { List ports = new ArrayList<>(); ports.addAll(Arrays.asList(SerialPortList.getPortNames())); @@ -52,7 +58,7 @@ public class PortLookupFrame { JPanel lowerPanel = new JPanel(new FlowLayout()); - lowerPanel.add(new URLLabel("rusEfi (c) 2012-2014", "http://rusefi.com/?java_console")); + lowerPanel.add(new URLLabel(RUS_EFI_C_2012_2014, URI)); content.add(upperPanel, BorderLayout.NORTH); content.add(centerPanel, BorderLayout.CENTER); content.add(lowerPanel, BorderLayout.SOUTH); diff --git a/java_console/ui/src/com/rusefi/SimulatorHelper.java b/java_console/ui/src/com/rusefi/SimulatorHelper.java index e6cc25fa32..275cafcf32 100644 --- a/java_console/ui/src/com/rusefi/SimulatorHelper.java +++ b/java_console/ui/src/com/rusefi/SimulatorHelper.java @@ -12,12 +12,14 @@ import java.io.IOException; public class SimulatorHelper { public static final String BINARY = "rusefi_simulator.exe"; private static Process process; + public static boolean RUNNING_SIMULATOR; public static boolean isBinaryHere() { return new File(BINARY).exists(); } private static void startSimulator() { + RUNNING_SIMULATOR = true; try { process = Runtime.getRuntime().exec(BINARY); } catch (IOException e) {