more tools to work with TCP/IP

This commit is contained in:
rusefillc 2020-10-09 00:12:38 -04:00
parent 8fc8898dde
commit 635866c588
4 changed files with 15 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<option name="MAIN_CLASS_NAME" value="com.rusefi.Launcher" /> <option name="MAIN_CLASS_NAME" value="com.rusefi.Launcher" />
<module name="ui" /> <module name="ui" />
<option name="PROGRAM_PARAMETERS" value="detect" /> <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"> <method v="2">
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>

View File

@ -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>

View File

@ -30,6 +30,9 @@ public class PortDetector {
*/ */
@Nullable @Nullable
public static String autoDetectSerial(Function<IoStream, Void> callback) { public static String autoDetectSerial(Function<IoStream, Void> callback) {
String rusEfiAddress = System.getProperty("rusefi.address");
if (rusEfiAddress != null)
return rusEfiAddress;
String[] serialPorts = getPortNames(); String[] serialPorts = getPortNames();
if (serialPorts.length == 0) { if (serialPorts.length == 0) {
log.error("No serial ports detected"); log.error("No serial ports detected");

View File

@ -311,9 +311,6 @@ public class ConsoleTools {
@Nullable @Nullable
private static String autoDetectPort() { private static String autoDetectPort() {
String rusEfiAddress = System.getProperty("rusefi.address");
if (rusEfiAddress != null)
return rusEfiAddress;
String autoDetectedPort = PortDetector.autoDetectSerial(null); String autoDetectedPort = PortDetector.autoDetectSerial(null);
if (autoDetectedPort == null) { if (autoDetectedPort == null) {
System.err.println(RUS_EFI_NOT_DETECTED); System.err.println(RUS_EFI_NOT_DETECTED);