diff --git a/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java b/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java index 59d4ace43e..c81e8ea8cc 100644 --- a/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java +++ b/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java @@ -496,7 +496,13 @@ public class BinaryProtocol implements BinaryProtocolCommands { } else if (sensor.getType() == FieldType.INT) { int value = bb.getInt(); SensorCentral.getInstance().setValue(value, sensor); - } + } else if (sensor.getType() == FieldType.INT16) { + int value = bb.getInt() & 0xFFFF; + SensorCentral.getInstance().setValue(value, sensor); + } else if (sensor.getType() == null) { + // do nothing for old text sensors which I am suprised are still in the code + } else + throw new UnsupportedOperationException("type " + sensor.getType()); } return true; } diff --git a/java_console/models/src/com/rusefi/config/FieldType.java b/java_console/models/src/com/rusefi/config/FieldType.java index 39c2b75c0b..fd4a144b95 100644 --- a/java_console/models/src/com/rusefi/config/FieldType.java +++ b/java_console/models/src/com/rusefi/config/FieldType.java @@ -2,6 +2,7 @@ package com.rusefi.config; public enum FieldType { INT, + INT16, BIT, FLOAT; diff --git a/java_console/models/src/com/rusefi/core/Sensor.java b/java_console/models/src/com/rusefi/core/Sensor.java index ca394a89ad..89d7e2e5a9 100644 --- a/java_console/models/src/com/rusefi/core/Sensor.java +++ b/java_console/models/src/com/rusefi/core/Sensor.java @@ -3,6 +3,7 @@ package com.rusefi.core; import com.rusefi.config.FieldType; import com.rusefi.config.Fields; import eu.hansolo.steelseries.tools.BackgroundColor; +import org.jetbrains.annotations.Nullable; import java.util.Collection; import java.util.Comparator; @@ -113,7 +114,7 @@ public enum Sensor { deltaTps(SensorCategory.FUEL, FieldType.FLOAT, 116, BackgroundColor.MUD), engineLoadAccelDelta(SensorCategory.FUEL, FieldType.FLOAT, 124, BackgroundColor.MUD), tpsAccelFuel(Fields.GAUGE_NAME_FUEL_TPS_EXTRA, SensorCategory.FUEL, FieldType.FLOAT, 128, BackgroundColor.MUD), - PPS("pedal", SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, 126, BackgroundColor.MUD), // pedal position sensor + PPS("pedal", SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, 136, BackgroundColor.MUD), // pedal position sensor injectorDutyCycle(Fields.GAUGE_NAME_FUEL_INJ_DUTY, SensorCategory.OPERATIONS, FieldType.FLOAT, 140, BackgroundColor.MUD), wallFuelAmount(SensorCategory.FUEL, FieldType.FLOAT, 160, BackgroundColor.MUD), @@ -148,6 +149,9 @@ public enum Sensor { debugFloatField7(GAUGE_NAME_DEBUG_F7, SensorCategory.OPERATIONS, FieldType.FLOAT, 260, BackgroundColor.MUD, 0, 5), coilDutyCycle(Fields.GAUGE_NAME_DWELL_DUTY, SensorCategory.OPERATIONS, FieldType.FLOAT, 272, BackgroundColor.MUD), + debugIntField4("debug i4", SensorCategory.OPERATIONS, FieldType.INT16, 292, BackgroundColor.MUD, 0, 5), + debugIntField5("debug i5", SensorCategory.OPERATIONS, 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), ; @@ -158,6 +162,7 @@ public enum Sensor { private final double minValue; private final double maxValue; private final BackgroundColor color; + @Nullable private final FieldType type; private final int offset; diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index c20b2dee8b..b776cbe25b 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 = 20181007; + public static final int CONSOLE_VERSION = 20181010; public static final boolean SHOW_STIMULATOR = false; private static final String TAB_INDEX = "main_tab"; protected static final String PORT_KEY = "port"; diff --git a/java_console/ui/src/com/rusefi/SensorLogger.java b/java_console/ui/src/com/rusefi/SensorLogger.java index 00e74e9fe9..475a2bdeb3 100644 --- a/java_console/ui/src/com/rusefi/SensorLogger.java +++ b/java_console/ui/src/com/rusefi/SensorLogger.java @@ -79,6 +79,8 @@ public class SensorLogger { Sensor.debugIntField1, Sensor.debugIntField2, Sensor.debugIntField3, + Sensor.debugIntField4, + Sensor.debugIntField5, Sensor.errorCodeCounter, Sensor.lastErrorCode, @@ -194,6 +196,12 @@ public class SensorLogger { if (sensor == Sensor.debugIntField2 && isPidDebugMode(debugMode)) { return "PID: offset"; } + if (sensor == Sensor.debugIntField3 && isPidDebugMode(debugMode)) { + return "PID: counter"; + } + if (sensor == Sensor.debugIntField4 && isPidDebugMode(debugMode)) { + return "PID: period"; + } return sensor.getName(); } diff --git a/java_console/ui/src/com/rusefi/ui/widgets/EtbTestSequence.java b/java_console/ui/src/com/rusefi/ui/widgets/EtbTestSequence.java index a735b14eeb..03a3c569ca 100644 --- a/java_console/ui/src/com/rusefi/ui/widgets/EtbTestSequence.java +++ b/java_console/ui/src/com/rusefi/ui/widgets/EtbTestSequence.java @@ -41,8 +41,15 @@ public class EtbTestSequence { static { FIRST_STEP - .addNext(5 * SECOND, 30) - .addNext(10 * SECOND, 50); + .addNext(5 * SECOND, 10) + .addNext(10 * SECOND, 30) + .addNext(10 * SECOND, 50) + .addNext(10 * SECOND, 70) + .addNext(10 * SECOND, 100) + .addNext(10 * SECOND, 50) + .addNext(10 * SECOND, 70) + .addNext(10 * SECOND, 0) + ; } public EtbTestSequence() {