diff --git a/java_console/models/src/com/rusefi/core/EngineState.java b/java_console/models/src/com/rusefi/core/EngineState.java index 8d7d51166e..78616831f2 100644 --- a/java_console/models/src/com/rusefi/core/EngineState.java +++ b/java_console/models/src/com/rusefi/core/EngineState.java @@ -36,6 +36,9 @@ public class EngineState { registerStringValueAction(key, callback); } + /** + * text protocol key and callback associated with this key + */ private static class StringActionPair extends Pair> { public final String prefix; @@ -206,8 +209,21 @@ public class EngineState { } if (originalResponse.length() == response.length()) { FileLog.MAIN.logLine("EngineState.unknown: " + response); - // discarding invalid line - return ""; + int keyEnd = response.indexOf(SEPARATOR); + if (keyEnd == -1) { + // discarding invalid line + return ""; + } + String unknownKey = response.substring(0, keyEnd); + int valueEnd = response.indexOf(SEPARATOR, keyEnd + 1); + if (valueEnd == -1) { + // discarding invalid line + return ""; + } + String value = response.substring(keyEnd, valueEnd); + FileLog.MAIN.logLine("Invalid key [" + unknownKey + "] value [" + value + "]"); + // trying to process the rest of the line + response = response.substring(valueEnd + SEPARATOR.length()); } return response; } diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index d82e7a8528..9da1a106fc 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -36,7 +36,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; * @see EngineSnifferPanel */ public class Launcher { - public static final int CONSOLE_VERSION = 20160528; + public static final int CONSOLE_VERSION = 20160604; public static final boolean SHOW_STIMULATOR = false; private static final String TAB_INDEX = "main_tab"; protected static final String PORT_KEY = "port";