Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r1f500f8e6159a3fbab85ea68389e918a6df66400 -rd00ad426d849083922332f832e88e7137a1cad60 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 1f500f8e6159a3fbab85ea68389e918a6df66400) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision d00ad426d849083922332f832e88e7137a1cad60) @@ -2142,33 +2142,36 @@ /*********************************************************************//** * @brief -* The handleStartStopUVReactorsOverrideRequest function handles a request -* to override a UV reactors state. +* The handleStartStopInletUVReactor function handles a request to turn on/off +* the inlet UV reactor. * @details Inputs: none * @details Outputs: message handled * @param message a pointer to the message to handle * @return none *************************************************************************/ -void handleStartStopUVReactorsOverrideRequest( MESSAGE_T *message ) +BOOL handleStartStopInletUVReactor( MESSAGE_T *message ) { - TEST_OVERRIDE_ARRAY_PAYLOAD_T payload; - BOOL result = FALSE; - // verify payload length - if ( sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) == message->hdr.payloadLen ) + + if ( message->hdr.payloadLen == sizeof(U32) ) { - memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) ); - if ( FALSE == payload.reset ) + BOOL startingReactor; + + memcpy( &startingReactor, message->payload, sizeof(U32) ); + + if ( TRUE == startingReactor ) { - result = testSetUVReactorsStateOverride( payload.index, (PIN_SIGNAL_STATE_T)(payload.state.u32) ); + result = turnOnUVReactor( INLET_UV_REACTOR ); } else { - result = testResetUVReactorsStateOverride( payload.index ); + result = turnOffUVReactor( INLET_UV_REACTOR ); } } - // respond to request - sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, result ); + + return result; } /*********************************************************************//** @@ -2235,4 +2238,38 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** +* @brief +* The handleStartStopOutletUVReactor function handles a request to turn on/off +* the outlet UV reactor. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +BOOL handleStartStopOutletUVReactor( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + if ( message->hdr.payloadLen == sizeof(U32) ) + { + BOOL startingReactor; + + memcpy( &startingReactor, message->payload, sizeof(U32) ); + + if ( TRUE == startingReactor ) + { + result = turnOnUVReactor( OUTLET_UV_REACTOR ); + } + else + { + result = turnOffUVReactor( OUTLET_UV_REACTOR ); + } + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, result ); + + return result; +} + /**@}*/