Sometimes legacy DFU does not work #1477

This commit is contained in:
rusefi 2020-06-09 20:10:58 -04:00
parent 63ab889e2f
commit cd7a489ea9
2 changed files with 5 additions and 3 deletions

View File

@ -3,6 +3,6 @@ package com.rusefi;
import java.util.concurrent.atomic.AtomicReference;
public class rusEFIVersion {
public static final int CONSOLE_VERSION = 20200608;
public static final int CONSOLE_VERSION = 20200609;
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
}

View File

@ -98,8 +98,10 @@ public class DfuFlasher {
String errorResponse = ExecHelper.executeCommand(FirmwareFlasher.BINARY_LOCATION,
FirmwareFlasher.BINARY_LOCATION + File.separator + getDfuCommand(),
DFU_BINARY, wnd, stdout);
// looks like sometimes we are not catching the last line of the response? 'Upgrade' happens before 'Verify'
if (stdout.toString().contains("Verify successful") || stdout.toString().contains("Upgrade successful")) {
if (stdout.toString().contains("0x12340005")) {
wnd.appendMsg("Driver issue? Maybe driver conflict with STM32Cube? rusEFI currently uses older incompatible driver");
} else if (stdout.toString().contains("Verify successful") || stdout.toString().contains("Upgrade successful")) {
// looks like sometimes we are not catching the last line of the response? 'Upgrade' happens before 'Verify'
wnd.appendMsg("SUCCESS!");
} else {
if (stdout.length() == 0 && errorResponse.length() == 0) {