skip_ecu_type_detection

This commit is contained in:
rusefillc 2024-08-26 11:43:07 -04:00
parent babeb5d88d
commit 61ff1ba345
2 changed files with 7 additions and 1 deletions

View File

@ -34,4 +34,8 @@ public class UiProperties {
public static String getUpdateHelpUrl() { public static String getUpdateHelpUrl() {
return properties.getProperty("UPDATE_FW_HELP_URL", "https://github.com/rusefi/rusefi/wiki/HOWTO-Update-Firmware"); return properties.getProperty("UPDATE_FW_HELP_URL", "https://github.com/rusefi/rusefi/wiki/HOWTO-Update-Firmware");
} }
public static boolean skipEcuTypeDetection() {
return ConnectionAndMeta.getBoolean("skip_ecu_type_detection");
}
} }

View File

@ -1,6 +1,7 @@
package com.rusefi.io; package com.rusefi.io;
import com.devexperts.logging.Logging; import com.devexperts.logging.Logging;
import com.rusefi.UiProperties;
import com.rusefi.core.RusEfiSignature; import com.rusefi.core.RusEfiSignature;
import com.rusefi.core.SignatureHelper; import com.rusefi.core.SignatureHelper;
import com.rusefi.core.io.BundleUtil; import com.rusefi.core.io.BundleUtil;
@ -34,7 +35,8 @@ public class BootloaderHelper {
String fileSystemBundleTarget = BundleUtil.getBundleTarget(); String fileSystemBundleTarget = BundleUtil.getBundleTarget();
if (fileSystemBundleTarget != null && controllerSignature != null) { if (fileSystemBundleTarget != null && controllerSignature != null) {
// hack: QC firmware self-identifies as "normal" not QC firmware :( // hack: QC firmware self-identifies as "normal" not QC firmware :(
if (!fileSystemBundleTarget.equalsIgnoreCase(controllerSignature.getBundleTarget()) && !fileSystemBundleTarget.contains("_QC_")) { if (!UiProperties.skipEcuTypeDetection() &&
!fileSystemBundleTarget.equalsIgnoreCase(controllerSignature.getBundleTarget()) && !fileSystemBundleTarget.contains("_QC_")) {
String message = String.format("You have \"%s\" controller does not look right to program it with \"%s\"", controllerSignature.getBundleTarget(), fileSystemBundleTarget); String message = String.format("You have \"%s\" controller does not look right to program it with \"%s\"", controllerSignature.getBundleTarget(), fileSystemBundleTarget);
log.info(message); log.info(message);