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

@@ -81,6 +81,8 @@ ErrorStatus hsb_generateStartScreen(struct Display* Display)
if (returnValue == SUCCESS)
{
Display_setCursorToPosition(mainDisplay, 1, 1);
vTaskDelay(10);
returnValue = Display_write(mainDisplay, PCBA_getInstance()->name, 1, 1);
}
else
@@ -116,29 +118,29 @@ ErrorStatus hsb_enableSafetyWithError(void)
CoverSolenoid_lock();
}
if (returnValue == SUCCESS)
{
// Check for INTERLOCK CLOSE
if (Interlock_isClosed(interlock))
{
// Enable Interrupt for interlock switch
Interlock_setEXTI(interlock, ENABLE);
}
else
{
Error_postError(INTERLOCK_COMMON_FAIL);
returnValue = ERROR;
}
}
if (returnValue == SUCCESS)
{
// In case of a TESLA repair, release the teslaGunSafety
if (PCBA_getInstance()->pcba == PCBA_Tesla)
{
TeslaGunSafety_release();
}
}
// if (returnValue == SUCCESS)
// {
// // Check for INTERLOCK CLOSE
// if (Interlock_isClosed(interlock))
// {
// // Enable Interrupt for interlock switch
// Interlock_setEXTI(interlock, ENABLE);
// }
// else
// {
// Error_postError(INTERLOCK_COMMON_FAIL);
// returnValue = ERROR;
// }
// }
//
// if (returnValue == SUCCESS)
// {
// // In case of a TESLA repair, release the teslaGunSafety
// if (PCBA_getInstance()->pcba == PCBA_Tesla)
// {
// TeslaGunSafety_release();
// }
// }
if (returnValue == SUCCESS)
{
@@ -162,29 +164,29 @@ ErrorStatus hsb_enableSafetyWithWarning(void)
CoverSolenoid_lock();
}
if (returnValue == SUCCESS)
{
// Check for INTERLOCK CLOSE
if (Interlock_isClosed(interlock))
{
// Enable Interrupt for interlock switch
Interlock_setEXTI(interlock, ENABLE);
}
else
{
Warning_postWarning(WARNING_INTERLOCK_COMMON_FAIL);
returnValue = ERROR;
}
}
if (returnValue == SUCCESS)
{
// In case of a TESLA repair, release the teslaGunSafety
if (PCBA_getInstance()->pcba == PCBA_Tesla)
{
TeslaGunSafety_release();
}
}
// if (returnValue == SUCCESS)
// {
// // Check for INTERLOCK CLOSE
// if (Interlock_isClosed(interlock))
// {
// // Enable Interrupt for interlock switch
// Interlock_setEXTI(interlock, ENABLE);
// }
// else
// {
// Warning_postWarning(WARNING_INTERLOCK_COMMON_FAIL);
// returnValue = ERROR;
// }
// }
//
// if (returnValue == SUCCESS)
// {
// // In case of a TESLA repair, release the teslaGunSafety
// if (PCBA_getInstance()->pcba == PCBA_Tesla)
// {
// TeslaGunSafety_release();
// }
// }
if (returnValue == SUCCESS)
{
@@ -202,29 +204,22 @@ ErrorStatus hsb_disableSafety(void)
{
ErrorStatus returnValue = SUCCESS;
int adcR1Value = HSB_SECURITY_VOLTAGE_THRESHOLD;
int adcR2Value = HSB_SECURITY_VOLTAGE_THRESHOLD;
int adcR3Value = HSB_SECURITY_VOLTAGE_THRESHOLD;
if (PCBA_getInstance()->pcba == PCBA_Tesla)
{
TeslaGunSafety_block();
}
// Display_clearScreen(mainDisplay);
char buffer[mainDisplay->displayDevice->parameters.numberOfColumns];
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "WAITING FOR");
Display_write(mainDisplay, buffer, 3, 5);
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "POWER DOWN");
Display_write(mainDisplay, buffer, 4, 6);
// Power-down the DAC outputs
DAConverter_setOutputVoltage(dacRow1, 0);
DAConverter_setOutputVoltage(dacRow2, 0);
DAConverter_setOutputVoltage(dacRow3, 0);
char buffer[mainDisplay->displayDevice->parameters.numberOfColumns];
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "WAITING FOR");
Display_write(mainDisplay, buffer, 3, 5);
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "POWER DOWN");
Display_write(mainDisplay, buffer, 4, 6);
while (HighVoltageDetection_isVoltagePresent())
{