Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -re0413e662822f3ccc8b4fe9d969efef7eedb05ad -r2f2e30101c8e31e08a6812c1851c07618c72b1d0 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision e0413e662822f3ccc8b4fe9d969efef7eedb05ad) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 2f2e30101c8e31e08a6812c1851c07618c72b1d0) @@ -674,7 +674,7 @@ // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_DG_SEND_SYSTEM_RECORD; - msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ) + sizeof( U32 ) + sizeof( U32 ); + msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ) + sizeof( U32 ) + length; memcpy( payloadPtr, &payloadCurrNum, sizeof( U32 ) ); payloadPtr += sizeof( U32 ); @@ -685,7 +685,7 @@ memcpy( payloadPtr, &length, sizeof( U32 ) ); payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, sysRcrdAddress, sizeof( U32 ) ); + memcpy( payloadPtr, sysRcrdAddress, length ); // 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_PC, ACK_NOT_REQUIRED ); @@ -713,7 +713,7 @@ // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_DG_SEND_SERVICE_RECORD; - msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ) + sizeof( U32 ) + sizeof( U32 ); + msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ) + sizeof( U32 ) + length; memcpy( payloadPtr, &payloadCurrNum, sizeof( U32 ) ); payloadPtr += sizeof( U32 ); @@ -724,7 +724,7 @@ memcpy( payloadPtr, &length, sizeof( U32 ) ); payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, srvcRcrdAddress, sizeof( U32 ) ); + memcpy( payloadPtr, srvcRcrdAddress, length ); // 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_PC, ACK_NOT_REQUIRED );