making help link more visible
This commit is contained in:
parent
1ca407f391
commit
b45aba9a3a
|
@ -6,7 +6,7 @@ import java.net.URL;
|
|||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class rusEFIVersion {
|
||||
public static final int CONSOLE_VERSION = 20211030;
|
||||
public static final int CONSOLE_VERSION = 20211031;
|
||||
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
||||
|
||||
public static long classBuildTimeMillis() {
|
||||
|
|
|
@ -143,9 +143,6 @@ public class StartupFrame {
|
|||
ProgramSelector selector = new ProgramSelector(comboPorts);
|
||||
realHardwarePanel.add(selector.getControl(), "right, wrap");
|
||||
|
||||
|
||||
// realHardwarePanel.add(new DfuFlasher(comboPorts).getAutoButton());
|
||||
// realHardwarePanel.add(new DfuFlasher(comboPorts).getManualButton());
|
||||
// for F7 builds we just build one file at the moment
|
||||
// realHardwarePanel.add(new FirmwareFlasher(FirmwareFlasher.IMAGE_FILE, "ST-LINK Program Firmware", "Default firmware version for most users").getButton());
|
||||
if (new File(FirmwareFlasher.IMAGE_NO_ASSERTS_FILE).exists()) {
|
||||
|
@ -153,7 +150,12 @@ public class StartupFrame {
|
|||
FirmwareFlasher firmwareFlasher = new FirmwareFlasher(FirmwareFlasher.IMAGE_NO_ASSERTS_FILE, "ST-LINK Program Firmware/NoAsserts", "Please only use this version if you know that you need this version");
|
||||
realHardwarePanel.add(firmwareFlasher.getButton(), "right, wrap");
|
||||
}
|
||||
realHardwarePanel.add(new EraseChip().getButton(), "right, wrap");
|
||||
JComponent updateHelp = ProgramSelector.createHelpButton();
|
||||
|
||||
realHardwarePanel.add(updateHelp, "right, wrap");
|
||||
|
||||
// st-link is pretty advanced use-case, real humans do not have st-link as of 2021
|
||||
//realHardwarePanel.add(new EraseChip().getButton(), "right, wrap");
|
||||
}
|
||||
|
||||
SerialPortScanner.INSTANCE.listeners.add(() -> SwingUtilities.invokeLater(this::applyKnownPorts));
|
||||
|
|
|
@ -17,7 +17,7 @@ public class EraseChip {
|
|||
private static final String ERASE_COMMAND_SUFFIX = " -c init -c targets -c \"halt\" -c \"flash erase_address 0x08000000 " + FLASH_SIZE + "\" -c shutdown";
|
||||
|
||||
private final JButton button = new JButton("ST-LINK Erase Chip", AutoupdateUtil.loadIcon("erase.png"));
|
||||
private StatusWindow wnd = new StatusWindow();
|
||||
private final StatusWindow wnd = new StatusWindow();
|
||||
|
||||
public EraseChip() {
|
||||
button.addActionListener(new AbstractAction() {
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi.maintenance;
|
|||
|
||||
import com.rusefi.autoupdate.AutoupdateUtil;
|
||||
import com.rusefi.ui.util.URLLabel;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
@ -42,9 +43,6 @@ public class ProgramSelector {
|
|||
JButton updateFirmware = new JButton("Update Firmware",
|
||||
AutoupdateUtil.loadIcon("upload48.jpg"));
|
||||
controls.add(updateFirmware);
|
||||
JButton updateHelp = new JButton("?");
|
||||
updateHelp.addActionListener(e -> URLLabel.open(HELP));
|
||||
controls.add(updateHelp);
|
||||
|
||||
updateFirmware.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
|
@ -69,6 +67,11 @@ public class ProgramSelector {
|
|||
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static JComponent createHelpButton() {
|
||||
return new URLLabel("HOWTO Update Firmware", HELP);
|
||||
}
|
||||
|
||||
public JPanel getControl() {
|
||||
return controls;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue