@@ -22,42 +22,16 @@
|
||||
#define _MENUS_H_
|
||||
|
||||
#include "keys.h"
|
||||
#include "common/stdlcd/menus.h"
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
typedef int8_t horzpos_t;
|
||||
#define NAVIGATION_LINE_BY_LINE 0x40
|
||||
#define IS_LINE_SELECTED(sub, k) ((sub)==(k) && menuHorizontalPosition < 0)
|
||||
#else
|
||||
typedef uint8_t horzpos_t;
|
||||
#define NAVIGATION_LINE_BY_LINE 0
|
||||
#define IS_LINE_SELECTED(sub, k) (false)
|
||||
#endif
|
||||
|
||||
#if defined(SDCARD)
|
||||
typedef uint16_t vertpos_t;
|
||||
#else
|
||||
typedef uint8_t vertpos_t;
|
||||
#endif
|
||||
|
||||
typedef void (*MenuHandlerFunc)(event_t event);
|
||||
|
||||
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 uint8_t menuEvent;
|
||||
|
||||
void chainMenu(MenuHandlerFunc newMenu);
|
||||
void pushMenu(MenuHandlerFunc newMenu);
|
||||
void popMenu();
|
||||
void abortPopMenu();
|
||||
|
||||
inline bool isRadioMenuDisplayed()
|
||||
{
|
||||
return menuVerticalPositions[0] == 1;
|
||||
@@ -68,11 +42,6 @@ inline bool isModelMenuDisplayed()
|
||||
return menuVerticalPositions[0] == 0;
|
||||
}
|
||||
|
||||
inline MenuHandlerFunc lastPopMenu()
|
||||
{
|
||||
return menuHandlers[menuLevel+1];
|
||||
}
|
||||
|
||||
void onMainViewMenu(const char * result);
|
||||
void menuFirstCalib(event_t event);
|
||||
void menuMainView(event_t event);
|
||||
|
||||
Reference in New Issue
Block a user