Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r8418e01b620ff3b0f1c06a3a3c25f7804b3a530e -r7e4025c730935b8e857fc999f70ef957e8ecec41 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 8418e01b620ff3b0f1c06a3a3c25f7804b3a530e) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 7e4025c730935b8e857fc999f70ef957e8ecec41) @@ -1279,6 +1279,7 @@ if ( TRUE == startingDGHeatDisinfect ) { + setNocturnalHeatDisinfectStatus( FALSE ); status = startDGHeatDisinfect(); } else @@ -1963,7 +1964,40 @@ serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_2_HD, ACK_REQUIRED ); } +/*********************************************************************//** + * @brief + * The handleStartStopDGNocturnalHeatDisifnect function handles a request to + * start or stop DG nocturnal heat disinfect. + * @details Inputs: none + * @details Outputs: message handled + * @param message: a pointer to the message to handle + * @return result + *************************************************************************/ +void handleStartStopDGNocturnalHeatDisifnect( MESSAGE_T* message ) +{ + BOOL status = FALSE; + if ( message->hdr.payloadLen == sizeof(U32) ) + { + BOOL startingDGNocturnalHeatDisinfect; + + memcpy( &startingDGNocturnalHeatDisinfect, message->payload, sizeof(U32) ); + + if ( TRUE == startingDGNocturnalHeatDisinfect ) + { + setNocturnalHeatDisinfectStatus( TRUE ); + status = startDGHeatDisinfect(); + } + else + { + status = startDGHeatDisinfect(); + } + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, status ); +} + + // *********************************************************************** // **************** Message Handling Helper Functions ******************** // ***********************************************************************