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:
mmi
2017-11-15 15:40:39 +00:00
parent 17207a3a4b
commit 711f8e72be
46 changed files with 2572 additions and 454 deletions

View File

@@ -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;
}