Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -rcc8b9ddb9905161ddb0dc2af6bfbf863408669c8 -rdb5eeea50b6d69b626ce97f0f32377313385a009 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision cc8b9ddb9905161ddb0dc2af6bfbf863408669c8) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision db5eeea50b6d69b626ce97f0f32377313385a009) @@ -620,7 +620,7 @@ if ( message.crc == crc8( (U08*)(&message), sizeof(MESSAGE_HEADER_T) + message.msg.hdr.payloadLen ) ) { // if ACK, mark pending message ACK'd - if ( MSG_ID_ACK == message.msg.hdr.msgID ) + if ( MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK == message.msg.hdr.msgID ) { matchACKtoPendingACKList( message.msg.hdr.seqNo ); } Index: firmware/App/Services/SystemComm.h =================================================================== diff -u -r025612ad77fe630889a364586de54bffe5262d56 -rdb5eeea50b6d69b626ce97f0f32377313385a009 --- firmware/App/Services/SystemComm.h (.../SystemComm.h) (revision 025612ad77fe630889a364586de54bffe5262d56) +++ firmware/App/Services/SystemComm.h (.../SystemComm.h) (revision db5eeea50b6d69b626ce97f0f32377313385a009) @@ -32,17 +32,17 @@ // ********** public definitions ********** -#define MESSAGE_SYNC_BYTE 0xA5 ///< Denali message syncronization byte. +#define MESSAGE_SYNC_BYTE 0xA5 ///< Denali message syncronization byte. -#define CAN_MESSAGE_PAYLOAD_SIZE 8 ///< CAN frame payload size (in bytes). +#define CAN_MESSAGE_PAYLOAD_SIZE 8 ///< CAN frame payload size (in bytes). -#define MSG_ID_ACK 0xFFFF ///< Denali message ID for acknowledging received messages (when required). -#define MSG_ACK_BIT 0x8000 ///< ACK bit in sequence number that indicates an ACK is required. -#define MAX_MSG_SEQ_NO 0x7FFF ///< Maximum sequence number for Denali message (then wraps to 1). -#define MIN_MSG_SEQ_NO 0x0001 ///< Minimum sequence number for Denali message. -#define MAX_ACK_MSG_SIZE ( sizeof( MESSAGE_WRAPPER_T ) + 1 + CAN_MESSAGE_PAYLOAD_SIZE ) ///< Maximum size (in bytes) of Denali message including full (wrapped) message + sync + any CAN padding) +#define MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK 0xFFFF ///< Denali message ID for acknowledging received messages (when required). +#define MSG_ACK_BIT 0x8000 ///< ACK bit in sequence number that indicates an ACK is required. +#define MAX_MSG_SEQ_NO 0x7FFF ///< Maximum sequence number for Denali message (then wraps to 1). +#define MIN_MSG_SEQ_NO 0x0001 ///< Minimum sequence number for Denali message. +#define MAX_ACK_MSG_SIZE ( sizeof( MESSAGE_WRAPPER_T ) + 1 + CAN_MESSAGE_PAYLOAD_SIZE ) ///< Maximum size (in bytes) of Denali message including full (wrapped) message + sync + any CAN padding) -typedef COMM_BUFFER_T CAN_MESSAGE_BOX_T; ///< the CAN comm buffers align with the active CAN message boxes +typedef COMM_BUFFER_T CAN_MESSAGE_BOX_T; ///< the CAN comm buffers align with the active CAN message boxes // ********** public function prototypes ********** Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rcc8b9ddb9905161ddb0dc2af6bfbf863408669c8 -rdb5eeea50b6d69b626ce97f0f32377313385a009 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision cc8b9ddb9905161ddb0dc2af6bfbf863408669c8) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision db5eeea50b6d69b626ce97f0f32377313385a009) @@ -104,7 +104,7 @@ data[ msgSize++ ] = MESSAGE_SYNC_BYTE; // set sequence # and ACK bit (unless this is an ACK to a received message) - if ( msg.hdr.msgID != MSG_ID_ACK ) + if ( msg.hdr.msgID != MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK ) { // thread protect next sequence # access & increment _disable_IRQ(); @@ -177,7 +177,7 @@ // send ACK back with same seq. #, but w/o ACK bit msg.hdr.seqNo = message->hdr.seqNo * -1; // ACK messages always have this ID - msg.hdr.msgID = MSG_ID_ACK; + msg.hdr.msgID = MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK; // ACK messages always have no payload msg.hdr.payloadLen = 0;