Index: firmware/App/Controllers/UVReactors.c =================================================================== diff -u -r92708a5ab23026f5c9afce66bfa542c84141011a -rd7e69554ce0d291ec3f5576367792dd7810a01ea --- firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision 92708a5ab23026f5c9afce66bfa542c84141011a) +++ firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision d7e69554ce0d291ec3f5576367792dd7810a01ea) @@ -82,7 +82,7 @@ UV_REACTORS_DATA_PUB_INTERVAL, 0, 0 }; ///< UV reactors data publish interval. static U32 dataPublishCounter; ///< UV reactors data publish counter. -static U32 selfTestElapsedTime = 0; ///< UV reactors self test elapsed time. +static U32 selfTestElapsedTime; ///< UV reactors self test elapsed time. // Self test functions static UV_REACTORS_SELF_TEST_STATE_T handleUVReactorsSelfTestOff( void ); @@ -103,7 +103,7 @@ * @details Inputs: uvReactorsSelfTestResult, dataPublishCounter, * reactorsStatus, selfTestStates * @details Outputs: uvReactorsSelfTestResult, dataPublishCounter, - * reactorsStatus, selfTestStates + * reactorsStatus, selfTestStates, selfTestElapsedTime * @return none *************************************************************************/ void initUVReactors( void ) @@ -113,6 +113,7 @@ uvReactorsSelfTestResult = SELF_TEST_STATUS_IN_PROGRESS; uvReactorsSelfTestStates = UV_REACTORS_SELF_TEST_OFF; dataPublishCounter = DATA_PUBLISH_COUNTER_START_COUNT; + selfTestElapsedTime = 0; // Initialize the UV reactors. These values are specific to the inlet and outlet reactor // so they cannot be in a for loop @@ -396,22 +397,10 @@ // Get the health of the reactor (override or non-override) and decide the status BOOL isReactorUnhealthy = ( UV_REACTOR_HEALTHY == getUVReactorHealth( reactor ) ? FALSE : TRUE ); - checkPersistentAlarm( ALARM_ID_UV_REACTOR_NOT_HEALTHY, isReactorUnhealthy, (U32)reactor, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ); - // Check if the alarm has been active - if ( TRUE == isAlarmActive( ALARM_ID_UV_REACTOR_NOT_HEALTHY ) ) + if ( TRUE == checkPersistentAlarm( ALARM_ID_UV_REACTOR_NOT_HEALTHY, isReactorUnhealthy, (U32)reactor, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ) ) { reactorsStatus[ reactor ].switchState = TURN_OFF; - - // Check if the health status is overridden or not and then update the reactor's health - if ( OVERRIDE_KEY == reactorsStatus[ reactor ].healthStatus.override ) - { - reactorsStatus[ reactor ].healthStatus.ovData = UV_REACTOR_OFF; - } - else - { - reactorsStatus[ reactor ].healthStatus.data = UV_REACTOR_OFF; - } } // Check if it has been requested to turn off a reactor