chores(pl18/nv14): Clean up cmake and boot menu (#4475)
This commit is contained in:
@@ -104,33 +104,8 @@ endif()
|
||||
|
||||
#set(AUX_SERIAL_DRIVER ../common/arm/stm32/aux_serial_driver.cpp)
|
||||
|
||||
set(SRC
|
||||
${SRC}
|
||||
io/frsky_firmware_update.cpp
|
||||
)
|
||||
|
||||
set(GVAR_SCREEN model_gvars.cpp)
|
||||
|
||||
if(BOOTLOADER)
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
../common/arm/loadboot.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SRC
|
||||
${SRC}
|
||||
io/frsky_firmware_update.cpp
|
||||
io/multi_firmware_update.cpp
|
||||
)
|
||||
|
||||
if (MULTIMODULE)
|
||||
add_definitions(-DMULTI_PROTOLIST)
|
||||
set(SRC ${SRC}
|
||||
io/multi_protolist.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
board.cpp
|
||||
@@ -150,6 +125,25 @@ set(FIRMWARE_SRC
|
||||
targets/common/arm/stm32/vs1053b.cpp
|
||||
)
|
||||
|
||||
if(BOOTLOADER)
|
||||
set(FIRMWARE_SRC
|
||||
${FIRMWARE_SRC}
|
||||
targets/common/arm/loadboot.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SRC ${SRC}
|
||||
io/frsky_firmware_update.cpp
|
||||
io/multi_firmware_update.cpp
|
||||
)
|
||||
|
||||
if (MULTIMODULE)
|
||||
add_definitions(-DMULTI_PROTOLIST)
|
||||
set(SRC ${SRC}
|
||||
io/multi_protolist.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
# Make malloc() thread-safe
|
||||
add_definitions(-DTHREADSAFE_MALLOC)
|
||||
|
||||
@@ -158,8 +152,5 @@ set(STM32LIB_SRC
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fmc.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_ltdc.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma2d.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c
|
||||
)
|
||||
|
||||
|
||||
@@ -62,8 +62,6 @@ static bool rfUsbAccess = false;
|
||||
void bootloaderInitScreen()
|
||||
{
|
||||
lcdInitDisplayDriver();
|
||||
backlightInit();
|
||||
backlightEnable(100);
|
||||
setHatsAsKeys(true);
|
||||
}
|
||||
|
||||
@@ -85,9 +83,16 @@ static void bootloaderDrawBackground()
|
||||
|
||||
void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
|
||||
{
|
||||
static bool _first_screen = true;
|
||||
|
||||
lcdInitDirectDrawing();
|
||||
bootloaderDrawBackground();
|
||||
|
||||
if (!_first_screen) {
|
||||
// ... and turn backlight ON
|
||||
backlightEnable(BACKLIGHT_LEVEL_MAX);
|
||||
}
|
||||
|
||||
int center = LCD_W/2;
|
||||
if (st == ST_START) {
|
||||
int yOffset = 0;
|
||||
@@ -225,6 +230,8 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
|
||||
pos -= 79;
|
||||
lcd->drawSolidRect(79, 72 + (opt * 35), pos, 26, 2, BL_SELECTED);
|
||||
}
|
||||
|
||||
_first_screen = false;
|
||||
}
|
||||
|
||||
void bootloaderDrawFilename(const char* str, uint8_t line, bool selected)
|
||||
|
||||
Reference in New Issue
Block a user