softer port auto-detection check

This commit is contained in:
rusefi 2019-12-23 23:36:37 -05:00
parent c38b4545eb
commit be44b493b4
2 changed files with 3 additions and 2 deletions

View File

@ -49,7 +49,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
* @see EngineSnifferPanel * @see EngineSnifferPanel
*/ */
public class Launcher { public class Launcher {
public static final int CONSOLE_VERSION = 20191222; public static final int CONSOLE_VERSION = 20191223;
public static final String INI_FILE_PATH = System.getProperty("ini_file_path", ".."); public static final String INI_FILE_PATH = System.getProperty("ini_file_path", "..");
public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", ".."); public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", "..");
public static final String TOOLS_PATH = System.getProperty("tools_path", "."); public static final String TOOLS_PATH = System.getProperty("tools_path", ".");

View File

@ -41,7 +41,8 @@ class SerialAutoChecker implements Runnable {
return; return;
String message = new String(response, 1, response.length - 1); String message = new String(response, 1, response.length - 1);
System.out.println("Got " + message + " from " + serialPort); System.out.println("Got " + message + " from " + serialPort);
if (message.startsWith(Fields.TS_SIGNATURE)) { String signatureWithoutMinorVersion = Fields.TS_SIGNATURE.substring(0, Fields.TS_SIGNATURE.length() - 2);
if (message.startsWith(signatureWithoutMinorVersion)) {
result.set(serialPort); result.set(serialPort);
portFound.countDown(); portFound.countDown();
} }