Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r6d5a23b275903587f400bc686aed4d2709cf3e78 -r663c6ccbe24d0adf734ca0684510eef70884cdee --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 6d5a23b275903587f400bc686aed4d2709cf3e78) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 663c6ccbe24d0adf734ca0684510eef70884cdee) @@ -166,14 +166,14 @@ } else if ( TRUE == isCANBoxForRecv( srcCANBox ) ) { - U08 data[CAN_MESSAGE_CARGO_SIZE]; + U08 data[CAN_MESSAGE_PAYLOAD_SIZE]; // get CAN packet received on given CAN message box if ( FALSE != canIsRxMessageArrived( canREG1, srcCANBox ) ) { canGetData( canREG1, srcCANBox, data ); // add CAN packet to appropriate comm buffer based on the message box it came in on (s/b same #) - addToCommBuffer( srcCANBox, data, CAN_MESSAGE_CARGO_SIZE ); + addToCommBuffer( srcCANBox, data, CAN_MESSAGE_PAYLOAD_SIZE ); } } else @@ -361,7 +361,7 @@ // search for next priority CAN packet to transmit for ( i = 0; i < NUM_OF_CAN_OUT_BUFFERS; i++ ) { - if ( numberOfBytesInCommBuffer( CAN_OUT_BUFFERS[i] ) >= CAN_MESSAGE_CARGO_SIZE ) + if ( numberOfBytesInCommBuffer( CAN_OUT_BUFFERS[i] ) >= CAN_MESSAGE_PAYLOAD_SIZE ) { result = CAN_OUT_BUFFERS[i]; break; // found highest priority packet to transmit - we're done @@ -388,12 +388,12 @@ // if a buffer is found with a packet to transmit, get packet from buffer and transmit it if ( buffer != COMM_BUFFER_NOT_USED ) { - U08 data[CAN_MESSAGE_CARGO_SIZE]; - U32 dataSize = getFromCommBuffer( buffer, data, CAN_MESSAGE_CARGO_SIZE ); + U08 data[CAN_MESSAGE_PAYLOAD_SIZE]; + U32 dataSize = getFromCommBuffer( buffer, data, CAN_MESSAGE_PAYLOAD_SIZE ); CAN_MESSAGE_BOX_T mBox = buffer; // CAN message boxes and comm buffers are aligned // if there's another CAN packet to send, send it - if ( dataSize == CAN_MESSAGE_CARGO_SIZE ) + if ( dataSize == CAN_MESSAGE_PAYLOAD_SIZE ) { canTransmit( canREG1, mBox, data ); } @@ -482,8 +482,8 @@ memcpy( &(rcvMsg.msg.hdr), dataPtr, sizeof(MESSAGE_HEADER_T) ); dataPtr += sizeof(MESSAGE_HEADER_T); // copy message cargo portion of message data to the new message - memcpy( &(rcvMsg.msg.cargo), dataPtr, rcvMsg.msg.hdr.cargoLen ); - dataPtr += rcvMsg.msg.hdr.cargoLen; + memcpy( &(rcvMsg.msg.payload), dataPtr, rcvMsg.msg.hdr.payloadLen ); + dataPtr += rcvMsg.msg.hdr.payloadLen; // copy CRC portion of message data to the new message rcvMsg.crc = *dataPtr; // add new message to queue for later processing