rusEFI firmware feature should be honest about it's Windows-only limitation

This commit is contained in:
rusefillc 2021-09-27 21:36:47 -04:00
parent b1e98dbaad
commit cc02474dcd
4 changed files with 14 additions and 5 deletions

View File

@ -30,6 +30,7 @@ All notable user-facing or behavior-altering changes will be documented in this
### Added ### Added
- Ford PIP trigger decoder https://github.com/rusefi/rusefi/wiki/Images/triggers/trigger_65.png - Ford PIP trigger decoder https://github.com/rusefi/rusefi/wiki/Images/triggers/trigger_65.png
- Dwell battery voltage correction table - Dwell battery voltage correction table
- rusEFI firmware feature should be honest about it's Windows-only limitation
### Fixed ### Fixed
- Fix of 36/2/2/2 attributes to help rotary #3242 - Fix of 36/2/2/2 attributes to help rotary #3242

View File

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

View File

@ -25,7 +25,7 @@ import static com.rusefi.StartupFrame.appendBundleName;
* @see FirmwareFlasher * @see FirmwareFlasher
*/ */
public class DfuFlasher { public class DfuFlasher {
public static final String DFU_BINARY = Launcher.TOOLS_PATH + File.separator + "DfuSe/DfuSeCommand.exe"; private static final String DFU_BINARY = Launcher.TOOLS_PATH + File.separator + "DfuSe/DfuSeCommand.exe";
private static final String DFU_SETUP_EXE = "https://github.com/rusefi/rusefi_external_utils/raw/master/DFU_mode/DfuSe_Demo_V3.0.6_Setup.exe"; private static final String DFU_SETUP_EXE = "https://github.com/rusefi/rusefi_external_utils/raw/master/DFU_mode/DfuSe_Demo_V3.0.6_Setup.exe";
public static void doAutoDfu(Object selectedItem, JComponent parent) { public static void doAutoDfu(Object selectedItem, JComponent parent) {
@ -70,6 +70,11 @@ public class DfuFlasher {
wnd.showFrame(appendBundleName("DFU status " + Launcher.CONSOLE_VERSION)); wnd.showFrame(appendBundleName("DFU status " + Launcher.CONSOLE_VERSION));
wnd.appendMsg(messages.toString()); wnd.appendMsg(messages.toString());
if (isSignatureValidated.get()) { if (isSignatureValidated.get()) {
if (!ProgramSelector.IS_WIN) {
wnd.appendMsg("Switched to DFU mode!");
wnd.appendMsg("rusEFI console can only program on Windows");
return;
}
ExecHelper.submitAction(() -> executeDFU(wnd), DfuFlasher.class + " thread"); ExecHelper.submitAction(() -> executeDFU(wnd), DfuFlasher.class + " thread");
} else { } else {
wnd.appendMsg("Please use manual DFU to change bundle type."); wnd.appendMsg("Please use manual DFU to change bundle type.");

View File

@ -16,6 +16,7 @@ public class ProgramSelector {
private static final String AUTO_DFU = "Auto DFU"; private static final String AUTO_DFU = "Auto DFU";
private static final String MANUAL_DFU = "Manual DFU"; private static final String MANUAL_DFU = "Manual DFU";
private static final String ST_LINK = "ST-LINK"; private static final String ST_LINK = "ST-LINK";
public static final boolean IS_WIN = System.getProperty("os.name").toLowerCase().contains("win");
private static final String HELP = "https://github.com/rusefi/rusefi/wiki/HOWTO-Update-Firmware"; private static final String HELP = "https://github.com/rusefi/rusefi/wiki/HOWTO-Update-Firmware";
@ -27,8 +28,10 @@ public class ProgramSelector {
* todo: add FULL AUTO mode which would fire up DFU and ST-LINK in parallel hoping that one of those would work? * todo: add FULL AUTO mode which would fire up DFU and ST-LINK in parallel hoping that one of those would work?
*/ */
mode.addItem(AUTO_DFU); mode.addItem(AUTO_DFU);
mode.addItem(MANUAL_DFU); if (IS_WIN) {
mode.addItem(ST_LINK); mode.addItem(MANUAL_DFU);
mode.addItem(ST_LINK);
}
controls.add(mode); controls.add(mode);
@ -56,7 +59,7 @@ public class ProgramSelector {
if (isAutoDfu) { if (isAutoDfu) {
DfuFlasher.doAutoDfu(comboPorts.getSelectedItem(), comboPorts); DfuFlasher.doAutoDfu(comboPorts.getSelectedItem(), comboPorts);
} else if (isManualDfu){ } else if (isManualDfu) {
DfuFlasher.runDfuProgramming(); DfuFlasher.runDfuProgramming();
} else { } else {
FirmwareFlasher.doUpdateFirmware(FirmwareFlasher.IMAGE_FILE, updateFirmware); FirmwareFlasher.doUpdateFirmware(FirmwareFlasher.IMAGE_FILE, updateFirmware);