auto-sync

This commit is contained in:
rusEfi 2014-12-10 16:03:23 -06:00
parent cb57557aae
commit 066ef60a7f
3 changed files with 6 additions and 5 deletions

View File

@ -19,7 +19,7 @@ import javax.swing.*;
* @see WavePanel
*/
public class Launcher extends FrameHelper {
public static final int CONSOLE_VERSION = 20141204;
public static final int CONSOLE_VERSION = 20141210;
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 && !SimulatorHelper.RUNNING_SIMULATOR) {
if (SHOW_STIMULATOR && !LinkManager.isStimulationMode) {
EcuStimulator stimulator = EcuStimulator.getInstance();
tabbedPane.add("ECU stimulation", stimulator.getPanel());
}

View File

@ -1,6 +1,7 @@
package com.rusefi;
import com.irnems.Launcher;
import com.rusefi.io.LinkManager;
import com.rusefi.io.tcp.TcpConnector;
import javax.swing.*;
@ -12,14 +13,13 @@ 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;
LinkManager.isStimulationMode = true;
try {
process = Runtime.getRuntime().exec(BINARY);
} catch (IOException e) {

View File

@ -3,6 +3,7 @@ package com.rusefi.ui.widgets;
import com.irnems.core.Sensor;
import com.rusefi.SimulatorHelper;
import com.rusefi.io.CommandQueue;
import com.rusefi.io.LinkManager;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
@ -64,7 +65,7 @@ public class DetachedSensor {
}
private boolean isMockable() {
return MOCKABLE.contains(sensor) && SimulatorHelper.RUNNING_SIMULATOR;
return MOCKABLE.contains(sensor) && LinkManager.isStimulationMode;
}
private static Component createMockVoltageSlider(final Sensor sensor) {