Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r8cf0fafa78ce14b5dbdf95510e957846660ac2b9 -r688bd3abbe26cdde15368c8769511d8cf152a721 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 8cf0fafa78ce14b5dbdf95510e957846660ac2b9) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 688bd3abbe26cdde15368c8769511d8cf152a721) @@ -891,6 +891,14 @@ { result = signalUserInitiateROPermeateSampleMode(); } + else if ( DG_DISINFECT_NOCTURNAL_HEAT_STATE == cmd ) // Command 5 nocturnal heat disinfect + { + result = signalUserInitiateNocturnalHeatDisinfectMode(); + } + else if ( DG_DISINFECT_ACTIVE_COOL == cmd ) // Command 6 heat disinfect active cool + { + result = signalUserInitiateHeatDisinfectActiveCoolMode(); + } } sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, result ); @@ -3542,13 +3550,14 @@ * active cool mode command * @details Inputs: none * @details Outputs: none + * @param start the boolean flag to indicate whether to start or stop the + * active cool * @return TRUE if the command was serialized successfully *************************************************************************/ -BOOL sendDGStopActiveCoolModeCommand( void ) +BOOL sendDGStopActiveCoolModeCommand( BOOL start ) { BOOL result; MESSAGE_T msg; - BOOL start = FALSE; // Create a message record blankMessage( &msg ); @@ -3714,7 +3723,37 @@ sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); } +/*********************************************************************//** + * @brief + * The sendDGStartNocturnalHeatDisinfectModeCommand function handles the send + * request to start or stop nocturnal heat disinfect. + * @details Inputs: none + * @details Outputs: none + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +BOOL sendDGStartNocturnalHeatDisinfectModeCommand( BOOL start ) +{ + BOOL result; + MESSAGE_T msg; + DG_HEAT_DISINFECTION_MODE_CMD_T cmd; + cmd.start = start; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_START_STOP_NOCTURNAL_HEAT_DISINFECT; + msg.hdr.payloadLen = sizeof( DG_HEAT_DISINFECTION_MODE_CMD_T ); + + memcpy( &msg.payload, &cmd, sizeof( DG_HEAT_DISINFECTION_MODE_CMD_T ) ); + + // 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 *************************************************************************/