improvement: replacing popup with line into status window
This commit is contained in:
parent
197d7d7345
commit
8d1c78cce2
|
@ -43,7 +43,8 @@ public class DfuFlasher {
|
||||||
StatusWindow wnd = createStatusWindow();
|
StatusWindow wnd = createStatusWindow();
|
||||||
|
|
||||||
AtomicBoolean isSignatureValidated = rebootToDfu(parent, port, wnd);
|
AtomicBoolean isSignatureValidated = rebootToDfu(parent, port, wnd);
|
||||||
if (isSignatureValidated == null) return;
|
if (isSignatureValidated == null)
|
||||||
|
return;
|
||||||
if (isSignatureValidated.get()) {
|
if (isSignatureValidated.get()) {
|
||||||
if (!ProgramSelector.IS_WIN) {
|
if (!ProgramSelector.IS_WIN) {
|
||||||
wnd.append("Switched to DFU mode!");
|
wnd.append("Switched to DFU mode!");
|
||||||
|
@ -78,7 +79,7 @@ public class DfuFlasher {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (signature.get() == null) {
|
if (signature.get() == null) {
|
||||||
JOptionPane.showMessageDialog(ConsoleUI.getFrame(), "rusEFI has not responded on selected " + port + "\n" +
|
wnd.append("*** ERROR *** rusEFI has not responded on selected " + port + "\n" +
|
||||||
"Maybe try automatic serial port detection?");
|
"Maybe try automatic serial port detection?");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +95,7 @@ public class DfuFlasher {
|
||||||
return null;
|
return null;
|
||||||
}).getSerialPort();
|
}).getSerialPort();
|
||||||
if (port == null) {
|
if (port == null) {
|
||||||
JOptionPane.showMessageDialog(ConsoleUI.getFrame(), "rusEFI serial port not detected");
|
wnd.append("*** ERROR *** rusEFI serial port not detected");
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
wnd.append("Detected rusEFI on " + port + "\n");
|
wnd.append("Detected rusEFI on " + port + "\n");
|
||||||
|
@ -152,7 +153,6 @@ public class DfuFlasher {
|
||||||
} else {
|
} else {
|
||||||
wnd.append(stdout.length() + " / " + errorResponse.length());
|
wnd.append(stdout.length() + " / " + errorResponse.length());
|
||||||
appendWindowsVersion(wnd);
|
appendWindowsVersion(wnd);
|
||||||
wnd.append("Windows " + System.getProperty("os.version"));
|
|
||||||
appendDeviceReport(wnd);
|
appendDeviceReport(wnd);
|
||||||
wnd.setErrorState(true);
|
wnd.setErrorState(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue