Something is still odd with some F7 boards - bricking on incremental flash #3566

This commit is contained in:
rusefillc 2021-12-21 22:46:02 -05:00
parent 2e8c806688
commit 1a269e261b
3 changed files with 23 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import com.rusefi.shared.ConnectionAndMeta;
import com.rusefi.shared.FileUtil;
import com.rusefi.ui.storage.PersistentConfiguration;
import com.rusefi.ui.util.FrameHelper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@ -204,6 +205,13 @@ public class Autoupdate {
}
}
@NotNull
public static String readBundleFullNameNotNull() {
String bundle = readBundleFullName();
bundle = bundle == null ? "unknown bundle" : bundle;
return bundle;
}
enum UpdateMode {
ALWAYS,
NEVER,

View File

@ -6,7 +6,7 @@ import java.net.URL;
import java.util.concurrent.atomic.AtomicReference;
public class rusEFIVersion {
public static final int CONSOLE_VERSION = 20211216;
public static final int CONSOLE_VERSION = 20211221;
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
public static long classBuildTimeMillis() {

View File

@ -89,8 +89,8 @@ public class StartupFrame {
@NotNull
public static String appendBundleName(String title) {
String bundleName = Autoupdate.readBundleFullName();
return title + " " + (bundleName != null ? bundleName : "Unknown bundle");
String bundleName = Autoupdate.readBundleFullNameNotNull();
return title + " " + bundleName;
}
public void chooseSerialPort() {
@ -183,6 +183,17 @@ public class StartupFrame {
JPanel rightPanel = new JPanel(new VerticalFlowLayout());
if (Autoupdate.readBundleFullNameNotNull().contains("proteus_f7")) {
URLLabel urlLabel = new URLLabel("WARNING: Proteus F7", "https://github.com/rusefi/rusefi/wiki/F7-requires-full-erase");
new Timer(500, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
urlLabel.setVisible(!urlLabel.isVisible());
}
}).start();
rightPanel.add(urlLabel);
}
JLabel logo = createLogoLabel();
if (logo != null)
rightPanel.add(logo);
@ -241,8 +252,7 @@ public class StartupFrame {
@Nullable
private static ImageIcon getBundleIcon() {
String bundle = Autoupdate.readBundleFullName();
bundle = bundle == null ? "" : bundle;
String bundle = Autoupdate.readBundleFullNameNotNull();
String logoName;
if (bundle.contains("proteus")) {
logoName = LOGO_PATH + "logo_proteus.png";