Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r62a4d7b976107f7ac4d5013ce06f38f4a0bf65bd -r58129c9bb3053c39efa07f60e975f17e2a04755a --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 62a4d7b976107f7ac4d5013ce06f38f4a0bf65bd) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 58129c9bb3053c39efa07f60e975f17e2a04755a) @@ -1142,30 +1142,6 @@ return result; } -/************************************************************************* - * @brief - * The handleSetROPumpPWM function handles the start of the RO pump with a\n - * PWM. The run is open loop - * @details - * Inputs : none - * Outputs : message handled - * @param message : a pointer to the message to handle - * @return result - *************************************************************************/ -BOOL handleSetROPumpPWM( MESSAGE_T * message ) -{ - BOOL result = FALSE; - - if ( message->hdr.payloadLen == sizeof(U32) ) - { - U32 roPumpPWM; - memcpy( &roPumpPWM, message->payload, sizeof(U32) ); - //result = setROPumpTargetPWM( roPumpPWM ); - } - - return result; -} - /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/ @@ -1621,10 +1597,9 @@ /*********************************************************************//** * @brief * The handleTestROMeasuredFlowOverrideRequest function handles a request to - * override the RO flow rate. - * @details - * Inputs : none - * Outputs : message handled + * override the RO measured flow rate. + * @details Inputs: none + * @details Outputs: message handled * @param message a pointer to the message to handle * @return none *************************************************************************/ @@ -1705,11 +1680,11 @@ memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_PAYLOAD_T) ); if ( FALSE == payload.reset ) { - result = testSetTargetDrainPumpSpeedOverride( payload.state.u32 ); + result = testSetTargetDrainPumpRPMOverride( payload.state.u32 ); } else { - result = testResetTargetDrainPumpSpeedOverride(); + result = testResetTargetDrainPumpRPMOverride(); } } @@ -2223,8 +2198,8 @@ /*********************************************************************//** * @brief -* The handleStartStopOutletUVReactor function handles a request to turn on/off -* the outlet UV reactor. +* 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 @@ -2290,7 +2265,7 @@ /*********************************************************************//** * @brief * The handleThermistorsDataPublishIntervalOverride function handles a request -* to override the publish interval of the thermistors data +* to override the publish interval of the thermistors data. * @details Inputs: none * @details Outputs: message handled * @param message a pointer to the message to handle @@ -2322,7 +2297,7 @@ /*********************************************************************//** * @brief * The handleThermisotrsValueOverride function handles a request to override -* a thermistor's value +* a thermistor's value. * @details Inputs: none * @details Outputs: message handled * @param message a pointer to the message to handle @@ -2354,7 +2329,7 @@ /*********************************************************************//** * @brief * The handleROPumpDutyCycleOverride function handles a request to override -* the RO pumps duty cycle +* the RO pumps duty cycle. * @details Inputs: none * @details Outputs: message handled * @param message a pointer to the message to handle @@ -2383,4 +2358,94 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** +* @brief +* The handleROFlowRateOverride function handles a request to override +* the RO flow rate. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*******************************************************************/ +void handleROFlowRateOverride( 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 ) + { + memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) ); + if ( FALSE == payload.reset ) + { + result = testSetMeasuredROFlowRateOverride( payload.state.f32 ); + } + else + { + result = testResetMeasuredROFlowRateOverride(); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** +* @brief +* The handleROPumpTargetFlowOverride function handles a request to override +* the RO pump target flow rate. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*******************************************************************/ +void handleROPumpTargetFlowOverride( 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 ) + { + memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) ); + + result = setROPumpTargetFlowRate( payload.state.f32, payload.state.f32 ); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** +* @brief +* The handleROPumpTargetPressureOverride function handles a request to +* override the RO pump target pressure. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*******************************************************************/ +void handleROPumpTargetPressureOverride( 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 ) + { + memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) ); + if ( FALSE == payload.reset ) + { + result = testSetTargetROPumpPressureOverride( payload.state.f32 ); + } + else + { + result = testResetTargetROPumpPressureOverride(); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + /**@}*/