only:extract method

This commit is contained in:
rusefi 2023-06-30 00:00:02 -04:00
parent bdfb4ae25e
commit c225cea734
1 changed files with 7 additions and 3 deletions

View File

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