3djc/chan mon improve (#3604)

* Prepare for more flexibility (and a much better look)

* [Horus] Preparation for a new Channels menu

* monitor bar icons added

* Add ICONS structure and populate for MONITOR pages

* Restore old widget (had used it for temp work), will likely update to the newer look later

Functionnal output monitor 1,2, still need extended and overrides

* extended limits

* Overrides are now managed

* Back to Red ;)
Add outL outR to hightlight out of limits values

* Rewrite of posOnBar, as it was getting overly complex
subtrin now fulland more logicaly managed

* Fix overrides

* Center bar drawn last to be always visible

* Limits need to go through extend limits display calculation as well

* remove debug printf

* Add inverted output icon

* Tidy up and cosmetics
This commit is contained in:
3djc
2016-06-16 10:14:53 +02:00
committed by Bertrand Songis
parent 9b5b9be50c
commit 98b1029bec
19 changed files with 197 additions and 134 deletions
+23 -31
View File
@@ -95,6 +95,9 @@ enum MenuIcons {
ICON_STATS_TIMERS,
ICON_STATS_ANALOGS,
ICON_STATS_DEBUG,
ICON_MONITOR,
ICON_MONITOR_OUTPUTS1,
ICON_MONITOR_OUTPUTS2,
MENUS_ICONS_COUNT
};
@@ -113,6 +116,7 @@ enum EnumTabModel {
e_CustomScripts,
#endif
CASE_FRSKY(e_Telemetry)
e_TabModelPagesCount
};
const uint8_t RADIO_ICONS[] = {
@@ -153,6 +157,12 @@ const uint8_t STATS_ICONS[] = {
#endif
};
const uint8_t MONITOR_ICONS[] = {
ICON_MONITOR,
ICON_MONITOR_OUTPUTS1,
ICON_MONITOR_OUTPUTS2
};
bool menuModelSetup(evt_t event);
bool menuModelHeli(evt_t event);
bool menuModelFlightModesAll(evt_t event);
@@ -168,27 +178,7 @@ bool menuModelCustomScripts(evt_t event);
bool menuModelTelemetry(evt_t event);
bool menuModelExpoOne(evt_t event);
const MenuHandlerFunc menuTabModel[] = {
// menuModelSelect,
menuModelSetup,
CASE_HELI(menuModelHeli)
CASE_FLIGHT_MODES(menuModelFlightModesAll)
menuModelExposAll,
menuModelMixAll,
menuModelLimits,
CASE_CURVES(menuModelCurvesAll)
#if defined(GVARS) && defined(FLIGHT_MODES)
CASE_GVARS(menuModelGVars)
#endif
menuModelLogicalSwitches,
menuModelCustomFunctions,
#if defined(LUA_MODEL_SCRIPTS)
menuModelCustomScripts,
#endif
CASE_FRSKY(menuModelTelemetry)
CASE_MAVLINK(menuTelemetryMavlinkSetup)
CASE_TEMPLATES(menuModelTemplates)
};
extern const MenuHandlerFunc menuTabModel[e_TabModelPagesCount];
enum EnumTabRadio {
e_Setup,
@@ -197,6 +187,7 @@ enum EnumTabRadio {
e_Trainer,
e_Hardware,
e_Vers,
e_TabRadioPagesCount
};
bool menuGeneralSetup(evt_t event);
@@ -207,14 +198,7 @@ bool menuGeneralVersion(evt_t event);
bool menuGeneralHardware(evt_t event);
bool menuGeneralCalib(evt_t event);
static const MenuHandlerFunc menuTabGeneral[] PROGMEM = {
menuGeneralSetup,
menuGeneralSdManager,
menuGeneralCustomFunctions,
menuGeneralTrainer,
menuGeneralHardware,
menuGeneralVersion,
};
extern const MenuHandlerFunc menuTabGeneral[e_TabRadioPagesCount];
enum EnumTabDiag
{
@@ -240,6 +224,16 @@ static const MenuHandlerFunc menuTabStats[] PROGMEM = {
#endif
};
enum EnumTabChannels
{
e_Channels1,
e_Channels2,
e_TabChannelsPagesCount
};
extern const MenuHandlerFunc menuTabChannels[e_TabChannelsPagesCount];
extern uint8_t lastChannelsPage;
extern const MenuHandlerFunc menuTabScreensSetup[1+MAX_CUSTOM_SCREENS] PROGMEM;
bool menuFirstCalib(evt_t event);
@@ -248,8 +242,6 @@ bool menuCustomFunctions(evt_t event, CustomFunctionData * functions, CustomFunc
bool menuModelSelect(evt_t event);
bool menuAboutView(evt_t event);
bool menuMainViewChannelsMonitor(evt_t event);
bool menuChannelsView(evt_t event);
bool menuChannelsView(evt_t event);
bool menuTextView(evt_t event);
bool menuScreensTheme(evt_t event);