Skip to content

Commit

Permalink
feat: compile option to disable MCU check (#4988)
Browse files Browse the repository at this point in the history
  • Loading branch information
3djc authored and pfeerick committed May 11, 2024
1 parent 506fc42 commit fc0b61d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions radio/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -374,6 +375,10 @@ if(FWDRIVE)
add_definitions(-DFWDRIVE)
endif()

if(DISABLE_MCUCHECK)
add_definitions(-DDISABLE_MCUCHECK)
endif()

set(SRC
${SRC}
opentx.cpp
Expand Down
2 changes: 2 additions & 0 deletions radio/src/opentx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,9 @@ int main()
modulePortInit();
pulsesInit();

#if !defined(DISABLE_MCUCHECK)
checkValidMCU();
#endif

#if defined(PCBHORUS)
if (!IS_FIRMWARE_COMPATIBLE_WITH_BOARD()) {
Expand Down

0 comments on commit fc0b61d

Please sign in to comment.