Menu implementation structure done. Menus far from finished but basic structure is functional

Scheck-in for TLa for PID tuning

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@252 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-17 07:40:31 +00:00
parent c323bfd04e
commit 3426a0ad9b
9 changed files with 461 additions and 82 deletions

View File

@@ -38,6 +38,12 @@
#include "semphr.h"
#include "stm32f10x.h"
#include "repairPreset.h"
#include "repairProcess.h"
#include "keypadMatrix.h"
#include "Observable.h"
#include "rtc.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
@@ -51,10 +57,17 @@
typedef enum
{
MAINMENU,
REPAIRMENU
MAINMENU = 0,
REPAIRMENU,
ADMINMENU,
CALIBRATIONMENU,
PRESETMENU,
START_REPAIR,
NO_MENU,
NUMBER_OF_MENUS
} T_MenuState;
struct RepairMenu
@@ -66,7 +79,14 @@ struct RepairMenu
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;
};
// -----------------------------------------------------------------------------
@@ -80,15 +100,17 @@ struct RepairMenu
*
* @param self
* @param display
* @param keyboardDevice
* @param taskPriority
* @param stackSize
* @param keyStateTrigger
*
* @return ErrorStatus
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus repairMenu_construct(struct RepairMenu* self, struct Display* display, int taskPriority, uint16_t stackSize);
extern ErrorStatus repairMenu_construct(struct RepairMenu* self, struct Display* display, struct KeyboardDevice* keyboardDevice, int taskPriority, uint16_t stackSize, Keypad_KeyState keyStateTrigger);
/** ----------------------------------------------------------------------------