Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r0bf1c0824844ed4c227eef0323238daedf505dc7 -rd110e0ed1d67e15d968a64da61c2535965ed1321 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 0bf1c0824844ed4c227eef0323238daedf505dc7) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision d110e0ed1d67e15d968a64da61c2535965ed1321) @@ -1156,6 +1156,10 @@ handleSetConcentratePumpTargetSpeed( message ); break; + case MSG_ID_CONCENTRATE_PUMP_STATE_CHANGE_REQUEST: + handleConcentratePumpStateChangeRequest( message ); + break; + default: // TODO - unrecognized message ID received - ignore break; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r0bf1c0824844ed4c227eef0323238daedf505dc7 -rd110e0ed1d67e15d968a64da61c2535965ed1321 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 0bf1c0824844ed4c227eef0323238daedf505dc7) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision d110e0ed1d67e15d968a64da61c2535965ed1321) @@ -1959,4 +1959,38 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** + * @brief + * The handleConcentratePumpStateChangeRequest function handles a request to + * change the concentrate pumps' state. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleConcentratePumpStateChangeRequest( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( ( sizeof( BOOL ) == message->hdr.payloadLen ) && ( TRUE == isTestingActivated() ) ) + { + result = TRUE; + + BOOL payload; + memcpy( &payload, message->payload, sizeof( BOOL ) ); + if ( TRUE == payload ) + { + requestConcentratePumpOn(); + } + else + { + requestConcentratePumpOff(); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + /**@}*/ Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r0bf1c0824844ed4c227eef0323238daedf505dc7 -rd110e0ed1d67e15d968a64da61c2535965ed1321 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 0bf1c0824844ed4c227eef0323238daedf505dc7) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision d110e0ed1d67e15d968a64da61c2535965ed1321) @@ -206,6 +206,9 @@ // MSG_ID_CONCENTRATE_PUMP_TARGET_SPEED_OVERRIDE void handleSetConcentratePumpTargetSpeed( MESSAGE_T *message ); +// MSG_ID_CONCENTRATE_PUMP_STATE_CHANGE_REQUEST +void handleConcentratePumpStateChangeRequest( MESSAGE_T *message ); + /**@}*/ #endif