docs & progress
This commit is contained in:
parent
bde6b65c9a
commit
03259557b6
|
@ -4,5 +4,6 @@ output.c
|
|||
currenttune.msq
|
||||
rusefi.ini
|
||||
openocd
|
||||
DfuSe
|
||||
rusefi_*.*
|
||||
triggers
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,4 +46,10 @@ public class PortDetector {
|
|||
}
|
||||
return autoDetectedPort;
|
||||
}
|
||||
|
||||
public static String autoDetectSerialIfNeeded(String port) {
|
||||
if (!port.toLowerCase().startsWith("auto"))
|
||||
return port;
|
||||
return autoDetectSerial();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue