Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r6c60d0d0300828750c76f2e397d4e7ccaa84bbb2 -r05b4d416b6bd5e7af4347f112a20f9f81a257064 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 6c60d0d0300828750c76f2e397d4e7ccaa84bbb2) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 05b4d416b6bd5e7af4347f112a20f9f81a257064) @@ -109,16 +109,19 @@ // prefix data with message sync byte data[ msgSize++ ] = MESSAGE_SYNC_BYTE; - // set sequence # and ACK bit + // set sequence # and ACK bit (unless this is an ACK to a received message) #ifndef ACK_NOT_IMPLEMENTED - // thread protect next sequence # access & increment - _disable_IRQ(); - msg.hdr.seqNo = nextSeqNo; - nextSeqNo = INC_WRAP( nextSeqNo, MIN_MSG_SEQ_NO, MAX_MSG_SEQ_NO ); - _enable_IRQ(); - if ( TRUE == ackReq ) + if ( msg.hdr.msgID != MSG_ID_ACK ) { - msg.hdr.seqNo *= -1; + // thread protect next sequence # access & increment + _disable_IRQ(); + msg.hdr.seqNo = nextSeqNo; + nextSeqNo = INC_WRAP( nextSeqNo, MIN_MSG_SEQ_NO, MAX_MSG_SEQ_NO ); + _enable_IRQ(); + if ( TRUE == ackReq ) + { + msg.hdr.seqNo *= -1; + } } #endif