Replaced verification of voltageFree rows with HighVoltageDetection module

Added LED module

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@338 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-12-04 15:18:32 +00:00
parent 7577593dd1
commit 056572f24e
14 changed files with 400 additions and 73 deletions

View File

@@ -40,6 +40,7 @@
#include "platform.h"
#include "CoverSolenoid.h"
#include "HighVoltageDetection.h"
#include "Interlock.h"
#include "Logger.h"
#include "PCBA.h"
@@ -225,27 +226,12 @@ ErrorStatus hsb_disableSafety(void)
DAConverter_setOutputVoltage(dacRow3, 0);
if (PCBA_getInstance()->pcba != PCBA_Tesla)
while (HighVoltageDetection_isVoltagePresent())
{
// Verify that all High Voltage Supplies are shut off and voltages are below security value
while ((abs(adcR1Value) >= HSB_SECURITY_VOLTAGE_THRESHOLD) || (abs(adcR2Value) >= HSB_SECURITY_VOLTAGE_THRESHOLD) || (abs(adcR3Value) >= HSB_SECURITY_VOLTAGE_THRESHOLD))
{
adcR1Value = ADConverter_getInputVoltage(adcRow1);
adcR2Value = ADConverter_getInputVoltage(adcRow2);
adcR3Value = ADConverter_getInputVoltage(adcRow3);
vTaskDelay(100);
}
}
else
{
// Verify that all High Voltage Supplies are shut off and voltages are below security value
while (abs(adcR2Value) >= HSB_SECURITY_VOLTAGE_THRESHOLD)
{
adcR2Value = ADConverter_getInputVoltage(adcRow2);
vTaskDelay(100);
}
vTaskDelay(100);
}
Display_clearLine(mainDisplay, 3);
Display_clearLine(mainDisplay, 4);