Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r0b87f7e6142dc3710db5c32a0c7c6694343dd717 -r1017bbc5760a50e20357da1e4f705b3e6157375e --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 0b87f7e6142dc3710db5c32a0c7c6694343dd717) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 1017bbc5760a50e20357da1e4f705b3e6157375e) @@ -641,6 +641,36 @@ /************************************************************************* * @brief + * The sendDGStartStopTrimmerHeaterCommand function constructs a DG start/stop \n + * trimmer heater command message and queues the msg for transmit on the \n + * appropriate CAN channel. + * @details + * Inputs : none + * Outputs : DG start/stop trimmer heater command msg constructed and queued. + * @param start : TRUE indicates start heater, FALSE indicates stop heater. + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL sendDGStartStopTrimmerHeaterCommand( BOOL start ) +{ + BOOL result; + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + + // create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_START_STOP_TRIMMER_HEATER_CMD; + msg.hdr.payloadLen = sizeof( BOOL ); + + memcpy( payloadPtr, &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; +} + +/************************************************************************* + * @brief * The sendDGSampleWaterCommand function constructs a DG sample water command \n * message and queues the msg for transmit on the appropriate CAN channel. * @details @@ -1430,18 +1460,21 @@ MESSAGE_T msg; U08 major = (U08)HD_VERSION_MAJOR; U08 minor = (U08)HD_VERSION_MINOR; + U08 micro = (U08)HD_VERSION_MICRO; U16 build = (U16)HD_VERSION_BUILD; U08 *payloadPtr = msg.payload; // create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_HD_VERSION; - msg.hdr.payloadLen = sizeof( U08 ) + sizeof( U08 ) + sizeof( U16 ); + msg.hdr.payloadLen = sizeof( U08 ) + sizeof( U08 ) + sizeof( U08 ) + sizeof( U16 ); memcpy( payloadPtr, &major, sizeof( U08 ) ); payloadPtr += sizeof( U08 ); memcpy( payloadPtr, &minor, sizeof( U08 ) ); payloadPtr += sizeof( U08 ); + memcpy( payloadPtr, µ, sizeof( U08 ) ); + payloadPtr += sizeof( U08 ); memcpy( payloadPtr, &build, sizeof( U16 ) ); // serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer