From a39d109cedd73dd06bf80745c06ef4d9500c9a9f Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 23 Aug 2022 17:42:18 -0400 Subject: [PATCH] DFU red dialog to print Windows version #4475 --- .../src/main/java/com/rusefi/maintenance/DfuFlasher.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java_console/ui/src/main/java/com/rusefi/maintenance/DfuFlasher.java b/java_console/ui/src/main/java/com/rusefi/maintenance/DfuFlasher.java index 754e6010a6..8bf2fa79e5 100644 --- a/java_console/ui/src/main/java/com/rusefi/maintenance/DfuFlasher.java +++ b/java_console/ui/src/main/java/com/rusefi/maintenance/DfuFlasher.java @@ -144,19 +144,24 @@ public class DfuFlasher { wnd.append("Please power cycle device to exit DFU mode"); } else if (stdout.toString().contains("Target device not found")) { wnd.append("ERROR: Device not connected or STM32 Bootloader driver not installed?"); + appendWindowsVersion(wnd); wnd.append("ERROR: Please try installing drivers using 'Install Drivers' button on rusEFI splash screen"); wnd.append("ERROR: Alternatively please install drivers using Device Manager pointing at 'drivers/silent_st_drivers/DFU_Driver' folder"); appendDeviceReport(wnd); wnd.setErrorState(true); } else { wnd.append(stdout.length() + " / " + errorResponse.length()); - wnd.append("ERROR: does not look like DFU has worked!"); + appendWindowsVersion(wnd); wnd.append("Windows " + System.getProperty("os.version")); appendDeviceReport(wnd); wnd.setErrorState(true); } } + private static void appendWindowsVersion(StatusWindow wnd) { + wnd.append("ERROR: does not look like DFU has worked!"); + } + private static void appendDeviceReport(StatusWindow wnd) { for (String line : getDevicesReport()) { if (line.contains("STM Device in DFU Mode")) {