diff --git a/java_console/models/src/com/rusefi/core/EngineState.java b/java_console/models/src/com/rusefi/core/EngineState.java index 7080421735..93cecba264 100644 --- a/java_console/models/src/com/rusefi/core/EngineState.java +++ b/java_console/models/src/com/rusefi/core/EngineState.java @@ -17,11 +17,6 @@ import java.util.concurrent.CopyOnWriteArrayList; */ public class EngineState { public static final String SEPARATOR = ","; - public static final ValueCallback NOTHING = new ValueCallback() { - @Override - public void onUpdate(String value) { - } - }; public static final String PACKING_DELIMITER = ":"; // see RUS_EFI_VERSION_TAG in firmware code public static final String RUS_EFI_VERSION_TAG = "rusEfiVersion"; @@ -77,36 +72,6 @@ public class EngineState { } ); - SensorCentral.getInstance().initialize(this); - -// SensorStats.startRangeMeasurement(Sensor.CLT, Sensor.COOLANT_WIDTH); -// SensorStats.startRangeMeasurement(Sensor.IAT, Sensor.INTAKE_AIR_WIDTH); - SensorStats.startRangeMeasurement(Sensor.VREF, Sensor.VREF_WIDTH); - - SensorStats.startStandardDeviation(Sensor.DWELL0, Sensor.DWELL0_SD); - SensorStats.startDelta(Sensor.INJECTOR_1_DWELL, Sensor.INJECTOR_2_DWELL, Sensor.INJ_1_2_DELTA); - SensorStats.startDelta(Sensor.INJECTOR_3_DWELL, Sensor.INJECTOR_4_DWELL, Sensor.INJ_3_4_DELTA); - - SensorStats.startConversion(Sensor.CLT, Sensor.CLT_F, SensorConversion.celsius_to_fahrenheit); - SensorStats.startConversion(Sensor.IAT, Sensor.IAT_F, SensorConversion.celsius_to_fahrenheit); - SensorStats.startConversion(Sensor.MAFR, Sensor.MAFR_CFM, new SensorConversion() { - @Override - public double convertValue(double value) { - return value / 2.081989116; - } - }); - - registerStringValueAction("IAT", NOTHING); - registerStringValueAction("int_temp", NOTHING); - registerStringValueAction("mode", NOTHING); - registerStringValueAction("TPS", NOTHING); - - registerStringValueAction("adcfast_co", NOTHING); - registerStringValueAction("adcfast_max", NOTHING); - registerStringValueAction("adcfast_min", NOTHING); - registerStringValueAction("key", NOTHING); - registerStringValueAction("value", NOTHING); - registerStringValueAction("msg", new ValueCallback() { @Override public void onUpdate(String value) { @@ -114,31 +79,6 @@ public class EngineState { } }); - registerStringValueAction("advance", NOTHING); - registerStringValueAction("dwell", NOTHING); - - registerStringValueAction("offset0", NOTHING); - registerStringValueAction("offset1", NOTHING); - registerStringValueAction("crank_period", NOTHING); - registerStringValueAction("ckp_c", NOTHING); - registerStringValueAction("ev0", NOTHING); - registerStringValueAction("ev1", NOTHING); - registerStringValueAction("adc10", NOTHING); - - registerStringValueAction("isC", NOTHING); - registerStringValueAction("p_d", NOTHING); - registerStringValueAction("s_d", NOTHING); - registerStringValueAction("pEC", NOTHING); - registerStringValueAction("sEC", NOTHING); - registerStringValueAction("wEC", NOTHING); - registerStringValueAction("wWi", NOTHING); - registerStringValueAction("wWi2", NOTHING); - - registerStringValueAction("cid", NOTHING); - registerStringValueAction("i_d", NOTHING); - registerStringValueAction("i_p", NOTHING); - registerStringValueAction("a_time", NOTHING); - registerStringValueAction("time", new ValueCallback() { public void onUpdate(String value) { double time; diff --git a/java_console/models/src/com/rusefi/core/ISensorCentral.java b/java_console/models/src/com/rusefi/core/ISensorCentral.java index a1f8681187..29cad75b4a 100644 --- a/java_console/models/src/com/rusefi/core/ISensorCentral.java +++ b/java_console/models/src/com/rusefi/core/ISensorCentral.java @@ -5,8 +5,6 @@ package com.rusefi.core; * (c) Andrey Belomutskiy */ public interface ISensorCentral { - void initialize(EngineState es); - double getValue(Sensor sensor); void setValue(double value, Sensor sensor); diff --git a/java_console/models/src/com/rusefi/core/Sensor.java b/java_console/models/src/com/rusefi/core/Sensor.java index 9e4971f6ae..b3df2f7ec1 100644 --- a/java_console/models/src/com/rusefi/core/Sensor.java +++ b/java_console/models/src/com/rusefi/core/Sensor.java @@ -18,10 +18,6 @@ import static com.rusefi.config.Fields.*; */ public enum Sensor { MAP("MAP", SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, /*offset */ 40, BackgroundColor.MUD, 20, 300), - MAP_RAW("MAP_RAW", SensorCategory.SENSOR_INPUTS), - BARO("Baro", SensorCategory.SENSOR_INPUTS), - // todo: unify with ignitionAdvance - TIMING("Timing Advance", SensorCategory.OPERATIONS, "deg", -180, 180), /** * Please note that these enum names are used to make 'set_mock_XXX_voltage' commands @@ -29,67 +25,24 @@ public enum Sensor { CLT("Coolant", SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, /*offset */ 4, BackgroundColor.MUD, -40, 300), AFR("A/F ratio", SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, /*offset */ 20, BackgroundColor.MUD, 0, 20), MAF("MAF", SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, /*offset */ 16, BackgroundColor.MUD, 0, 5), - MAFR("MAFR", SensorCategory.SENSOR_INPUTS, "kg/hr", 4), - knockCount("Knock", SensorCategory.SENSOR_INPUTS, "count", 30), - KnockValue("Knock level", SensorCategory.SENSOR_INPUTS, "v", 6), +// knockCount("Knock", SensorCategory.SENSOR_INPUTS, "count", 30), +// KnockValue("Knock level", SensorCategory.SENSOR_INPUTS, "v", 6), - ENGINE_LOAD("Engine Load", SensorCategory.SENSOR_INPUTS, "x", 300), +// ENGINE_LOAD("Engine Load", SensorCategory.SENSOR_INPUTS, "x", 300), - MAFR_CFM("MAFR_CFM", SensorCategory.SENSOR_INPUTS, "cub f/m", 800), - CLT_F("Coolant F", SensorCategory.SENSOR_INPUTS, "temperature, F", -40, 500), - IAT_F("Intake Air F", SensorCategory.SENSOR_INPUTS, "temperature, F", -40, 350), +// MAFR_CFM("MAFR_CFM", SensorCategory.SENSOR_INPUTS, "cub f/m", 800), - ADC0("adc0", SensorCategory.SENSOR_INPUTS, "%", 100), - ADC1("adc1", SensorCategory.SENSOR_INPUTS, "%", 100), - ADC2("adc2", SensorCategory.SENSOR_INPUTS, "%", 100), - ADC3("adc3", SensorCategory.SENSOR_INPUTS, "%", 100), - - TRG_0_DUTY("trg0 duty", SensorCategory.SENSOR_INPUTS, "%", 100), - TRG_1_DUTY("trg1 duty", SensorCategory.SENSOR_INPUTS, "%", 100), // COOLANT_WIDTH("c w", "", 30), // INTAKE_AIR_WIDTH("air w", "", 30), - TABLE_SPARK("table spark", SensorCategory.OPERATIONS, "ms", -40, 40), - VREF("VRef", SensorCategory.SENSOR_INPUTS, "Volts", 6), +// VREF("VRef", SensorCategory.SENSOR_INPUTS, "Volts", 6), VBATT("VBatt", SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, 28, BackgroundColor.BEIGE, 4, 18, "Volts"), - VREF_WIDTH("VRef w", SensorCategory.OTHERS, "", 1), - DWELL0("Input dwl #1", SensorCategory.SNIFFING, "ms", 0, 30, BackgroundColor.BEIGE), - DWELL1("Input dwl #2", SensorCategory.SNIFFING, "ms", 0, 30, BackgroundColor.BEIGE), - DWELL2("Input dwl #3", SensorCategory.SNIFFING, "ms", 0, 30, BackgroundColor.BEIGE), - DWELL3("Input dwl #4", SensorCategory.SNIFFING, "ms", 0, 30, BackgroundColor.BEIGE), - DWELL0_SD("Input d #1", SensorCategory.SNIFFING, "std dev", 100), ETB_CONTROL_QUALITY("ETB metric", SensorCategory.SNIFFING, "", 100), - - TOTAL_DWELL0("Input tdwl #1", SensorCategory.SNIFFING, "ms", 0, 30, BackgroundColor.BEIGE), - TOTAL_DWELL1("Input tdwl #2", SensorCategory.SNIFFING, "ms", 0, 30, BackgroundColor.BEIGE), - TOTAL_DWELL2("Input tdwl #3", SensorCategory.SNIFFING, "ms", 0, 30, BackgroundColor.BEIGE), - TOTAL_DWELL3("Input tdwl #4", SensorCategory.SNIFFING, "ms", 0, 30, BackgroundColor.BEIGE), - ADVANCE0("Input Adv #1", SensorCategory.SNIFFING, "deg", -180, 180, BackgroundColor.BROWN), - ADVANCE1("Input Adv #2", SensorCategory.SNIFFING, "deg", -180, 180, BackgroundColor.BROWN), - ADVANCE2("Input Adv #3", SensorCategory.SNIFFING, "deg", -180, 180, BackgroundColor.BROWN), - ADVANCE3("Input Adv #4", SensorCategory.SNIFFING, "deg", -180, 180, BackgroundColor.BROWN), - PERIOD0("Period", SensorCategory.SNIFFING, "dg", 0, 400), - DUTY0("Duty0", SensorCategory.SNIFFING, "%", 0, 100, BackgroundColor.RED), - DUTY1("Duty1", SensorCategory.SNIFFING, "%", 0, 100, BackgroundColor.RED), - - IDLE_SWITCH("idle switch", SensorCategory.OTHERS), - - CHARTSIZE("CHARTSIZE", SensorCategory.OTHERS), - CHART_STATUS("CHART_STATUS", SensorCategory.OTHERS), - ADC_STATUS("ADC_STATUS", SensorCategory.OTHERS), - - ADC_FAST("ADC_FAST", SensorCategory.OTHERS, "b", 4000), - ADC_FAST_AVG("ADC_FAST_AVG", SensorCategory.OTHERS, "b", 4000), - INJECTOR_1_DWELL("inj #1", SensorCategory.SNIFFING), - INJECTOR_2_DWELL("inj #2", SensorCategory.SNIFFING), - INJECTOR_3_DWELL("inj #3", SensorCategory.SNIFFING), - INJECTOR_4_DWELL("inj #4", SensorCategory.SNIFFING), - IAT(SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, 8, BackgroundColor.WHITE, -40, 150, "C"), TPS(SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, 12, BackgroundColor.MUD, 0, 100, "%"), // throttle position sensor crankingFuel(GAUGE_NAME_FUEL_CRANKING, SensorCategory.FUEL, FieldType.FLOAT, 44, BackgroundColor.MUD, 0, 30, "ms"), @@ -146,8 +99,6 @@ public enum Sensor { debugIntField4("debug i4", SensorCategory.DEBUG, FieldType.INT16, 292, BackgroundColor.MUD, 0, 5), debugIntField5("debug i5", SensorCategory.DEBUG, FieldType.INT16, 294, BackgroundColor.MUD, 0, 5), - INJ_1_2_DELTA("inj 1-2 delta", SensorCategory.SNIFFING), - INJ_3_4_DELTA("inj 3-4 delta", SensorCategory.SNIFFING), ; private final String name; @@ -192,23 +143,22 @@ public enum Sensor { } /** - * Text-based protocol is not very alive + * This constructor is used for virtual sensors which do not directly come from ECU */ - @Deprecated - Sensor(String name, SensorCategory category) { - this(name, category, "", 255); - } - - @Deprecated Sensor(String name, SensorCategory category, String units, double maxValue) { this(name, category, units, 0, maxValue); } - @Deprecated + /** + * This constructor is used for virtual sensors which do not directly come from ECU + */ Sensor(String name, SensorCategory category, String units, double minValue, double maxValue) { this(name, category, units, minValue, maxValue, BackgroundColor.LIGHT_GRAY); } + /** + * This constructor is used for virtual sensors which do not directly come from ECU + */ Sensor(String name, SensorCategory category, String units, double minValue, double maxValue, BackgroundColor color) { this.name = name; this.category = category; @@ -279,15 +229,6 @@ public enum Sensor { } public double translateValue(double value) { - switch (this) { - case ADVANCE0: - case ADVANCE1: - case ADVANCE2: - case ADVANCE3: - case TIMING: - return processAdvance(value); - default: - return value; - } + return value; } } diff --git a/java_console/models/src/com/rusefi/core/SensorCentral.java b/java_console/models/src/com/rusefi/core/SensorCentral.java index 6a59feb275..88ab06fde6 100644 --- a/java_console/models/src/com/rusefi/core/SensorCentral.java +++ b/java_console/models/src/com/rusefi/core/SensorCentral.java @@ -92,102 +92,6 @@ public class SensorCentral implements ISensorCentral { return () -> SensorCentral.this.getValue(sensor); } - @Override - public void initialize(EngineState es) { - addDoubleSensor(RPM_KEY, Sensor.RPM, es); - addDoubleSensor("mat", Sensor.IAT, es); - addDoubleSensor("map", Sensor.MAP, es); - addDoubleSensor("map_r", Sensor.MAP_RAW, es); - addDoubleSensor("baro", Sensor.BARO, es); - addDoubleSensor("clt", Sensor.CLT, es); - addDoubleSensor("tp", Sensor.TPS, es); - addDoubleSensor("pps", Sensor.TPS, es); - addDoubleSensor("error", Sensor.lastErrorCode, es); - addDoubleSensor("warn", Sensor.errorCodeCounter, es); - addDoubleSensor("knck_c", Sensor.knockCount, es); - addDoubleSensor("knck_v", Sensor.KnockValue, es); - addDoubleSensor("target", Sensor.TARGET_AFR, es); - - addDoubleSensor(Sensor.VSS, es); - addDoubleSensor(Sensor.ENGINE_LOAD, es); - addDoubleSensor(Sensor.DWELL0, es); - addDoubleSensor(Sensor.DWELL1, es); - addDoubleSensor(Sensor.DWELL2, es); - addDoubleSensor(Sensor.DWELL3, es); - addDoubleSensor(Sensor.TOTAL_DWELL0, es); - addDoubleSensor(Sensor.TOTAL_DWELL1, es); - addDoubleSensor(Sensor.TOTAL_DWELL2, es); - addDoubleSensor(Sensor.TOTAL_DWELL3, es); - addDoubleSensor(Sensor.ADVANCE0, es); - addDoubleSensor(Sensor.ADVANCE1, es); - addDoubleSensor(Sensor.ADVANCE2, es); - addDoubleSensor(Sensor.ADVANCE3, es); - addDoubleSensor(Sensor.knockCount, es); - addDoubleSensor(Sensor.KnockValue, es); - - addDoubleSensor("tch", Sensor.tCharge, es); - addDoubleSensor(Sensor.AFR, es); - addDoubleSensor(Sensor.runningFuel, es); - addDoubleSensor(Sensor.baseFuel, es); - addDoubleSensor(Sensor.injectorLagMs, es); - addDoubleSensor(Sensor.cltCorrection, es); - addDoubleSensor(Sensor.iatCorrection, es); - addDoubleSensor(Sensor.TABLE_SPARK, es); - addDoubleSensor(Sensor.VREF, es); - addDoubleSensor(Sensor.VBATT, es); - addDoubleSensor(Sensor.MAF, es); - addDoubleSensor(Sensor.MAFR, es); - addDoubleSensor("period0", Sensor.PERIOD0, es); - addDoubleSensor("period1", Sensor.PERIOD0, es); - addDoubleSensor("duty0", Sensor.DUTY0, es); - addDoubleSensor("duty1", Sensor.DUTY1, es); - addDoubleSensor(Sensor.TIMING, es); - addDoubleSensor(Sensor.TRG_0_DUTY, es); - addDoubleSensor(Sensor.TRG_1_DUTY, es); - - addDoubleSensor(Sensor.ADC0, es); - addDoubleSensor(Sensor.ADC1, es); - addDoubleSensor(Sensor.ADC2, es); - addDoubleSensor(Sensor.ADC3, es); - - addDoubleSensor("idl", Sensor.IDLE_SWITCH, es); - - addDoubleSensor("chart", Sensor.CHART_STATUS, true, es); - addDoubleSensor("chartsize", Sensor.CHARTSIZE, true, es); - addDoubleSensor("adcDebug", Sensor.ADC_STATUS, true, es); - addDoubleSensor("adcfast", Sensor.ADC_FAST, es); - addDoubleSensor("adcfastavg", Sensor.ADC_FAST_AVG, es); - } - - /** - * Sensor enum name matches the protocol key - */ - private void addDoubleSensor(Sensor sensor, EngineState es) { - addDoubleSensor(sensor.name(), sensor, es); - } - - private void addDoubleSensor(String key, final Sensor sensor, EngineState es) { - addDoubleSensor(key, sensor, false, es); - } - - private void addDoubleSensor(final String key, final Sensor sensor, final boolean verbose, EngineState es) { - es.registerStringValueAction(key, new EngineState.ValueCallback() { - @Override - public void onUpdate(String stringValue) { - double value; - try { - value = Double.parseDouble(stringValue); - } catch (NumberFormatException e) { - // serial protocol is not safe - return; - } - setValue(value, sensor); - if (verbose) - MessagesCentral.getInstance().postMessage(EngineState.class, key + "=" + value); - } - }); - } - public interface SensorListener { void onSensorUpdate(double value); } diff --git a/java_console/ui/src/com/rusefi/EcuStimulator.java b/java_console/ui/src/com/rusefi/EcuStimulator.java index a1a836bb68..5c1f4f000c 100644 --- a/java_console/ui/src/com/rusefi/EcuStimulator.java +++ b/java_console/ui/src/com/rusefi/EcuStimulator.java @@ -39,9 +39,6 @@ public class EcuStimulator { public boolean isDisplayingFuel = true; - private static final Sensor DWELL_SENSOR = Sensor.DWELL0; - public static final Sensor ADVANCE_SENSOR = Sensor.ADVANCE0; - private static final int MEASURES = 7; // private static final String C_FILE_NAME = "advance_map.c"; // private static final String C_PREFIX = "ad_"; @@ -115,7 +112,7 @@ public class EcuStimulator { ChartHelper.setYRange(new Range(inputs.getEngineLoadMin(), inputs.getEngineLoadMax()), model); - buildTable(listener, DWELL_SENSOR); + //buildTable(listener, DWELL_SENSOR); try { csv.close(); @@ -150,7 +147,7 @@ public class EcuStimulator { /** * We are making a number of measurements and then we take the middle one */ - MultipleMeasurements r = waitForMultipleResults(dwellSensor, ADVANCE_SENSOR); + MultipleMeasurements r = waitForMultipleResults(dwellSensor, null); List dwells = r.getDwells(); List advances = r.getAdvances(); diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index 1c3e61f6a7..c0646a8ec2 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -46,7 +46,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; * @see EngineSnifferPanel */ public class Launcher { - public static final int CONSOLE_VERSION = 20190614; + public static final int CONSOLE_VERSION = 20190616; public static final boolean SHOW_STIMULATOR = false; public static final String INPUT_FILES_PATH = ".."; private static final String TAB_INDEX = "main_tab"; diff --git a/java_console/ui/src/com/rusefi/SensorLogger.java b/java_console/ui/src/com/rusefi/SensorLogger.java index 3471d59d17..6ac902e2f0 100644 --- a/java_console/ui/src/com/rusefi/SensorLogger.java +++ b/java_console/ui/src/com/rusefi/SensorLogger.java @@ -40,10 +40,8 @@ public class SensorLogger { Sensor.TARGET_AFR, Sensor.tCharge, Sensor.veValue, - Sensor.ENGINE_LOAD, Sensor.DWELL, - Sensor.TIMING, Sensor.baseFuel, Sensor.actualLastInjection, diff --git a/java_console/ui/src/com/rusefi/ui/GaugesPanel.java b/java_console/ui/src/com/rusefi/ui/GaugesPanel.java index fb0a36ef4b..aab44c315e 100644 --- a/java_console/ui/src/com/rusefi/ui/GaugesPanel.java +++ b/java_console/ui/src/com/rusefi/ui/GaugesPanel.java @@ -33,22 +33,19 @@ public class GaugesPanel { Sensor.CLT, Sensor.IAT, Sensor.TPS, + Sensor.MAP, - Sensor.MAP_RAW, Sensor.tCharge, - Sensor.DWELL1, - Sensor.DWELL0, - Sensor.DUTY0, - Sensor.ADVANCE0, - Sensor.BARO, Sensor.baseFuel, Sensor.cltCorrection, Sensor.iatCorrection, + Sensor.injectorLagMs, Sensor.lastErrorCode, Sensor.AFR, - Sensor.TIMING, - Sensor.VREF + Sensor.VBATT, + Sensor.VSS, + }; private static final String GAUGES_ROWS = "gauges_rows"; private static final String GAUGES_COLUMNS = "gauges_cols"; @@ -68,8 +65,8 @@ public class GaugesPanel { private final GaugesGrid gauges; private final Node config; - private boolean showRpmPanel = true; - private boolean showMessagesPanel = true; + private boolean showRpmPanel; + private boolean showMessagesPanel; private final JPanel lowerRpmPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0)); /** * this panel is displayed on the right diff --git a/java_console/ui/src/com/rusefi/ui/SizeSelectorPanel.java b/java_console/ui/src/com/rusefi/ui/SizeSelectorPanel.java index 7fd3b2a34f..68b1e15a5c 100644 --- a/java_console/ui/src/com/rusefi/ui/SizeSelectorPanel.java +++ b/java_console/ui/src/com/rusefi/ui/SizeSelectorPanel.java @@ -11,7 +11,7 @@ import java.util.ArrayList; import java.util.List; public class SizeSelectorPanel extends JPanel { - public static final int WIDTH = 7; + public static final int WIDTH = 5; public static final int HEIGHT = 3; private List elements = new ArrayList<>(); diff --git a/java_console/ui/src/com/rusefi/ui/engine/NameUtil.java b/java_console/ui/src/com/rusefi/ui/engine/NameUtil.java index c67c1b2712..73bef2dbf4 100644 --- a/java_console/ui/src/com/rusefi/ui/engine/NameUtil.java +++ b/java_console/ui/src/com/rusefi/ui/engine/NameUtil.java @@ -2,7 +2,6 @@ package com.rusefi.ui.engine; import com.rusefi.core.Sensor; -import java.util.Comparator; import java.util.Map; import java.util.TreeMap; @@ -15,13 +14,6 @@ public class NameUtil { public static final String CRANK1 = "t1"; protected static final Map name2sensor = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - static { - name2sensor.put("inj1", Sensor.INJECTOR_1_DWELL); - name2sensor.put("inj2", Sensor.INJECTOR_2_DWELL); - name2sensor.put("inj3", Sensor.INJECTOR_3_DWELL); - name2sensor.put("inj4", Sensor.INJECTOR_4_DWELL); - } - static String getUiName(String name) { if (name.isEmpty()) return name; diff --git a/java_console/ui/src/com/rusefi/ui/widgets/IdleLabel.java b/java_console/ui/src/com/rusefi/ui/widgets/IdleLabel.java index 772cd25511..7187e601c6 100644 --- a/java_console/ui/src/com/rusefi/ui/widgets/IdleLabel.java +++ b/java_console/ui/src/com/rusefi/ui/widgets/IdleLabel.java @@ -11,11 +11,11 @@ import javax.swing.*; */ public class IdleLabel extends JLabel { public IdleLabel() { - SensorCentral.getInstance().addListener(Sensor.IDLE_SWITCH, new SensorCentral.SensorListener() { - @Override - public void onSensorUpdate(double value) { - IdleLabel.this.setText("Idle: " + (value == 0)); - } - }); +// SensorCentral.getInstance().addListener(Sensor.IDLE_SWITCH, new SensorCentral.SensorListener() { +// @Override +// public void onSensorUpdate(double value) { +// IdleLabel.this.setText("Idle: " + (value == 0)); +// } +// }); } } diff --git a/java_console/ui/src/com/rusefi/ui/widgets/PotCommand.java b/java_console/ui/src/com/rusefi/ui/widgets/PotCommand.java index 364d1081a7..719920c089 100644 --- a/java_console/ui/src/com/rusefi/ui/widgets/PotCommand.java +++ b/java_console/ui/src/com/rusefi/ui/widgets/PotCommand.java @@ -32,6 +32,7 @@ public class PotCommand { }; ((SpinnerNumberModel) voltageSpinner.getModel()).setStepSize(0.1); voltageSpinner.setValue(1.0); +/* voltageSpinner.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { @@ -40,7 +41,7 @@ public class PotCommand { potSpinner.setValue(d); } }); - +*/ potSpinner = new JSpinner() { @Override