Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r11f666f254d9777558c332403557a3d94720b54a -rd19c1bf780832d5c4617a9038bd87ec8f49136ee --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 11f666f254d9777558c332403557a3d94720b54a) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision d19c1bf780832d5c4617a9038bd87ec8f49136ee) @@ -8,7 +8,7 @@ * @file SystemCommMessages.c * * @author (last) Dara Navaei -* @date (last) 21-Sep-2022 +* @date (last) 18-Oct-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -1044,7 +1044,7 @@ * @param message a pointer to the message to handle * @return none *************************************************************************/ -void handleStartStopTrimmerHeaterCmd( MESSAGE_T *message ) +void handleHDStartStopTrimmerHeaterCmd( MESSAGE_T *message ) { BOOL result = FALSE; @@ -1282,6 +1282,41 @@ } /*********************************************************************//** + * @brief + * The handleDGStartStopTrimmerHeater function handles a request start or + * stop the trimmer heater + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return result + *************************************************************************/ +BOOL handleDGStartStopTrimmerHeater( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + if ( message->hdr.payloadLen == sizeof( U32 ) ) + { + BOOL startingHeater; + + memcpy( &startingHeater, message->payload, sizeof( U32 ) ); + + if ( TRUE == startingHeater ) + { + result = startHeater( DG_TRIMMER_HEATER ); + } + else + { + stopHeater( DG_TRIMMER_HEATER ); + result = TRUE; + } + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, result ); + + return result; +} + +/*********************************************************************//** * @brief * The handleStartStopDGChemicalDisinfect function handles a request to start * or stop DG chemical disinfect mode.