auto-sync
This commit is contained in:
parent
36978c9626
commit
1793284cf1
|
@ -19,7 +19,7 @@ import javax.swing.*;
|
||||||
* @see WavePanel
|
* @see WavePanel
|
||||||
*/
|
*/
|
||||||
public class Launcher extends FrameHelper {
|
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;
|
public static final boolean SHOW_STIMULATOR = true;
|
||||||
private final String port;
|
private final String port;
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class Launcher extends FrameHelper {
|
||||||
tabbedPane.addTab("LE controls", new FlexibleControls().getPanel());
|
tabbedPane.addTab("LE controls", new FlexibleControls().getPanel());
|
||||||
|
|
||||||
// tabbedPane.addTab("ADC", new AdcPanel(new BooleanInputsModel()).createAdcPanel());
|
// tabbedPane.addTab("ADC", new AdcPanel(new BooleanInputsModel()).createAdcPanel());
|
||||||
if (SHOW_STIMULATOR) {
|
if (SHOW_STIMULATOR && !SimulatorHelper.RUNNING_SIMULATOR) {
|
||||||
EcuStimulator stimulator = EcuStimulator.getInstance();
|
EcuStimulator stimulator = EcuStimulator.getInstance();
|
||||||
tabbedPane.add("ECU stimulation", stimulator.getPanel());
|
tabbedPane.add("ECU stimulation", stimulator.getPanel());
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,15 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* This frame is used on startup to select the port we would be using
|
* This frame is used on startup to select the port we would be using
|
||||||
*
|
*
|
||||||
* @author Andrey Belomutskiy 2/14/14
|
* @author Andrey Belomutskiy
|
||||||
|
* <p/>
|
||||||
|
* 2/14/14
|
||||||
*/
|
*/
|
||||||
public class PortLookupFrame {
|
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() {
|
public static void chooseSerialPort() {
|
||||||
List<String> ports = new ArrayList<>();
|
List<String> ports = new ArrayList<>();
|
||||||
ports.addAll(Arrays.asList(SerialPortList.getPortNames()));
|
ports.addAll(Arrays.asList(SerialPortList.getPortNames()));
|
||||||
|
@ -52,7 +58,7 @@ public class PortLookupFrame {
|
||||||
|
|
||||||
|
|
||||||
JPanel lowerPanel = new JPanel(new FlowLayout());
|
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(upperPanel, BorderLayout.NORTH);
|
||||||
content.add(centerPanel, BorderLayout.CENTER);
|
content.add(centerPanel, BorderLayout.CENTER);
|
||||||
content.add(lowerPanel, BorderLayout.SOUTH);
|
content.add(lowerPanel, BorderLayout.SOUTH);
|
||||||
|
|
|
@ -12,12 +12,14 @@ import java.io.IOException;
|
||||||
public class SimulatorHelper {
|
public class SimulatorHelper {
|
||||||
public static final String BINARY = "rusefi_simulator.exe";
|
public static final String BINARY = "rusefi_simulator.exe";
|
||||||
private static Process process;
|
private static Process process;
|
||||||
|
public static boolean RUNNING_SIMULATOR;
|
||||||
|
|
||||||
public static boolean isBinaryHere() {
|
public static boolean isBinaryHere() {
|
||||||
return new File(BINARY).exists();
|
return new File(BINARY).exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void startSimulator() {
|
private static void startSimulator() {
|
||||||
|
RUNNING_SIMULATOR = true;
|
||||||
try {
|
try {
|
||||||
process = Runtime.getRuntime().exec(BINARY);
|
process = Runtime.getRuntime().exec(BINARY);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue