Most parts of the menu structure are functional.
Error handler added Screens for warning, pause, FINISH etc yet to be added git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@255 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "repairPreset.h"
|
||||
#include "repairProcess.h"
|
||||
|
||||
#include "Interlock.h"
|
||||
#include "keypadMatrix.h"
|
||||
#include "Observable.h"
|
||||
#include "rtc.h"
|
||||
@@ -67,6 +68,11 @@ typedef enum
|
||||
CALIBRATIONMENU,
|
||||
PRESETMENU,
|
||||
START_REPAIR,
|
||||
REPAIR_RUNNING,
|
||||
REPAIR_ASK_PAUSE,
|
||||
REPAIR_PAUSE,
|
||||
ERROR_STATE,
|
||||
WARNING_STATE,
|
||||
NO_MENU,
|
||||
NUMBER_OF_MENUS
|
||||
} T_MenuState;
|
||||
@@ -79,6 +85,8 @@ typedef enum
|
||||
NO_ACTION = 0,
|
||||
HOTKEY_SELECT,
|
||||
SELECT,
|
||||
GOTO_STATE,
|
||||
EXECUTE_FUNCTION,
|
||||
SCROLL_UP,
|
||||
SCROLL_DOWN,
|
||||
DIGIT_INSERT
|
||||
@@ -91,11 +99,14 @@ struct MenuRow
|
||||
RepairMenuFunctionCall actionPointer;
|
||||
};
|
||||
|
||||
|
||||
struct KeyActionBinding
|
||||
{
|
||||
char key;
|
||||
Keypad_KeyState keyState;
|
||||
T_KeyAction action;
|
||||
int argument;
|
||||
RepairMenuFunctionCall actionPointer;
|
||||
};
|
||||
|
||||
|
||||
@@ -103,8 +114,11 @@ struct MenuPage
|
||||
{
|
||||
bool hasCursor;
|
||||
int numberOfRows;
|
||||
int maxNumberOfRows;
|
||||
int numberOfKeys;
|
||||
int maxNumberOfKeys;
|
||||
struct MenuRow row[REPAIRMENU_MAX_NUMBER_OF_ROWS];
|
||||
struct KeyActionBinding keyActionBinding[REPAIRMENU_MAX_NUMBER_OF_KEYS];
|
||||
struct KeyActionBinding keyActionBinding[NUMBER_OF_KEY_EVENTS * REPAIRMENU_MAX_NUMBER_OF_KEYS];
|
||||
};
|
||||
|
||||
struct RepairMenu
|
||||
@@ -113,18 +127,18 @@ struct RepairMenu
|
||||
int TaskPriority;
|
||||
uint16_t stackSize;
|
||||
bool runTask;
|
||||
SemaphoreHandle_t secondsSyncronisation;
|
||||
bool initialized;
|
||||
struct Display* display;
|
||||
struct KeyboardDevice* keyboardDevice;
|
||||
T_MenuState menuState;
|
||||
Keypad_KeyState keyStateTrigger;
|
||||
int cursorIndex;
|
||||
int scrollOffset;
|
||||
struct RepairProcess repairProcess;
|
||||
const struct RepairPreset* repairPreset;
|
||||
struct RepairProcessParameters rpParameters;
|
||||
struct MenuPage menuArray[NUMBER_OF_MENUS];
|
||||
char errorMessage[20];
|
||||
char warningMessage[20];
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -197,4 +211,20 @@ extern void repairMenu_feedSecondsCounter(struct RepairMenu* self);
|
||||
*/
|
||||
extern void repairMenu_feedSecondsCounterFromISR(struct RepairMenu* self);
|
||||
|
||||
|
||||
/** ----------------------------------------------------------------------------
|
||||
* repairMenu_interlockFailed
|
||||
* Interlock verification failed
|
||||
*
|
||||
* @param self The repair menu object
|
||||
* @param interlockID 0 for common interlock
|
||||
* !0 for the tesla interlock
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @todo
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
extern void repairMenu_interlockFailed(struct RepairMenu* self, T_INTERLOCK_ID interlockID);
|
||||
|
||||
#endif /* INC_REPAIRMENU_H_ */
|
||||
|
||||
Reference in New Issue
Block a user