Index: firmware/App/Controllers/UVReactors.c =================================================================== diff -u -r8074ecece0b11532c173ad951a98036f0c54ca52 -r1f1b53030a930c542646d9d88c7db0c3a945f150 --- firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision 8074ecece0b11532c173ad951a98036f0c54ca52) +++ firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision 1f1b53030a930c542646d9d88c7db0c3a945f150) @@ -412,8 +412,8 @@ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_UV_REACTORS ) != SW_CONFIG_ENABLE_VALUE ) #endif { - // Check if the alarm has been active - if ( TRUE == checkPersistentAlarm( ALARM_ID_UV_REACTOR_NOT_HEALTHY, isReactorUnhealthy, (U32)reactor, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ) ) + checkPersistentAlarm( ALARM_ID_UV_REACTOR_NOT_HEALTHY, isReactorUnhealthy, (U32)reactor, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ); + if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_UV_REACTOR_NOT_HEALTHY, isReactorUnhealthy) ) { reactorsStatus[ reactor ].switchState = TURN_OFF; } @@ -435,16 +435,14 @@ // If the flow is below minimum and the allowed time has elapsed, set the reactor's signal to be low and set its state // to be off. setReactorEnableStatus( reactor, PIN_SIGNAL_LOW ); - // The state is directly changed here because the switch state is not changed to be off - reactorsStatus[ reactor ].execState = UV_REACTOR_STATE_OFF; + state = UV_REACTOR_STATE_OFF; } } // Check if it has been requested to turn off a reactor if ( TURN_OFF == reactorsStatus[ reactor ].switchState ) { setReactorEnableStatus( reactor, PIN_SIGNAL_LOW ); - state = UV_REACTOR_STATE_OFF; }