From 2526d7897e84ef8b016e0b3c0753e068e3e0c588 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 13 Jan 2019 16:19:32 -0500 Subject: [PATCH] migrating console away from text protocol --- .../models/src/com/rusefi/core/Sensor.java | 14 ++++++++++---- java_console/ui/src/com/rusefi/Launcher.java | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/java_console/models/src/com/rusefi/core/Sensor.java b/java_console/models/src/com/rusefi/core/Sensor.java index 89d7e2e5a9..f047219b4a 100644 --- a/java_console/models/src/com/rusefi/core/Sensor.java +++ b/java_console/models/src/com/rusefi/core/Sensor.java @@ -17,7 +17,7 @@ import static com.rusefi.config.Fields.*; * 2/11/13 */ public enum Sensor { - MAP("MAP", SensorCategory.SENSOR_INPUTS), + 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 @@ -26,9 +26,9 @@ public enum Sensor { /** * Please note that these enum names are used to make 'set_mock_XXX_voltage' commands */ - CLT("Coolant", SensorCategory.SENSOR_INPUTS, "temperature, C", -40, 300), - AFR("A/F ratio", SensorCategory.SENSOR_INPUTS, "", 0, 20), - MAF("MAF", SensorCategory.SENSOR_INPUTS, "Volts", 4), + 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), @@ -197,6 +197,12 @@ public enum Sensor { this(name, category, type, offset, color, 0, 100); } + /** + * Text-based protocol is not very alive + * @param name + * @param category + */ + @Deprecated Sensor(String name, SensorCategory category) { this(name, category, "", 255); } diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index f3e22261eb..ea7f7128b5 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -45,7 +45,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; * @see EngineSnifferPanel */ public class Launcher { - public static final int CONSOLE_VERSION = 20190112; + public static final int CONSOLE_VERSION = 20190113; public static final boolean SHOW_STIMULATOR = false; private static final String TAB_INDEX = "main_tab"; protected static final String PORT_KEY = "port";