mirror of https://github.com/FOME-Tech/fome-fw.git
"wrong bundle" warning text sometimes not visible #3267
This commit is contained in:
parent
74a7c08e5c
commit
8ed79dca53
|
@ -32,6 +32,8 @@ public class DfuHelper {
|
||||||
if (!bundleName.equalsIgnoreCase(s.getBundle())) {
|
if (!bundleName.equalsIgnoreCase(s.getBundle())) {
|
||||||
String message = String.format("You have \"%s\" controller does not look right to program it with \"%s\"", s.getBundle(), bundleName);
|
String message = String.format("You have \"%s\" controller does not look right to program it with \"%s\"", s.getBundle(), bundleName);
|
||||||
FileLog.MAIN.logLine(message);
|
FileLog.MAIN.logLine(message);
|
||||||
|
|
||||||
|
SwingUtilities.invokeLater(() -> {
|
||||||
JOptionPane.showMessageDialog(parent, message);
|
JOptionPane.showMessageDialog(parent, message);
|
||||||
// in case of mismatched bundle type we are supposed do close connection
|
// in case of mismatched bundle type we are supposed do close connection
|
||||||
// and properly handle the case of user hitting "Update Firmware" again
|
// and properly handle the case of user hitting "Update Firmware" again
|
||||||
|
@ -42,6 +44,8 @@ public class DfuHelper {
|
||||||
sleep(5 * SECOND);
|
sleep(5 * SECOND);
|
||||||
System.exit(-5);
|
System.exit(-5);
|
||||||
}).start();
|
}).start();
|
||||||
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue