Index: firmware/App/Controllers/UVReactors.c =================================================================== diff -u -r67021fbc633259e8e1bce76749dbef7d0cb51998 -rd3819286869611f9c02add72a0f8e321598fdf42 --- firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision 67021fbc633259e8e1bce76749dbef7d0cb51998) +++ firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision d3819286869611f9c02add72a0f8e321598fdf42) @@ -78,7 +78,6 @@ static U32 getReactorHealth( UV_REACTORS_T reactor ); static void setReactorEnableStatus( UV_REACTORS_T reactor, PIN_SIGNAL_STATE_T state ); static void publishUVReactorsData( void ); -static U32 getPublishUVReactorsDataInterval( void ); /*********************************************************************//** * @brief @@ -200,15 +199,7 @@ // Check if the reactor selected is in range if ( reactor < NUM_OF_UV_REACTORS ) { - // Check if the health is in override or not - if ( reactorsStatus[ reactor ].healthStatus.override == OVERRIDE_KEY ) - { - health = (UV_REACTORS_HEALTH_STATUS_T)reactorsStatus[ reactor ].healthStatus.ovData; - } - else - { - health = (UV_REACTORS_HEALTH_STATUS_T)reactorsStatus[ reactor ].healthStatus.data; - } + health = (UV_REACTORS_HEALTH_STATUS_T)getU32OverrideValue( &reactorsStatus[ reactor ].healthStatus ); } else { @@ -439,33 +430,14 @@ /*********************************************************************//** * @brief - * The getPublishValvesDataInterval function gets the data publish interval - * @details Inputs: uvReactorsDataPublishInterval - * @details Outputs: none - * @return returns data publish interval - *************************************************************************/ -static U32 getPublishUVReactorsDataInterval( void ) -{ - U32 result = uvReactorsDataPublishInterval.data; - - if ( OVERRIDE_KEY == uvReactorsDataPublishInterval.override ) - { - result = uvReactorsDataPublishInterval.ovData; - } - - return result; -} - -/*********************************************************************//** - * @brief * The publishUVReactorsData function publishes the UV reactors data. * @details Inputs: dataPublishCounter, reactorsStatus * @details Outputs: dataPublishCounter * @return none *************************************************************************/ static void publishUVReactorsData( void ) { - if ( ++dataPublishCounter > getPublishUVReactorsDataInterval() ) + if ( ++dataPublishCounter > getU32OverrideValue( &uvReactorsDataPublishInterval ) ) { UV_REACTORS_DATA_T uvReactorsData; // Publish the reactors health status