Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r5245b978c9960cd064751f86c90c0b35207e1810 -r75132889790857a9e5c330ee0495b9bd53b916fc --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 5245b978c9960cd064751f86c90c0b35207e1810) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 75132889790857a9e5c330ee0495b9bd53b916fc) @@ -41,7 +41,7 @@ #define NUM_OF_CAN_IN_BUFFERS 7 ///< Number of CAN buffers for receiving #define NUM_OF_MSG_IN_BUFFERS 7 ///< Number of Msg buffers for receiving -#define CAN_XMIT_PACKET_TIMEOUT_MS 250 ///< if transmitted CAN frame does not cause a transmit complete interrupt within this time, re-send or move on +#define CAN_XMIT_PACKET_TIMEOUT_MS 200 ///< if transmitted CAN frame does not cause a transmit complete interrupt within this time, re-send or move on #define MAX_XMIT_RETRIES 5 ///< maximum number of retries on no transmit complete interrupt timeout #define HD_COMM_TIMEOUT_IN_MS 2000 ///< HD has not sent any broadcast messages for this much time @@ -779,11 +779,12 @@ if ( pendingAckList[ i ].retries > 0 ) { if ( getCurrentOperationMode() != DG_MODE_INIT ) - { // re-queue message for transmit + { // If not in post, limit the number of retries pendingAckList[ i ].retries--; - pendingAckList[ i ].timeStamp = getMSTimerCount(); - addToCommBuffer( pendingAckList[ i ].channel, pendingAckList[ i ].msg, pendingAckList[ i ].msgSize ); } + // Resend message + pendingAckList[ i ].timeStamp = getMSTimerCount(); + addToCommBuffer( pendingAckList[ i ].channel, pendingAckList[ i ].msg, pendingAckList[ i ].msgSize ); } // if no retries left, alarm else @@ -798,13 +799,10 @@ } } else - { + { // Clear pending ACK list for ( i = 0; i < PENDING_ACK_LIST_SIZE; i++ ) { - if ( TRUE == pendingAckList[ i ].used ) - { // reset timeout for transmit, don't urn up retries when the HD/UI not paying attention. - pendingAckList[ i ].timeStamp = getMSTimerCount(); - } + pendingAckList[ i ].used = FALSE; } } }