Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rb2e264a908dbef2b55f9496fbddbe67ae708a75c -r2de8d8e0962237bc863ec0c8b69ac7e6ee50e9ff --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision b2e264a908dbef2b55f9496fbddbe67ae708a75c) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 2de8d8e0962237bc863ec0c8b69ac7e6ee50e9ff) @@ -855,6 +855,10 @@ { result = signalUserInitiateChemcialDisinfectFlushMode(); } + else if ( DG_DISINFECT_RO_PERMEATE_SAMPLE_STATE == cmd ) // Command 4 = RO permeate sample + { + result = signalUserInitiateROPermeateSampleMode(); + } } sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, result ); @@ -1807,7 +1811,7 @@ /*********************************************************************//** * @brief - * The sendDGStartChemicalDisinfectFlushModeCommand function constructs a DG + * The sendDGStartStopChemicalDisinfectFlushModeCommand function constructs a DG * start/stop chemical disinfect flush mode command message and queues the msg * for transmit on the appropriate CAN channel. * @details Inputs: none @@ -1816,7 +1820,7 @@ * @param start TRUE indicates start chemical disinfect flush mode * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ -BOOL sendDGStartChemicalDisinfectFlushModeCommand( BOOL start ) +BOOL sendDGStartStopChemicalDisinfectFlushModeCommand( BOOL start ) { BOOL result; MESSAGE_T msg; @@ -3417,7 +3421,46 @@ serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_DG, ACK_NOT_REQUIRED ); } +// MSG_ID_DG_START_STOP_HEAT_DISINFECT_ACTIVE_COOL +BOOL sendDGStopActiveCoolModeCommand( void ) +{ + BOOL result; + MESSAGE_T msg; + BOOL start = FALSE; + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_START_STOP_HEAT_DISINFECT_ACTIVE_COOL; + msg.hdr.payloadLen = sizeof( BOOL ); + + memcpy( msg.payload, &start, sizeof( BOOL ) ); + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_DG, ACK_REQUIRED ); + + return result; +} + +// MSG_ID_DG_START_STOP_RO_PERMEATE_SAMPLE_MODE_CMD_REQUEST +BOOL sendDGStartStopDGROPermeateSampleModeCommand( BOOL start ) +{ + BOOL result; + MESSAGE_T msg; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_START_STOP_RO_PERMEATE_SAMPLE_MODE_CMD_REQUEST; + msg.hdr.payloadLen = sizeof( BOOL ); + + memcpy( msg.payload, &start, sizeof( BOOL ) ); + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_DG, ACK_REQUIRED ); + + return result; +} + + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/ @@ -8228,4 +8271,28 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); } +/*********************************************************************//** + * @brief + * The handleTestHDSetRecoverFromFaultModeSignal function handles a request to + * set the signal to recover from the fault mode. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestHDSetRecoverFromFaultModeSignal( MESSAGE_T* message ) +{ + BOOL status = FALSE; + + if ( 0 == message->hdr.payloadLen ) + { + status = TRUE; + + setRecoverFromFaultModeSignal(); + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); +} + /**@}*/