diff --git a/radio/src/CMakeLists.txt b/radio/src/CMakeLists.txt index 60646540b..9fb6e4779 100644 --- a/radio/src/CMakeLists.txt +++ b/radio/src/CMakeLists.txt @@ -46,6 +46,7 @@ option(TRACE_LUA_INTERNALS "Turn on traces for Lua internals" 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(FRSKY_RELEASE "Used to build FrSky released firmware" 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).") @@ -275,7 +276,7 @@ if(DANGEROUS_MODULE_FUNCTIONS) endif() if(SPLASH STREQUAL FRSKY) - add_definitions(-DSPLASH -DSPLASH_FRSKY) + add_definitions(-DSPLASH -DFRSKY_RELEASE) elseif(NOT SPLASH STREQUAL OFF) add_definitions(-DSPLASH) endif() @@ -308,6 +309,10 @@ if(NIGHTLY_BUILD_WARNING) add_definitions(-DNIGHTLY_BUILD_WARNING) endif(NIGHTLY_BUILD_WARNING) +if(FRSKY_RELEASE) + add_definitions(-DFRSKY_RELEASE) +endif(FRSKY_RELEASE) + set(SRC ${SRC} opentx.cpp diff --git a/radio/src/gui/128x64/splash.cpp b/radio/src/gui/128x64/splash.cpp index f322c2603..d30fa7def 100644 --- a/radio/src/gui/128x64/splash.cpp +++ b/radio/src/gui/128x64/splash.cpp @@ -2,7 +2,7 @@ * Copyright (C) OpenTX * * Based on code named - * th9x - http://code.google.com/p/th9x + * th9x - http://code.google.com/p/th9x * er9x - http://code.google.com/p/er9x * gruvin9x - http://code.google.com/p/gruvin9x * @@ -32,7 +32,7 @@ void drawSplash() { lcdClear(); lcdDraw1bitBitmap(0, 0, splash_lbm, 0, 0); - + #if MENUS_LOCK == 1 if (readonly == false) { lcdDrawFilledRect((LCD_W-(sizeof(TR_UNLOCKED)-1)*FW)/2 - 9, 50, (sizeof(TR_UNLOCKED)-1)*FW+16, 11, SOLID, ERASE|ROUND); @@ -44,7 +44,7 @@ void drawSplash() } #endif -#if defined(SPLASH_FRSKY) +#if defined(FRSKY_RELEASE) const unsigned char splashdata2[] = { 'S','F','S',0, #include "bitmaps/128x64/splash_frsky.lbm" diff --git a/radio/src/gui/212x64/splash.cpp b/radio/src/gui/212x64/splash.cpp index 354501248..f9938c0c1 100644 --- a/radio/src/gui/212x64/splash.cpp +++ b/radio/src/gui/212x64/splash.cpp @@ -2,7 +2,7 @@ * Copyright (C) OpenTX * * Based on code named - * th9x - http://code.google.com/p/th9x + * th9x - http://code.google.com/p/th9x * er9x - http://code.google.com/p/er9x * gruvin9x - http://code.google.com/p/gruvin9x * @@ -43,7 +43,7 @@ void drawSplash() } #endif -#if defined(SPLASH_FRSKY) +#if defined(FRSKY_RELEASE) const unsigned char splashdata2[] = { 'S','F','S',0, #include "bitmaps/212x64/splash_frsky.lbm" diff --git a/radio/src/gui/common/stdlcd/radio_power_meter.cpp b/radio/src/gui/common/stdlcd/radio_power_meter.cpp index 6ae4ae3b3..12bcc7d1c 100644 --- a/radio/src/gui/common/stdlcd/radio_power_meter.cpp +++ b/radio/src/gui/common/stdlcd/radio_power_meter.cpp @@ -58,7 +58,9 @@ void menuRadioPowerMeter(event_t event) if (moduleSettings[g_moduleIdx].mode != MODULE_MODE_POWER_METER) { memclear(&reusableBuffer.powerMeter, sizeof(reusableBuffer.powerMeter)); reusableBuffer.powerMeter.freq = 2400000000; +#if defined(FRSKY_RELEASE) reusableBuffer.powerMeter.attn = 4; +#endif moduleSettings[g_moduleIdx].mode = MODULE_MODE_POWER_METER; } diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 08fe7d0fc..41281fd70 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -813,7 +813,7 @@ void doSplash() } #endif -#if defined(SPLASH_FRSKY) +#if defined(FRSKY_RELEASE) static uint8_t secondSplash = false; if (!secondSplash && get_tmr10ms() >= tgtime-200) { secondSplash = true;