From 655415641401013b808be0cfbd3982825dac0992 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 5 Jul 2020 20:08:57 -0400 Subject: [PATCH] restoring auto-connect feature --- .../main/java/com/rusefi/autodetect/SerialAutoChecker.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java_console/ui/src/main/java/com/rusefi/autodetect/SerialAutoChecker.java b/java_console/ui/src/main/java/com/rusefi/autodetect/SerialAutoChecker.java index d9520184ed..4757bc9acf 100644 --- a/java_console/ui/src/main/java/com/rusefi/autodetect/SerialAutoChecker.java +++ b/java_console/ui/src/main/java/com/rusefi/autodetect/SerialAutoChecker.java @@ -48,9 +48,8 @@ public class SerialAutoChecker implements Runnable { return; String signature = new String(response, 1, response.length - 1); SIGNATURE = signature; - System.out.println("Got " + signature + " from " + serialPort); - String signatureWithoutMinorVersion = Fields.TS_SIGNATURE.substring(0, Fields.TS_SIGNATURE.length() - 2); - if (signature.startsWith(signatureWithoutMinorVersion)) { + System.out.println("Got signature=" + signature + " from " + serialPort); + if (signature.startsWith(Fields.PROTOCOL_SIGNATURE_PREFIX)) { if (callback != null) { callback.apply(stream); }