Update for TLA
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@254 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -49,7 +49,8 @@
|
|||||||
// Constant and macro definitions
|
// Constant and macro definitions
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define REPAIRMENU_MAX_NUMBER_OF_ROWS (11)
|
||||||
|
#define REPAIRMENU_MAX_NUMBER_OF_KEYS (16)
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Type definitions.
|
// Type definitions.
|
||||||
@@ -70,6 +71,42 @@ typedef enum
|
|||||||
NUMBER_OF_MENUS
|
NUMBER_OF_MENUS
|
||||||
} T_MenuState;
|
} T_MenuState;
|
||||||
|
|
||||||
|
struct RepairMenu;
|
||||||
|
typedef void (*RepairMenuFunctionCall)(struct RepairMenu* self, int cursorIndex);
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
NO_ACTION = 0,
|
||||||
|
HOTKEY_SELECT,
|
||||||
|
SELECT,
|
||||||
|
SCROLL_UP,
|
||||||
|
SCROLL_DOWN,
|
||||||
|
DIGIT_INSERT
|
||||||
|
} T_KeyAction;
|
||||||
|
|
||||||
|
struct MenuRow
|
||||||
|
{
|
||||||
|
char text[20];
|
||||||
|
int newState;
|
||||||
|
RepairMenuFunctionCall actionPointer;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct KeyActionBinding
|
||||||
|
{
|
||||||
|
char key;
|
||||||
|
T_KeyAction action;
|
||||||
|
int argument;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct MenuPage
|
||||||
|
{
|
||||||
|
bool hasCursor;
|
||||||
|
int numberOfRows;
|
||||||
|
struct MenuRow row[REPAIRMENU_MAX_NUMBER_OF_ROWS];
|
||||||
|
struct KeyActionBinding keyActionBinding[REPAIRMENU_MAX_NUMBER_OF_KEYS];
|
||||||
|
};
|
||||||
|
|
||||||
struct RepairMenu
|
struct RepairMenu
|
||||||
{
|
{
|
||||||
TaskHandle_t taskHandle;
|
TaskHandle_t taskHandle;
|
||||||
@@ -87,7 +124,7 @@ struct RepairMenu
|
|||||||
struct RepairProcess repairProcess;
|
struct RepairProcess repairProcess;
|
||||||
const struct RepairPreset* repairPreset;
|
const struct RepairPreset* repairPreset;
|
||||||
struct RepairProcessParameters rpParameters;
|
struct RepairProcessParameters rpParameters;
|
||||||
static struct MenuPage menuArray[NUMBER_OF_MENUS];
|
struct MenuPage menuArray[NUMBER_OF_MENUS];
|
||||||
};
|
};
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -46,47 +46,13 @@
|
|||||||
|
|
||||||
#define MENU_HAS_CURSOR (true)
|
#define MENU_HAS_CURSOR (true)
|
||||||
#define MENU_HAS_NO_CURSOR (false)
|
#define MENU_HAS_NO_CURSOR (false)
|
||||||
#define REPAIRMENU_MAX_NUMBER_OF_ROWS (11)
|
|
||||||
#define REPAIRMENU_MAX_NUMBER_OF_KEYS (16)
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Type definitions
|
// Type definitions
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
typedef void (*RepairMenuFunctionCall)(struct RepairMenu* self, int cursorIndex);
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
NO_ACTION = 0,
|
|
||||||
HOTKEY_SELECT,
|
|
||||||
SELECT,
|
|
||||||
SCROLL_UP,
|
|
||||||
SCROLL_DOWN,
|
|
||||||
DIGIT_INSERT
|
|
||||||
} T_KeyAction;
|
|
||||||
|
|
||||||
struct MenuRow
|
|
||||||
{
|
|
||||||
char text[20];
|
|
||||||
int newState;
|
|
||||||
RepairMenuFunctionCall actionPointer;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct KeyActionBinding
|
|
||||||
{
|
|
||||||
char key;
|
|
||||||
T_KeyAction action;
|
|
||||||
int argument;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct MenuPage
|
|
||||||
{
|
|
||||||
bool hasCursor;
|
|
||||||
int numberOfRows;
|
|
||||||
struct MenuRow row[REPAIRMENU_MAX_NUMBER_OF_ROWS];
|
|
||||||
struct KeyActionBinding keyActionBinding[REPAIRMENU_MAX_NUMBER_OF_KEYS];
|
|
||||||
};
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// File-scope variables
|
// File-scope variables
|
||||||
|
|||||||
Reference in New Issue
Block a user