From c225cea734ec10389ddbe6a2374d15f23098aef1 Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 30 Jun 2023 00:00:02 -0400 Subject: [PATCH] only:extract method --- .../main/java/com/rusefi/maintenance/DfuFlasher.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 5055d9e736..dd1dac7301 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 @@ -120,14 +120,18 @@ public class DfuFlasher { public static void runDfuErase() { StatusWindow wnd = createStatusWindow(); submitAction(() -> { - ExecHelper.executeCommand(DFU_BINARY_LOCATION, - getDfuEraseCommand(), - DFU_BINARY, wnd, new StringBuffer()); + runDfuErase(wnd); // it's a lengthy operation let's signal end Toolkit.getDefaultToolkit().beep(); }); } + private static void runDfuErase(StatusWindow wnd) { + ExecHelper.executeCommand(DFU_BINARY_LOCATION, + getDfuEraseCommand(), + DFU_BINARY, wnd, new StringBuffer()); + } + public static void runDfuProgramming() { StatusWindow wnd = createStatusWindow(); submitAction(() -> executeDFU(wnd));