From 43c051f8a219aeff53bec10e241598c70870d274 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 17 Dec 2017 14:33:51 -0500 Subject: [PATCH] fix #513 --- README.md | 1 + firmware/svnversion.h | 4 ++-- java_console/ui/src/com/rusefi/Launcher.java | 2 +- .../src/com/rusefi/maintenance/EraseChip.java | 21 ++++++++++--------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a1c80badcc..8397daf312 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ current binaries are always available at http://rusefi.com/build_server/ | Release date | Revision | Details | | ------------ | --------- | ------- | +| 12/17/2017 | r14892 | bugfix #513: console: erase on older chips does not work | | 11/26/2017 | r14789 | bugfix #500: set_rpn_expression command is broken | | 11/23/2017 | r14779 | bugfix #497: engine does not start with SD card | | 11/19/2017 | r14766 | improvement #496: console flasher to support older boards | diff --git a/firmware/svnversion.h b/firmware/svnversion.h index c4fada8c37..10868f6ed2 100644 --- a/firmware/svnversion.h +++ b/firmware/svnversion.h @@ -1,5 +1,5 @@ // This file was generated by Version2Header -// Sun Nov 26 17:50:40 EST 2017 +// Sun Dec 17 14:32:31 EST 2017 #ifndef VCS_VERSION -#define VCS_VERSION "14789" +#define VCS_VERSION "14892" #endif diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index c022eceba0..453575ddcf 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -45,7 +45,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; * @see EngineSnifferPanel */ public class Launcher { - public static final int CONSOLE_VERSION = 20171213; + public static final int CONSOLE_VERSION = 20171217; public static final boolean SHOW_STIMULATOR = false; private static final String TAB_INDEX = "main_tab"; protected static final String PORT_KEY = "port"; diff --git a/java_console/ui/src/com/rusefi/maintenance/EraseChip.java b/java_console/ui/src/com/rusefi/maintenance/EraseChip.java index 6ac20da58d..302eb7ac2c 100644 --- a/java_console/ui/src/com/rusefi/maintenance/EraseChip.java +++ b/java_console/ui/src/com/rusefi/maintenance/EraseChip.java @@ -1,5 +1,7 @@ package com.rusefi.maintenance; +import org.jetbrains.annotations.NotNull; + import javax.swing.*; import java.awt.event.ActionEvent; @@ -7,11 +9,10 @@ import java.awt.event.ActionEvent; * (c) Andrey Belomutskiy 2013-2017 */ public class EraseChip extends ProcessStatusWindow { - private final JButton button = new JButton("Erase Chip"); - private static final String FLASH_SIZE = "0x0100000"; - private static final String OPEN_OCD_COMMAND = FirmwareFlasher.getOpenovdCommad() + - " -c init -c targets -c \"halt\" -c \"flash erase_address 0x08000000 " + FLASH_SIZE + "\" -c shutdown"; + 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("Erase Chip"); public EraseChip() { button.addActionListener(new AbstractAction() { @@ -22,16 +23,16 @@ public class EraseChip extends ProcessStatusWindow { if (dialogResult != JOptionPane.YES_OPTION) return; wnd.showFrame("rusEfi Firmware Flasher"); - submitAction(new Runnable() { - @Override - public void run() { - executeCommand(OPEN_OCD_COMMAND); - } - }); + submitAction(() -> executeCommand(getEraseCommand())); } }); } + @NotNull + private String getEraseCommand() { + return FirmwareFlasher.getOpenovdCommad() + ERASE_COMMAND_SUFFIX; + } + public JButton getButton() { return button; }