mirror of https://github.com/rusefi/rusefi-1.git
more tools to work with TCP/IP
This commit is contained in:
parent
8fc8898dde
commit
635866c588
|
@ -3,7 +3,7 @@
|
|||
<option name="MAIN_CLASS_NAME" value="com.rusefi.Launcher" />
|
||||
<module name="ui" />
|
||||
<option name="PROGRAM_PARAMETERS" value="detect" />
|
||||
<option name="VM_PARAMETERS" value="-Dtools_path=../misc/install -Dinput_files_path=../firmware/deliver -Dini_file_path=../firmware/tunerstudio -Dshow_etb_pane=true" />
|
||||
<option name="VM_PARAMETERS" value="-Drusefi.address=:29001 -Dtools_path=../misc/install -Dinput_files_path=../firmware/deliver -Dini_file_path=../firmware/tunerstudio -Dshow_etb_pane=true" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="read_tune" type="Application" factoryName="Application">
|
||||
<option name="MAIN_CLASS_NAME" value="com.rusefi.Launcher" />
|
||||
<module name="ui" />
|
||||
<option name="PROGRAM_PARAMETERS" value="read_tune" />
|
||||
<option name="VM_PARAMETERS" value="-Drusefi.address=:29001 -Dtools_path=../misc/install -Dinput_files_path=../firmware/deliver -Dini_file_path=../firmware/tunerstudio -Dshow_etb_pane=true" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
|
@ -30,6 +30,9 @@ public class PortDetector {
|
|||
*/
|
||||
@Nullable
|
||||
public static String autoDetectSerial(Function<IoStream, Void> callback) {
|
||||
String rusEfiAddress = System.getProperty("rusefi.address");
|
||||
if (rusEfiAddress != null)
|
||||
return rusEfiAddress;
|
||||
String[] serialPorts = getPortNames();
|
||||
if (serialPorts.length == 0) {
|
||||
log.error("No serial ports detected");
|
||||
|
|
|
@ -311,9 +311,6 @@ public class ConsoleTools {
|
|||
|
||||
@Nullable
|
||||
private static String autoDetectPort() {
|
||||
String rusEfiAddress = System.getProperty("rusefi.address");
|
||||
if (rusEfiAddress != null)
|
||||
return rusEfiAddress;
|
||||
String autoDetectedPort = PortDetector.autoDetectSerial(null);
|
||||
if (autoDetectedPort == null) {
|
||||
System.err.println(RUS_EFI_NOT_DETECTED);
|
||||
|
|
Loading…
Reference in New Issue