* Add options to disable radio and model menu tabs. - Update radio and model data structs - UI for color LCD radios - Convert existing 'noGlobalFunctions' property. - Language strings. * Make 'theme' control specific to color LCD radios. * Add B&W radio UI. * Simplify code, reduce compiled code size. Fix page count display on model select tab. Fix GVARS for 212x64 radios. * Collapse timer sections if timer is off. * Remove 'Use global functions' checkbox from B&W model setup. * Make preflight checks, throttle and view options sections expand & collapse (default collapsed). * Fix build. * Add view options to companion data classes, save and load values in YAML files. Fix scrolling for radio setup view options. * Add Companion UI for view option settings. * Remove 'Mixes' from list of tabs that can be hidden. * Updated Companion UI from elecpower. * Use view options flags to enable/disable functionality: - skip heli mixer logic if heli not enabled - Remove heli, gvars and telemetry options from source selection if not enabled * Remove 'flight mode', 'curve' and 'global variable' settings from input & mix editors if option disabled. * Rename 'View Options' to 'Enabled Features'. Put GVAR option under Flight Mode and indent text. Make relationship between FM and GV more obvious. * Remove global variable option dependency on flight modes. Hide FM1-FM8 in global variables if flight modes hidden. * Hide 'Custom Mixer Scripts' in source selection menu popup if disabled. * Add translation strings for Hebrew language file. * Fix typo. Add comment for double call to setCurrentTab.
66 lines
1.7 KiB
C
66 lines
1.7 KiB
C
/*
|
|
* Copyright (C) EdgeTX
|
|
*
|
|
* Based on code named
|
|
* opentx - https://github.com/opentx/opentx
|
|
* th9x - http://code.google.com/p/th9x
|
|
* er9x - http://code.google.com/p/er9x
|
|
* gruvin9x - http://code.google.com/p/gruvin9x
|
|
*
|
|
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef _COMMON_MENUS_H_
|
|
#define _COMMON_MENUS_H_
|
|
|
|
#include "opentx_types.h"
|
|
|
|
typedef int8_t horzpos_t;
|
|
typedef uint16_t vertpos_t;
|
|
|
|
typedef void (* MenuHandlerFunc)(event_t event);
|
|
typedef bool (* MenuEnabledFunc)();
|
|
|
|
typedef struct _MenuHandler {
|
|
MenuHandlerFunc menuFunc;
|
|
MenuEnabledFunc enabledFunc;
|
|
|
|
bool isEnabled() const
|
|
{
|
|
if (enabledFunc)
|
|
return enabledFunc();
|
|
return true;
|
|
}
|
|
} MenuHandler;
|
|
|
|
extern tmr10ms_t menuEntryTime;
|
|
extern vertpos_t menuVerticalPosition;
|
|
extern horzpos_t menuHorizontalPosition;
|
|
extern vertpos_t menuVerticalOffset;
|
|
extern uint8_t menuCalibrationState;
|
|
extern MenuHandlerFunc menuHandlers[5];
|
|
extern uint8_t menuVerticalPositions[4];
|
|
extern uint8_t menuLevel;
|
|
extern event_t menuEvent;
|
|
|
|
void chainMenu(MenuHandlerFunc newMenu);
|
|
void pushMenu(MenuHandlerFunc newMenu);
|
|
void popMenu();
|
|
void abortPopMenu();
|
|
|
|
inline MenuHandlerFunc lastPopMenu()
|
|
{
|
|
return menuHandlers[menuLevel + 1];
|
|
}
|
|
|
|
#endif // _COMMON_MENUS_H_
|