feat(fw): Only show SD card in USB storage mode (#3045)

* Only attach SD card in USB storage mode

* Added compile time option FWDRIVE (default OFF) to enable attaching also the firmware drive via USB, when attached in mass storage mode.

* Re-trigger GitHub Actions

* chore: Trailing whitespace cleanup
This commit is contained in:
Risto
2023-01-26 14:39:31 +10:00
committed by GitHub
parent d952333037
commit 5acaa79c1c
3 changed files with 88 additions and 69 deletions
+5
View File
@@ -59,6 +59,7 @@ option(TBS_RELEASE "Used to build TBS released firmware" OFF)
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)
# since we reset all default CMAKE compiler flags for firmware builds, provide an alternate way for user to specify additional flags.
set(FIRMWARE_C_FLAGS "" CACHE STRING "Additional flags for firmware target c compiler (note: all CMAKE_C_FLAGS[_*] are ignored for firmware/bootloader).")
@@ -453,6 +454,10 @@ else()
endif()
add_definitions(-DDEFAULT_TEMPLATE_SETUP=${DEFAULT_TEMPLATE_SETUP})
if(FWDRIVE)
add_definitions(-DFWDRIVE)
endif()
set(SRC
${SRC}
opentx.cpp