Index: firmware/App/Controllers/Voltages.c =================================================================== diff -u -rf760ffc4b10556e5186e9ceb90294262063440ca -r78a4a6b45ebc76c63aa90c3505ef3315675afd3b --- firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision f760ffc4b10556e5186e9ceb90294262063440ca) +++ firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision 78a4a6b45ebc76c63aa90c3505ef3315675afd3b) @@ -18,7 +18,8 @@ #include "AlarmMgmt.h" #include "FPGA.h" #include "InternalADC.h" -#include "PersistentAlarm.h" +#include "PersistentAlarm.h" +#include "SafetyShutdown.h" #include "SystemCommMessages.h" #include "TaskGeneral.h" #include "Timers.h" @@ -223,18 +224,21 @@ } } - if ( ( ( getMonitoredLineLevel( MONITORED_LINE_24V ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) || - ( getMonitoredLineLevel( MONITORED_LINE_24V_REGEN ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) ) && ( getCurrentOperationMode() != MODE_INIT ) ) + if ( ( getMonitoredLineLevel( MONITORED_LINE_24V ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) || + ( getMonitoredLineLevel( MONITORED_LINE_24V_REGEN ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) ) { - hasPowerBeenLost = TRUE; + if ( ( getCurrentOperationMode() != MODE_INIT ) && ( FALSE == isSafetyShutdownActivated() ) ) + { + hasPowerBeenLost = TRUE; + } } if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_AC_POWER_LOST, hasPowerBeenLost ) ) { HD_OP_MODE_T opMode = getCurrentOperationMode(); // Pre-Treatment, Treatment, or Post-Treatment mode - if ( opMode == MODE_PRET || opMode == MODE_TREA || opMode == MODE_POST ) + if ( ( MODE_PRET == opMode ) || ( MODE_TREA == opMode ) || ( MODE_POST == opMode ) ) { SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_AC_POWER_LOST_IN_TREATMENT, getMonitoredLineLevel( MONITORED_LINE_24V ), getMonitoredLineLevel( MONITORED_LINE_24V_REGEN ) ); }