[X9D/X7D] FrSky splash is now an option
This commit is contained in:
@@ -8,7 +8,7 @@ option(FLIGHT_MODES "Flight Modes" ON)
|
||||
option(CURVES "Curves" ON)
|
||||
option(GVARS "Global variables" OFF)
|
||||
option(GUI "GUI enabled" ON)
|
||||
option(SPLASH "Splash enabled" ON)
|
||||
set(SPLASH "DEFAULT" CACHE STRING "Splash (DEFAULT/OFF/FRSKY)")
|
||||
set(PPM_UNIT "PERCENT_PREC1" CACHE STRING "PPM display unit (US/PERCENT_PREC1/PERCENT_PREC0)")
|
||||
option(PPM_CENTER_ADJUSTABLE "PPM center adjustable" ON)
|
||||
option(PPM_LIMITS_SYMETRICAL "PPM limits symetrical" OFF)
|
||||
@@ -275,7 +275,9 @@ if(DANGEROUS_MODULE_FUNCTIONS)
|
||||
add_definitions(-DDANGEROUS_MODULE_FUNCTIONS)
|
||||
endif()
|
||||
|
||||
if(SPLASH)
|
||||
if(SPLASH STREQUAL FRSKY)
|
||||
add_definitions(-DSPLASH -DSPLASH_FRSKY)
|
||||
elseif(NOT SPLASH STREQUAL OFF)
|
||||
add_definitions(-DSPLASH)
|
||||
endif()
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 495 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -441,6 +441,7 @@ void drawCheckBox(coord_t x, coord_t y, uint8_t value, LcdFlags attr);
|
||||
extern const pm_uchar sticks[] PROGMEM;
|
||||
|
||||
void drawSplash();
|
||||
void drawSecondSplash();
|
||||
void drawScreenIndex(uint8_t index, uint8_t count, uint8_t attr);
|
||||
void drawStick(coord_t centrex, int16_t xval, int16_t yval);
|
||||
void drawPotsBars();
|
||||
|
||||
@@ -67,3 +67,19 @@ void drawSplash()
|
||||
lcdRefresh();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SPLASH_FRSKY)
|
||||
const pm_uchar splashdata2[] PROGMEM = {
|
||||
'S','F','S',0,
|
||||
#include "bitmaps/128x64/splash_frsky.lbm"
|
||||
'S','F','E',0 };
|
||||
|
||||
const pm_uchar * const splash2_lbm = splashdata2+4;
|
||||
|
||||
void drawSecondSplash()
|
||||
{
|
||||
lcdClear();
|
||||
lcd_img(0, 0, splash2_lbm, 0, 0);
|
||||
lcdRefresh();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -69,6 +69,7 @@ extern uint8_t noHighlightCounter;
|
||||
void drawCheckBox(coord_t x, coord_t y, uint8_t value, LcdFlags attr);
|
||||
void drawSlider(coord_t x, coord_t y, uint8_t value, uint8_t max, uint8_t attr);
|
||||
void drawSplash();
|
||||
void drawSecondSplash();
|
||||
void drawScreenIndex(uint8_t index, uint8_t count, uint8_t attr);
|
||||
void drawVerticalScrollbar(coord_t x, coord_t y, coord_t h, uint16_t offset, uint16_t count, uint8_t visible);
|
||||
void displayMenuBar(const MenuItem * menu, int index);
|
||||
|
||||
@@ -42,3 +42,18 @@ void drawSplash()
|
||||
lcdRefresh();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SPLASH_FRSKY)
|
||||
const pm_uchar splashdata2[] PROGMEM = {
|
||||
'S','F','S',0,
|
||||
#include "bitmaps/212x64/splash_frsky.lbm"
|
||||
'S','F','E',0 };
|
||||
const pm_uchar * const splash2_lbm = splashdata2+4;
|
||||
|
||||
void drawSecondSplash()
|
||||
{
|
||||
lcdClear();
|
||||
lcdDrawBitmap(0, 0, splash2_lbm);
|
||||
lcdRefresh();
|
||||
}
|
||||
#endif
|
||||
@@ -964,6 +964,14 @@ void doSplash()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SPLASH_FRSKY)
|
||||
static uint8_t secondSplash = false;
|
||||
if (!secondSplash && get_tmr10ms() >= tgtime-200) {
|
||||
secondSplash = true;
|
||||
drawSecondSplash();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
if (curTime < get_tmr10ms()) {
|
||||
curTime += 10;
|
||||
|
||||
Reference in New Issue
Block a user