Index: firmware/App/Controllers/PresOccl.c =================================================================== diff -u -r0665a32e26dd466378e6ea6fda940353afc691f1 -rbed5628ca08f486b9193d2bc4a73cb2ad4bd7b79 --- firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision 0665a32e26dd466378e6ea6fda940353afc691f1) +++ firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision bed5628ca08f486b9193d2bc4a73cb2ad4bd7b79) @@ -640,7 +640,7 @@ #ifndef _RELEASE_ if( HW_CONFIG_BETA == getHardwareConfigStatus() ) { - outOfRange = (( bpOccl < MIN_OCCLUSION_COUNTS_V3 || bpOccl > MAX_OCCLUSION_COUNTS ? TRUE : FALSE )); + outOfRange = ( bpOccl < MIN_OCCLUSION_COUNTS_V3 ? TRUE : FALSE ); } #endif Index: firmware/App/Controllers/Voltages.c =================================================================== diff -u -r6544fd4773d1f342f68bd11dac80b7c80ecb3d6b -rbed5628ca08f486b9193d2bc4a73cb2ad4bd7b79 --- firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision 6544fd4773d1f342f68bd11dac80b7c80ecb3d6b) +++ firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision bed5628ca08f486b9193d2bc4a73cb2ad4bd7b79) @@ -207,29 +207,43 @@ U32 i; BOOL hasPowerBeenLost = FALSE; + // Have we lost AC power? TODO - replace with CPLD status check + if ( getMonitoredLineLevel( MONITORED_LINE_24V ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) + { + if ( ( getCurrentOperationMode() != MODE_INIT ) && ( FALSE == isSafetyShutdownActivated() ) ) + { + hasPowerBeenLost = TRUE; + } + } + // Check range for ( i = 0; i < NUM_OF_MONITORED_LINES; i++ ) { F32 volts = getMonitoredLineLevel( (MONITORED_VOLTAGES_T)i ); BOOL isVoltageOutOfRange = ( ( volts > MAX_VOLTAGES[ i ] ) || ( volts < MIN_VOLTAGES[ i ] ) ? TRUE : FALSE ); + if ( ( ( isSafetyShutdownActivated() != TRUE ) && ( hasPowerBeenLost != TRUE ) ) || + ( ( i != MONITORED_LINE_24V ) && ( i != MONITORED_LINE_24V_REGEN ) ) ) + { #ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_VOLTAGES_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_VOLTAGES_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) #endif - { - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, isVoltageOutOfRange ) ) { - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, i, isVoltageOutOfRange ); + if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, isVoltageOutOfRange ) ) + { + SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, i, isVoltageOutOfRange ); + } } +#ifndef _RELEASE_ + else + { + isPersistentAlarmTriggered( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, FALSE ); + } +#endif } - } - - if ( ( getMonitoredLineLevel( MONITORED_LINE_24V ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) || - ( getMonitoredLineLevel( MONITORED_LINE_24V_REGEN ) < POWER_LOSS_VOLTAGE_THRESHOLD_V ) ) - { - if ( ( getCurrentOperationMode() != MODE_INIT ) && ( FALSE == isSafetyShutdownActivated() ) ) + else { - hasPowerBeenLost = TRUE; + isPersistentAlarmTriggered( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, FALSE ); } }