feat(color): Increase max possible widget screens to 10 (#3073)
* Elevate telemetry screen count from 5 to 10 on color radios. * Cpn increase max custom screens * fix(color): Missing Add tab button on max-1 addTab was not called when adding screens dynamically --------- Co-authored-by: elecpower <neilh713@tpg.com.au> Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
co-authored by
elecpower
Peter Feerick
parent
e3d8158d50
commit
312a2358dc
@@ -30,7 +30,7 @@
|
||||
|
||||
*/
|
||||
|
||||
constexpr int MAX_CUSTOM_SCREENS {5};
|
||||
constexpr int MAX_CUSTOM_SCREENS {10};
|
||||
constexpr int THEME_NAME_LEN {8};
|
||||
constexpr int MAX_THEME_OPTIONS {5};
|
||||
constexpr int LEN_ZONE_OPTION_STRING {8};
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
@@ -54,7 +54,7 @@
|
||||
#define DEF_TRAINER_CHANNELS 8
|
||||
#define MAX_TRAINER_CHANNELS 16
|
||||
#define MAX_TELEMETRY_SENSORS 60
|
||||
#define MAX_CUSTOM_SCREENS 5
|
||||
#define MAX_CUSTOM_SCREENS 10
|
||||
#elif defined(PCBX9D) || defined(PCBX9DP) || defined(PCBX9E)
|
||||
#define MAX_MODELS 60
|
||||
#define MAX_OUTPUT_CHANNELS 32 // number of real output channels CH1-CH32
|
||||
|
||||
@@ -140,14 +140,14 @@ static inline void check_struct()
|
||||
#elif defined(PCBHORUS)
|
||||
#if defined(PCBX10)
|
||||
CHKSIZE(RadioData, 924);
|
||||
CHKSIZE(ModelData, 11128);
|
||||
CHKSIZE(ModelData, 15378);
|
||||
#else
|
||||
CHKSIZE(RadioData, 906);
|
||||
CHKSIZE(ModelData, 11126);
|
||||
CHKSIZE(ModelData, 15376);
|
||||
#endif
|
||||
#elif defined(PCBNV14)
|
||||
CHKSIZE(RadioData, 852);
|
||||
CHKSIZE(ModelData, 10942);
|
||||
CHKSIZE(ModelData, 15192);
|
||||
#endif
|
||||
|
||||
#undef CHKSIZE
|
||||
|
||||
@@ -197,6 +197,21 @@ static const uint8_t mask_theme_view4[] = {
|
||||
static const uint8_t mask_theme_view5[] = {
|
||||
#include "mask_theme_view5.lbm"
|
||||
};
|
||||
static const uint8_t mask_theme_view6[] = {
|
||||
#include "mask_theme_view6.lbm"
|
||||
};
|
||||
static const uint8_t mask_theme_view7[] = {
|
||||
#include "mask_theme_view7.lbm"
|
||||
};
|
||||
static const uint8_t mask_theme_view8[] = {
|
||||
#include "mask_theme_view8.lbm"
|
||||
};
|
||||
static const uint8_t mask_theme_view9[] = {
|
||||
#include "mask_theme_view9.lbm"
|
||||
};
|
||||
static const uint8_t mask_theme_view10[] = {
|
||||
#include "mask_theme_view10.lbm"
|
||||
};
|
||||
static const uint8_t stick_pointer[] = {
|
||||
#include "alpha_stick_pointer.lbm"
|
||||
};
|
||||
@@ -337,6 +352,11 @@ static const _BuiltinIcon _builtinIcons[] = {
|
||||
{ICON_THEME_VIEW3, mask_theme_view3},
|
||||
{ICON_THEME_VIEW4, mask_theme_view4},
|
||||
{ICON_THEME_VIEW5, mask_theme_view5},
|
||||
{ICON_THEME_VIEW6, mask_theme_view6},
|
||||
{ICON_THEME_VIEW7, mask_theme_view7},
|
||||
{ICON_THEME_VIEW8, mask_theme_view8},
|
||||
{ICON_THEME_VIEW9, mask_theme_view9},
|
||||
{ICON_THEME_VIEW10, mask_theme_view10},
|
||||
{ICON_THEME_ADD_VIEW, mask_theme_add_view},
|
||||
{ICON_STATS, mask_menu_stats},
|
||||
{ICON_STATS_THROTTLE_GRAPH, mask_stats_throttle_graph},
|
||||
|
||||
@@ -65,6 +65,11 @@ enum MenuIcons {
|
||||
ICON_THEME_VIEW3,
|
||||
ICON_THEME_VIEW4,
|
||||
ICON_THEME_VIEW5,
|
||||
ICON_THEME_VIEW6,
|
||||
ICON_THEME_VIEW7,
|
||||
ICON_THEME_VIEW8,
|
||||
ICON_THEME_VIEW9,
|
||||
ICON_THEME_VIEW10,
|
||||
ICON_THEME_ADD_VIEW,
|
||||
ICON_STATS,
|
||||
ICON_STATS_THROTTLE_GRAPH,
|
||||
|
||||
@@ -150,7 +150,7 @@ void ScreenAddPage::build(FormWindow * window)
|
||||
menu->addTab(tab);
|
||||
menu->setCurrentTab(pageIndex);
|
||||
|
||||
if (menu->getTabs() < MAX_CUSTOM_SCREENS) {
|
||||
if (menu->getTabs() <= MAX_CUSTOM_SCREENS) {
|
||||
menu->addTab(new ScreenAddPage(menu, menu->getTabs()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +150,11 @@ class FlyskyTheme: public OpenTxTheme
|
||||
loadMenuIcon(ICON_THEME_VIEW3, "mask_theme_view3.png");
|
||||
loadMenuIcon(ICON_THEME_VIEW4, "mask_theme_view4.png");
|
||||
loadMenuIcon(ICON_THEME_VIEW5, "mask_theme_view5.png");
|
||||
loadMenuIcon(ICON_THEME_VIEW6, "mask_theme_view6.png");
|
||||
loadMenuIcon(ICON_THEME_VIEW7, "mask_theme_view7.png");
|
||||
loadMenuIcon(ICON_THEME_VIEW8, "mask_theme_view8.png");
|
||||
loadMenuIcon(ICON_THEME_VIEW9, "mask_theme_view9.png");
|
||||
loadMenuIcon(ICON_THEME_VIEW10, "mask_theme_view10.png");
|
||||
loadMenuIcon(ICON_THEME_ADD_VIEW, "mask_theme_add_view.png");
|
||||
loadMenuIcon(ICON_MONITOR, "mask_monitor.png");
|
||||
loadMenuIcon(ICON_MONITOR_CHANNELS1, "mask_monitor_channels1.png");
|
||||
|
||||
@@ -891,7 +891,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 5, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_ARRAY("screenData", 6800, 5, struct_CustomScreenData, NULL),
|
||||
YAML_ARRAY("screenData", 6800, 10, struct_CustomScreenData, NULL),
|
||||
YAML_STRUCT("topbarData", 1248, struct_TopBarPersistentData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
|
||||
@@ -922,7 +922,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 11, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_ARRAY("screenData", 6800, 5, struct_CustomScreenData, NULL),
|
||||
YAML_ARRAY("screenData", 6800, 10, struct_CustomScreenData, NULL),
|
||||
YAML_STRUCT("topbarData", 2400, struct_TopBarPersistentData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
|
||||
@@ -920,7 +920,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 9, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_ARRAY("screenData", 6800, 5, struct_CustomScreenData, NULL),
|
||||
YAML_ARRAY("screenData", 6800, 10, struct_CustomScreenData, NULL),
|
||||
YAML_STRUCT("topbarData", 2400, struct_TopBarPersistentData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
|
||||
Reference in New Issue
Block a user