docs & progress

This commit is contained in:
rusefi 2019-08-14 23:02:51 -04:00
parent bde6b65c9a
commit 03259557b6
4 changed files with 13 additions and 5 deletions

View File

@ -4,5 +4,6 @@ output.c
currenttune.msq
rusefi.ini
openocd
DfuSe
rusefi_*.*
triggers

View File

@ -19,6 +19,9 @@ import java.awt.*;
* (c) Andrey Belomutskiy
*/
public class PortHolder {
/**
* Nasty code: this field is not final, we have UI which overrides this default!
*/
public static int BAUD_RATE = 115200;
private static PortHolder instance = new PortHolder();
private final Object portLock = new Object();

View File

@ -375,12 +375,10 @@ public class Launcher {
port = args[0];
if (isPortDefined && port.toLowerCase().startsWith("auto")) {
String autoDetectedPort = PortDetector.autoDetectSerial();
if (autoDetectedPort == null) {
if (isPortDefined) {
port = PortDetector.autoDetectSerialIfNeeded(port);
if (port == null) {
isPortDefined = false;
} else {
port = autoDetectedPort;
}
}

View File

@ -46,4 +46,10 @@ public class PortDetector {
}
return autoDetectedPort;
}
public static String autoDetectSerialIfNeeded(String port) {
if (!port.toLowerCase().startsWith("auto"))
return port;
return autoDetectSerial();
}
}