From 61ff1ba3455c47e0a17aff040dcec682e98c1539 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 26 Aug 2024 11:43:07 -0400 Subject: [PATCH] skip_ecu_type_detection --- java_console/ui/src/main/java/com/rusefi/UiProperties.java | 4 ++++ .../ui/src/main/java/com/rusefi/io/BootloaderHelper.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/java_console/ui/src/main/java/com/rusefi/UiProperties.java b/java_console/ui/src/main/java/com/rusefi/UiProperties.java index 6ae542bbd7..445af120e1 100644 --- a/java_console/ui/src/main/java/com/rusefi/UiProperties.java +++ b/java_console/ui/src/main/java/com/rusefi/UiProperties.java @@ -34,4 +34,8 @@ public class UiProperties { public static String getUpdateHelpUrl() { 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"); + } } diff --git a/java_console/ui/src/main/java/com/rusefi/io/BootloaderHelper.java b/java_console/ui/src/main/java/com/rusefi/io/BootloaderHelper.java index 8ac8469972..cd43e9e969 100644 --- a/java_console/ui/src/main/java/com/rusefi/io/BootloaderHelper.java +++ b/java_console/ui/src/main/java/com/rusefi/io/BootloaderHelper.java @@ -1,6 +1,7 @@ package com.rusefi.io; import com.devexperts.logging.Logging; +import com.rusefi.UiProperties; import com.rusefi.core.RusEfiSignature; import com.rusefi.core.SignatureHelper; import com.rusefi.core.io.BundleUtil; @@ -34,7 +35,8 @@ public class BootloaderHelper { String fileSystemBundleTarget = BundleUtil.getBundleTarget(); if (fileSystemBundleTarget != null && controllerSignature != null) { // 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); log.info(message);