Index: firmware/App/Controllers/UVReactors.c =================================================================== diff -u -r9e5ee62245eb2a73b167eabd6c274a71a76a7b0e -r72bca5d2e489fa253f3bdfdb254261a32c7a0c19 --- firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision 9e5ee62245eb2a73b167eabd6c274a71a76a7b0e) +++ firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision 72bca5d2e489fa253f3bdfdb254261a32c7a0c19) @@ -137,7 +137,8 @@ setReactorEnableStatus( reactor, PIN_SIGNAL_LOW ); } - initPersistentAlarm( ALARM_ID_UV_REACTOR_NOT_HEALTHY, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ); + initPersistentAlarm( ALARM_ID_DG_INLET_UV_REACTOR_NOT_HEALTHY, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ); + initPersistentAlarm( ALARM_ID_DG_OUTLET_UV_REACTOR_NOT_HEALTHY, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ); initPersistentAlarm( ALARM_ID_DG_INLET_UV_REACTOR_ON_WITH_NO_FLOW, UV_REACTORS_ON_NO_FLOW_TIMEOUT_MS, UV_REACTORS_ON_NO_FLOW_TIMEOUT_MS ); initPersistentAlarm( ALARM_ID_DG_OUTLET_UV_REACTOR_ON_WITH_NO_FLOW, UV_REACTORS_ON_NO_FLOW_TIMEOUT_MS, UV_REACTORS_ON_NO_FLOW_TIMEOUT_MS ); } @@ -354,11 +355,11 @@ // Check which reactor has not been healthy and raise an alarm if ( FALSE == isInletHealthy ) { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_UV_REACTOR_NOT_HEALTHY, INLET_UV_REACTOR ); + activateAlarmNoData( ALARM_ID_DG_INLET_UV_REACTOR_NOT_HEALTHY ); } - else + else if ( FALSE == isOutletHealthy ) { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_UV_REACTOR_NOT_HEALTHY, OUTLET_UV_REACTOR ); + activateAlarmNoData( ALARM_ID_DG_OUTLET_UV_REACTOR_NOT_HEALTHY ); } } @@ -409,6 +410,7 @@ { UV_REACTOR_STATE_T state = UV_REACTOR_STATE_ON; BOOL isReactorUnhealthy = ( UV_REACTOR_HEALTHY == getUVReactorHealth( reactor ) ? FALSE : TRUE ); + ALARM_ID_T reactorAlarm = ( INLET_UV_REACTOR == reactor ? ALARM_ID_DG_INLET_UV_REACTOR_NOT_HEALTHY : ALARM_ID_DG_OUTLET_UV_REACTOR_NOT_HEALTHY ); // Update the UV reactor's health. It should be either healthy (1) or not healthy (0) reactorsStatus[ reactor ].healthStatus.data = getReactorHealth( reactor ); @@ -417,9 +419,9 @@ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_UV_REACTORS ) != SW_CONFIG_ENABLE_VALUE ) #endif { - checkPersistentAlarm( ALARM_ID_UV_REACTOR_NOT_HEALTHY, isReactorUnhealthy, (U32)reactor, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ); + checkPersistentAlarm( reactorAlarm, isReactorUnhealthy, (U32)reactor, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ); - if ( TRUE == isAlarmActive( ALARM_ID_UV_REACTOR_NOT_HEALTHY ) ) + if ( TRUE == isAlarmActive( reactorAlarm ) ) { // The UV reactor is not healthy turn it off and trigger the alarm reactorsStatus[ reactor ].switchState = TURN_OFF;