Progress on the menu

- Debounced the interlocks
- Created a specified screen for pre-compliance tests

ADCs must be averaged
menu handling of screens is not OK
destructing tasks is not OK

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@257 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-18 15:26:05 +00:00
parent 97a42de2ea
commit 51ffde94d7
20 changed files with 649 additions and 215 deletions

View File

@@ -34,10 +34,10 @@
#include "repairMenu.h"
#include "platform.h"
#include "storm700.h"
#include "Logger.h"
#include "Observable.h"
#include "rtc.h"
#include "storm700.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
@@ -63,6 +63,7 @@ struct RepairMenu* const mainMenu = &_mainMenu;
// -----------------------------------------------------------------------------
static ErrorStatus repairMenu_errorReceive(const void* const data);
static ErrorStatus repairMenu_freeMainMenuRepairScreenUpdateSemaphore(const void* const data);
// -----------------------------------------------------------------------------
// Function definitions
@@ -75,7 +76,7 @@ ErrorStatus repairMenus_construct(void)
if (returnValue == SUCCESS)
{
// Create first repair menu
returnValue = repairMenu_construct(mainMenu, mainDisplay, &storm700->keyboardDevice, HSB_MAINMENU_TASK_PRIORITY, HSB_MAINMENU_TASK_STACKSIZE, PRESSED);
returnValue = repairMenu_construct(mainMenu, mainDisplay, &storm700->keyboardDevice, HSB_MAINMENU_TASK_PRIORITY, HSB_MAINMENU_TASK_STACKSIZE, repairMenu_freeMainMenuRepairScreenUpdateSemaphore);
}
if (returnValue == SUCCESS)
@@ -94,6 +95,12 @@ ErrorStatus repairMenus_construct(void)
}
struct RepairMenu* repairMenus_getMainRepairMenu(void)
{
return mainMenu;
}
static ErrorStatus repairMenu_errorReceive(const void* const data)
{
T_ErrorCode errorCode = (T_ErrorCode)data;
@@ -116,3 +123,14 @@ static ErrorStatus repairMenu_errorReceive(const void* const data)
}
return SUCCESS;
}
static ErrorStatus repairMenu_freeMainMenuRepairScreenUpdateSemaphore(const void* const data)
{
ErrorStatus returnValue = SUCCESS;
if (xSemaphoreGive(mainMenu->repairScreenUpdateSemaphore) != pdTRUE)
{
returnValue = ERROR;
}
return returnValue;
}