bundle name into DFU window title
This commit is contained in:
parent
68655d73f8
commit
53e44ed322
|
@ -69,8 +69,7 @@ public class StartupFrame {
|
||||||
public StartupFrame() {
|
public StartupFrame() {
|
||||||
// AudioPlayback.start();
|
// AudioPlayback.start();
|
||||||
String title = "rusEFI console version " + Launcher.CONSOLE_VERSION;
|
String title = "rusEFI console version " + Launcher.CONSOLE_VERSION;
|
||||||
String bundleName = Autoupdate.readBundleFullName();
|
frame = new JFrame(appendBundleName(title));
|
||||||
frame = new JFrame(title + " " + (bundleName != null ? bundleName : "Unknown bundle"));
|
|
||||||
frame.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
frame.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
||||||
frame.addWindowListener(new WindowAdapter() {
|
frame.addWindowListener(new WindowAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -85,6 +84,12 @@ public class StartupFrame {
|
||||||
SerialPortScanner.INSTANCE.startTimer();
|
SerialPortScanner.INSTANCE.startTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public static String appendBundleName(String title) {
|
||||||
|
String bundleName = Autoupdate.readBundleFullName();
|
||||||
|
return title + " " + (bundleName != null ? bundleName : "Unknown bundle");
|
||||||
|
}
|
||||||
|
|
||||||
public void chooseSerialPort() {
|
public void chooseSerialPort() {
|
||||||
realHardwarePanel.setBorder(new TitledBorder(BorderFactory.createLineBorder(Color.darkGray), "Real stm32"));
|
realHardwarePanel.setBorder(new TitledBorder(BorderFactory.createLineBorder(Color.darkGray), "Real stm32"));
|
||||||
miscPanel.setBorder(new TitledBorder(BorderFactory.createLineBorder(Color.darkGray), "Miscellaneous"));
|
miscPanel.setBorder(new TitledBorder(BorderFactory.createLineBorder(Color.darkGray), "Miscellaneous"));
|
||||||
|
|
|
@ -18,6 +18,8 @@ import java.awt.event.ActionListener;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
|
import static com.rusefi.StartupFrame.appendBundleName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see FirmwareFlasher
|
* @see FirmwareFlasher
|
||||||
*/
|
*/
|
||||||
|
@ -69,14 +71,14 @@ public class DfuFlasher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatusWindow wnd = new StatusWindow();
|
StatusWindow wnd = new StatusWindow();
|
||||||
wnd.showFrame("DFU status " + Launcher.CONSOLE_VERSION);
|
wnd.showFrame(appendBundleName("DFU status " + Launcher.CONSOLE_VERSION));
|
||||||
wnd.appendMsg(messages.toString());
|
wnd.appendMsg(messages.toString());
|
||||||
ExecHelper.submitAction(() -> executeDFU(wnd), DfuFlasher.class + " thread");
|
ExecHelper.submitAction(() -> executeDFU(wnd), DfuFlasher.class + " thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void runDfuProgramming() {
|
public static void runDfuProgramming() {
|
||||||
StatusWindow wnd = new StatusWindow();
|
StatusWindow wnd = new StatusWindow();
|
||||||
wnd.showFrame("DFU status " + Launcher.CONSOLE_VERSION);
|
wnd.showFrame(appendBundleName("DFU status " + Launcher.CONSOLE_VERSION));
|
||||||
ExecHelper.submitAction(() -> executeDFU(wnd), DfuFlasher.class + " thread");
|
ExecHelper.submitAction(() -> executeDFU(wnd), DfuFlasher.class + " thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue