Do not list EX3 and EX4 if FlySky gimbals are not detected.
Tested on two RM TX16S - one with FlySky Paladin EV gimbals, other with analog gimbals. EX3 and EX4 are listed under SYSTEM -> Hardware -> Pots only, when FlySky gimbals are detected. Please do not spoil the surprise, by discussing the other changes of this commit in public before the date.
This commit is contained in:
@@ -21,6 +21,7 @@ set(MASK_RLE_ARGS ${MASK_ARGS} --rle)
|
||||
|
||||
add_bitmaps_target(${BITMAP_TARGET_PREFIX}_bitmaps "${RADIO_SRC_DIR}/bitmaps/480x272/bmp_*.png" "5/6/5" "${BITMAP_ARGS}")
|
||||
add_png_target(${BITMAP_TARGET_PREFIX}_splash "${RADIO_SRC_DIR}/bitmaps/480x272/splash.png")
|
||||
add_png_target(${BITMAP_TARGET_PREFIX}_splash_chr "${RADIO_SRC_DIR}/bitmaps/480x272/splash_chr.png")
|
||||
|
||||
add_bitmaps_target(${BITMAP_TARGET_PREFIX}_calibration_bitmaps "${RADIO_SRC_DIR}/bitmaps/480x272/calibration/bmp_*.png" "5/6/5" "${BITMAP_ARGS}")
|
||||
add_bitmaps_target(${BITMAP_TARGET_PREFIX}_button_bitmaps "${RADIO_SRC_DIR}/bitmaps/480x272/button/alpha_*.png" "4/4/4/4" "${BITMAP_ARGS}")
|
||||
@@ -40,5 +41,6 @@ add_bitmaps_target(${BITMAP_TARGET_PREFIX}_bootloader_icons "${RADIO_SRC_DIR}/bi
|
||||
|
||||
add_dependencies(${BITMAP_TARGET_PREFIX}_bitmaps ${BITMAP_TARGET_PREFIX}_calibration_bitmaps ${BITMAP_TARGET_PREFIX}_button_bitmaps ${BITMAP_TARGET_PREFIX}_alpha_bitmaps
|
||||
${BITMAP_TARGET_PREFIX}_alpha_calibration_bitmaps ${BITMAP_TARGET_PREFIX}_masks ${BITMAP_TARGET_PREFIX}_slider_masks ${BITMAP_TARGET_PREFIX}_layouts_masks
|
||||
${BITMAP_TARGET_PREFIX}_fonts ${BITMAP_TARGET_PREFIX}_themes_masks ${BITMAP_TARGET_PREFIX}_themes_alpha ${BITMAP_TARGET_PREFIX}_splash ${BITMAP_TARGET_PREFIX}_volume_masks
|
||||
${BITMAP_TARGET_PREFIX}_fonts ${BITMAP_TARGET_PREFIX}_themes_masks ${BITMAP_TARGET_PREFIX}_themes_alpha ${BITMAP_TARGET_PREFIX}_splash
|
||||
${BITMAP_TARGET_PREFIX}_splash_chr ${BITMAP_TARGET_PREFIX}_volume_masks
|
||||
${BITMAP_TARGET_PREFIX}_bootloader_bitmaps ${BITMAP_TARGET_PREFIX}_bootloader_icons )
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -246,6 +246,12 @@ void RadioHardwarePage::build(FormWindow * window)
|
||||
new Subtitle(window, grid.getLineSlot(), STR_POTS, 0, COLOR_THEME_PRIMARY1);
|
||||
grid.nextLine();
|
||||
for (int i = 0; i < NUM_POTS; i++) {
|
||||
// Display EX3 & EX4 (= last two pots) only when FlySky gimbals are present
|
||||
#if !defined(SIMU) && defined(RADIO_FAMILY_T16)
|
||||
if (!globalData.flyskygimbals && (i >= (NUM_POTS - 2)))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
new StaticText(window, grid.getLabelSlot(true), TEXT_AT_INDEX(STR_VSRCRAW, (i + NUM_STICKS + 1)), 0, COLOR_THEME_PRIMARY1);
|
||||
new RadioTextEdit(window, grid.getFieldSlot(2,0), g_eeGeneral.anaNames[i + NUM_STICKS], LEN_ANA_NAME);
|
||||
new Choice(window, grid.getFieldSlot(2,1), STR_POTTYPES, POT_NONE, POT_WITHOUT_DETENT,
|
||||
|
||||
@@ -27,6 +27,10 @@ const uint8_t __bmp_splash[] {
|
||||
#include "splash.lbm"
|
||||
};
|
||||
|
||||
const uint8_t __bmp_splash_chr[] {
|
||||
#include "splash_chr.lbm"
|
||||
};
|
||||
|
||||
void drawSplash()
|
||||
{
|
||||
constexpr LcdFlags splash_background_color =
|
||||
@@ -42,9 +46,21 @@ void drawSplash()
|
||||
loadSplashImg = false;
|
||||
|
||||
// otherwise load from FLASH
|
||||
if (splashImg == nullptr) {
|
||||
splashImg = BitmapBuffer::loadRamBitmap(__bmp_splash, sizeof(__bmp_splash));
|
||||
}
|
||||
struct gtm t;
|
||||
gettime(&t);
|
||||
// Please do not spoil the suprise by discussing following lines in public
|
||||
// mon == 11 == December, starts from 0!
|
||||
if (t.tm_mon == 11 && t.tm_mday >= 24 && t.tm_mday <= 26)
|
||||
{
|
||||
if (splashImg == nullptr) {
|
||||
splashImg = BitmapBuffer::loadRamBitmap(__bmp_splash_chr, sizeof(__bmp_splash_chr));
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (splashImg == nullptr) {
|
||||
splashImg = BitmapBuffer::loadRamBitmap(__bmp_splash, sizeof(__bmp_splash));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lcd->clear(splash_background_color);
|
||||
|
||||
Reference in New Issue
Block a user