From fc0b61d2756a083a80eea9d79745a93a50246ec2 Mon Sep 17 00:00:00 2001 From: 3djc Date: Sat, 11 May 2024 11:21:38 +0200 Subject: [PATCH] feat: compile option to disable MCU check (#4988) --- radio/src/CMakeLists.txt | 5 +++++ radio/src/opentx.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/radio/src/CMakeLists.txt b/radio/src/CMakeLists.txt index aeb0eedc07f..b4edb01bafc 100644 --- a/radio/src/CMakeLists.txt +++ b/radio/src/CMakeLists.txt @@ -55,6 +55,7 @@ option(IMRC_RELEASE "Used to build IMRC released firmware" OFF) option(HARDWARE_TRAINER_MULTI "Allow multi trainer" OFF) option(BOOTLOADER "Include Bootloader" ON) option(FWDRIVE "Attach also firmware drive with USB" OFF) +option(DISABLE_MCUCHECK "Disable MCU check at start" OFF) if(PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019) option(USBJ_EX "Enable USB Joystick Extension" OFF) @@ -374,6 +375,10 @@ if(FWDRIVE) add_definitions(-DFWDRIVE) endif() +if(DISABLE_MCUCHECK) + add_definitions(-DDISABLE_MCUCHECK) +endif() + set(SRC ${SRC} opentx.cpp diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 76b2b8e4846..bc75e923619 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1591,7 +1591,9 @@ int main() modulePortInit(); pulsesInit(); +#if !defined(DISABLE_MCUCHECK) checkValidMCU(); +#endif #if defined(PCBHORUS) if (!IS_FIRMWARE_COMPATIBLE_WITH_BOARD()) {