Fixed multiple bugs and errors.
- Added WARNING handler - put voltage calculations to dedicated module fixed last errors. Updated menu repair screen without ERROR from PID This is version 0.9.0.3, which is used for the first duration test Will also be tagged git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@272 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "MenuCore.h"
|
||||
#include "repairMenus.h"
|
||||
#include "repairMenu.h"
|
||||
#include "Warning.h"
|
||||
|
||||
#include "platform.h"
|
||||
#include "Logger.h"
|
||||
@@ -67,6 +68,7 @@ struct RepairMenu* const mainMenu = &_mainMenu;
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
static ErrorStatus repairMenus_errorReceive(const void* const data);
|
||||
static ErrorStatus repairMenus_warningReceive(const void* const data);
|
||||
static ErrorStatus repairMenus_freeMainMenuRepairScreenUpdateSemaphore(const void* const data);
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -91,6 +93,11 @@ ErrorStatus repairMenus_construct(void)
|
||||
returnValue = Observable_addObserver(Error_getObservable(), repairMenus_errorReceive);
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
returnValue = Observable_addObserver(Warning_getObservable(), repairMenus_warningReceive);
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@@ -110,20 +117,56 @@ struct RepairMenu* repairMenus_getMainRepairMenu(void)
|
||||
|
||||
static ErrorStatus repairMenus_errorReceive(const void* const data)
|
||||
{
|
||||
|
||||
T_ErrorCode errorCode = (T_ErrorCode)data;
|
||||
// Only respond to the errors necessary
|
||||
if (errorCode == INTERLOCK_COMMON_FAIL)
|
||||
{
|
||||
repairMenu_interlockFailed(mainMenu, COMMON_INTERLOCK);
|
||||
}
|
||||
else if (errorCode == POWERENABLE_FAIL)
|
||||
{
|
||||
|
||||
}
|
||||
else if (errorCode == REPAIR_FAIL)
|
||||
switch (errorCode)
|
||||
{
|
||||
repairMenu_processFailed(mainMenu);
|
||||
case INTERLOCK_COMMON_FAIL:
|
||||
{
|
||||
repairMenu_interlockFailed(mainMenu, COMMON_INTERLOCK);
|
||||
break;
|
||||
}
|
||||
case POWERENABLE_FAIL:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case REPAIR_FAIL:
|
||||
{
|
||||
repairMenu_processFailed(mainMenu);
|
||||
break;
|
||||
}
|
||||
case ERROR_CRC_PIN:
|
||||
case ERROR_CRC_PARAMETERS:
|
||||
case ERROR_CRC_PRESETS:
|
||||
{
|
||||
repairMenu_printCRCFailure(mainMenu, errorCode);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static ErrorStatus repairMenus_warningReceive(const void* const data)
|
||||
{
|
||||
T_WarningCode warningCode = (T_WarningCode)data;
|
||||
|
||||
switch (warningCode)
|
||||
{
|
||||
case WARNING_INTERLOCK_COMMON_FAIL:
|
||||
{
|
||||
repairMenu_interlockWarning(mainMenu, COMMON_INTERLOCK);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user