Added buzzer

Added powerloss detector

Added buzzer behaviour to system.
Added powerloss behaviour to system 

Added french translation to menu texts

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@359 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-12-13 13:22:06 +00:00
parent 9a5bbf8a7a
commit a48164fe7a
24 changed files with 973 additions and 160 deletions

View File

@@ -44,8 +44,10 @@
#include "Error.h"
#include "hsb-mrts.h"
#include "hwValidationMenu.h"
#include "PowerLossDetector.h"
#include "repairMenu.h"
#include "repairMenus.h"
#include "repairProcesses.h"
#include "Warning.h"
#include "CathodeMCP.h"
@@ -150,7 +152,7 @@ static void printSystemInfoTask(void* parameters)
{
LOGGER_INFO(mainLog, "---------------------------------------");
systeminfoCommandHandler();
vTaskDelay(20000);
vTaskDelay(10000);
}
}
@@ -173,9 +175,14 @@ static ErrorStatus systeminfoCommandHandler(void)
vTaskDelay(10);
OS_logTaskInfo(mainMenu->menuCore->taskHandle);
vTaskDelay(10);
OS_logTaskInfo(rp->taskHandle);
vTaskDelay(10);
OS_logTaskInfo(mainDisplay->taskHandle);
vTaskDelay(10);
OS_logTaskInfo(errorTaskHandle);
vTaskDelay(10);
OS_logTaskInfo(mainBuzzer->taskHandle);
@@ -189,13 +196,13 @@ static void initTask(void* parameters)
if (returnValue == SUCCESS)
{
// Create the error handler
Error_construct();
returnValue = Error_construct();
}
if (returnValue == SUCCESS)
{
// Create the warning handler
Warning_construct();
returnValue = Warning_construct();
}
if (returnValue == SUCCESS)
@@ -204,30 +211,36 @@ static void initTask(void* parameters)
// All IO is initialized here
// Also, all periphery and platform-specifics are initialized here
// IRQs are defined here
initPlatform();
returnValue = initPlatform();
}
if (returnValue == SUCCESS)
{
// Construct the displays
Displays_construct();
returnValue = Displays_construct();
}
if (returnValue == SUCCESS)
{
// Construct the powerloss detector
returnValue = PowerLossDetector_construct(&iFlash->memoryDevice, APP_FLASH_POWERLOSS_PAGE, APP_FLASH_STORAGE_POWERLOSS, APP_FLASH_POWERLOSS_PAGESIZE);
}
if (returnValue == SUCCESS)
{
// Construct the AD Converters
ADConverters_construct();
returnValue = ADConverters_construct();
}
if (returnValue == SUCCESS)
{
// Construct the DA Converters
DAConverters_construct();
returnValue = DAConverters_construct();
}
if (returnValue == SUCCESS)
{
hsb_generateStartScreen(mainDisplay);
returnValue = hsb_generateStartScreen(mainDisplay);
// Let start screen stay for 5 seconds
vTaskDelay(INIT_START_SCREEN_DELAY);
}
@@ -235,13 +248,13 @@ static void initTask(void* parameters)
if (returnValue == SUCCESS)
{
// Construct/Load the device parameters
DeviceParameters_construct(&deviceParameters, &iFlash->memoryDevice);
returnValue = DeviceParameters_construct(&deviceParameters, &iFlash->memoryDevice);
}
if (returnValue == SUCCESS)
{
// Construct the repair presets
RepairPresets_construct(&cs, &iFlash->memoryDevice);
returnValue = RepairPresets_construct(&cs, &iFlash->memoryDevice);
}
#ifdef ENABLE_HW_VALIDATION
@@ -278,7 +291,16 @@ static void initTask(void* parameters)
if (returnValue == SUCCESS)
{
// Construct the repair menu
repairMenus_construct();
returnValue = repairMenus_construct();
}
if (PowerLossDetection_isFlagSet())
{
LOGGER_ERROR(mainLog, "Powerloss detection triggered");
Error_postError(ERROR_POWER_LOSS);
returnValue = ERROR;
// Flag may be restored now
PowerLossDetector_clearBusyFlag();
}
// Delete this init task