New UI merged

This commit is contained in:
Bertrand Songis
2019-08-28 20:50:14 +02:00
parent 1f41076b0e
commit f4f8893ae9
806 changed files with 30836 additions and 11704 deletions
+28 -13
View File
@@ -1,7 +1,7 @@
include(CMakeForceCompiler)
include(Bitmaps)
set(PCB_TYPES X9LITE X7 XLITE XLITES X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X)
set(PCB_TYPES X9LITE X7 XLITE XLITES X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X NV14)
set(GUI_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL)
set(TTS_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL RU)
@@ -44,11 +44,13 @@ option(RAS "RAS (SWR) enabled" ON)
option(TEMPLATES "Model templates menu" OFF)
option(TRACE_SIMPGMSPACE "Turn on traces in simpgmspace.cpp" ON)
option(TRACE_LUA_INTERNALS "Turn on traces for Lua internals" OFF)
option(DEBUG_WINDOWS "Turn on windows traces" OFF)
option(FRSKY_STICKS "Reverse sticks for FrSky sticks" OFF)
option(NANO "Use nano newlib and binalloc")
option(NIGHTLY_BUILD_WARNING "Warn this is a nightly build" OFF)
option(R9M_PROTO_FLEX "Add R9M options for non certified firmwwares" OFF)
option(FRSKY_RELEASE "Used to build FrSky released firmware" OFF)
option(BOOTLOADER "Include Bootloader" ON)
# 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).")
@@ -64,10 +66,6 @@ set(RADIO_BIN_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
configure_file(stamp.h.in stamp.h @ONLY)
add_subdirectory(translations)
add_subdirectory(bitmaps)
add_subdirectory(fonts)
set(EEPROM_VARIANT 0)
set(GVARS_VARIANT 1)
set(FRSKY_VARIANT 2)
@@ -83,6 +81,8 @@ set(FATFS_SRC
if(PCB STREQUAL X12S OR PCB STREQUAL X10)
include(targets/horus/CMakeLists.txt)
elseif(PCB STREQUAL NV14)
include(targets/nv14/CMakeLists.txt)
elseif(PCB STREQUAL X9E OR PCB STREQUAL X9D+ OR PCB STREQUAL X9D OR PCB STREQUAL X7 OR PCB STREQUAL X9LITE OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
include(targets/taranis/CMakeLists.txt)
elseif(PCB STREQUAL SKY9X OR PCB STREQUAL 9XRPRO OR PCB STREQUAL AR9X)
@@ -91,6 +91,10 @@ else()
message(FATAL_ERROR "Unknown PCB '${PCB}'")
endif()
add_subdirectory(translations)
add_subdirectory(bitmaps)
add_subdirectory(fonts)
if(NOT PCB STREQUAL 9XRPRO)
option(DBLKEYS "Double Keys" ON)
if(DBLKEYS)
@@ -125,7 +129,7 @@ endforeach()
set(SRC ${SRC} debug.cpp)
if(${EEPROM} STREQUAL SDCARD)
set(SRC ${SRC} storage/storage_common.cpp storage/sdcard_raw.cpp storage/modelslist.cpp)
set(SRC ${SRC} storage/storage_common.cpp storage/sdcard_raw.cpp)
elseif(${EEPROM} STREQUAL EEPROM_RLC)
set(SRC ${SRC} storage/storage_common.cpp storage/eeprom_common.cpp storage/eeprom_rlc.cpp)
add_definitions(-DEEPROM -DEEPROM_RLC)
@@ -165,12 +169,8 @@ if(NOT LUA STREQUAL NO)
set(FIRMWARE_DEPENDENCIES ${FIRMWARE_DEPENDENCIES} ${LUA_EXPORT})
if(LUA STREQUAL YES)
add_definitions(-DLUA_MODEL_SCRIPTS)
set(GUI_SRC ${GUI_SRC} model_custom_scripts.cpp)
endif()
set(SRC ${SRC} lua/interface.cpp lua/api_general.cpp lua/api_lcd.cpp lua/api_model.cpp)
if(PCB STREQUAL X12S OR PCB STREQUAL X10)
set(SRC ${SRC} lua/widgets.cpp)
endif()
set(LUA_SRC lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c lobject.c lopcodes.c lparser.c
lstate.c lstring.c ltable.c lrotable.c ltm.c lundump.c lvm.c lzio.c linit.c
lbaselib.c lmathlib.c lbitlib.c loadlib.c lauxlib.c ltablib.c lcorolib.c liolib.c lstrlib.c
@@ -190,7 +190,6 @@ endif()
if(FLIGHT_MODES)
add_definitions(-DFLIGHT_MODES)
set(GUI_SRC ${GUI_SRC} model_flightmodes.cpp)
endif()
if(CURVES)
@@ -293,10 +292,22 @@ if(TRACE_LUA_INTERNALS)
add_definitions(-DTRACE_LUA_INTERNALS_ENABLED)
endif()
if(DEBUG_WINDOWS)
add_definitions(-DDEBUG_WINDOWS)
endif()
if(FRSKY_STICKS)
add_definitions(-DFRSKY_STICKS)
endif()
if(FLYSKY_HALL_STICKS)
add_definitions(-DFLYSKY_HALL_STICKS)
endif()
if(FLYSKY_HALL_STICKS_REVERSE)
add_definitions(-DFLYSKY_HALL_STICKS_REVERSE)
endif()
if(NOT FONT STREQUAL "")
add_definitions(-DFONT=${DEFAULT_MODE})
endif()
@@ -320,6 +331,10 @@ endif()
add_definitions(-DPOPUP_LEVEL=${POPUP_LEVEL})
if(BOOTLOADER)
add_definitions(-DBOOTLOADER)
endif(BOOTLOADER)
set(SRC
${SRC}
opentx.cpp
@@ -416,7 +431,7 @@ use_cxx11() # ensure gnu++11 in CXX_FLAGS with CMake < 3.1
find_program(BASH bash HINTS "c:/cygwin/bin/" "c:/msys/bin/" DOC "bash shell for firmware size report (eg. c:/cygwin/bin/bash.exe on Windows).")
if(NOT MSVC)
set(OPT s)
set(OPT "s" CACHE STRING "Optimization mode (0/1/2/s")
if(ARCH STREQUAL ARM)
enable_language(ASM)
@@ -454,7 +469,7 @@ if(NOT MSVC)
set(SRC ${SRC} bin_allocator.cpp)
endif()
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X9D OR PCB STREQUAL X9D+ OR PCB STREQUAL X9E OR PCB STREQUAL X7 OR PCB STREQUAL X9LITE OR PCB STREQUAL X10 OR PCB STREQUAL X12S)
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X9D OR PCB STREQUAL X9D+ OR PCB STREQUAL X9E OR PCB STREQUAL X9LITE OR PCB STREQUAL X7 OR PCB STREQUAL X3 OR PCB STREQUAL X10 OR PCB STREQUAL X12S)
add_subdirectory(targets/common/arm/stm32/bootloader)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/targets/common/arm/stm32/bootloader)
set(FIRMWARE_DEPENDENCIES ${FIRMWARE_DEPENDENCIES} bootloader)