Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r16c0f816fadfa45b51467c5292ba9ecf7a3914bd -rfceea216e64fa6ed06b58625e40c9a9f19ef3d14 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 16c0f816fadfa45b51467c5292ba9ecf7a3914bd) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision fceea216e64fa6ed06b58625e40c9a9f19ef3d14) @@ -56,6 +56,9 @@ #define MAX_FPGA_CLOCK_SPEED_ERRORS 3 ///< maximum number of FPGA clock speed errors within window period before alarm #define MAX_FPGA_CLOCK_SPEED_ERROR_WINDOW_MS (10 * SEC_PER_MIN * MS_PER_SECOND) ///< FPGA clock speed error window +#define PENDING_ACK_LIST_OVERRIDE_UI_CHANNEL 1 ///< Value for determining UI channel when Pending ACKs are overriden. +#define PENDING_ACK_LIST_OVERRIDE_HD_CHANNEL 2 ///< Value for determining HD channel when Pending ACKs are overriden. + #pragma pack(push, 1) /// Record for transmitted message that is pending acknowledgement from receiver. @@ -750,20 +753,30 @@ BOOL result = FALSE; U32 i; - // find match + // Find match for ( i = 0; i < PENDING_ACK_LIST_SIZE; i++ ) { if ( ( TRUE == pendingAckList[ i ].used ) && ( pendingAckList[ i ].seqNo == seqNo ) ) - { // remove message pending ACK from list - pendingAckList[ i ].used = FALSE; - result = TRUE; + { + if ( ( ( getU32OverrideValue( &pendingACKOverride ) == PENDING_ACK_LIST_OVERRIDE_UI_CHANNEL ) && ( pendingAckList[ i ].channel == COMM_BUFFER_OUT_CAN_DG_2_UI ) ) || + ( ( getU32OverrideValue( &pendingACKOverride ) == PENDING_ACK_LIST_OVERRIDE_HD_CHANNEL ) && ( pendingAckList[ i ].channel == COMM_BUFFER_OUT_CAN_DG_2_HD ) ) ) + { + pendingAckList[ i ].used = TRUE; + result = FALSE; + } + else // Remove message pending ACK from list + { + pendingAckList[ i ].used = FALSE; + result = TRUE; + } break; } } return result; } + /*********************************************************************//** * @brief * The checkPendingACKList function searches the pending ACK list to see if @@ -782,7 +795,7 @@ { for ( i = 0; i < PENDING_ACK_LIST_SIZE; i++ ) { // pending ACK expired? - if ( ( TRUE == pendingAckList[ i ].used ) && ( ( TRUE == didTimeout( pendingAckList[ i ].timeStamp, MSG_NOT_ACKED_TIMEOUT_MS ) ) || ( getU32OverrideValue( &pendingACKOverride ) > 0 ) ) ) + if ( ( TRUE == pendingAckList[ i ].used ) && ( ( TRUE == didTimeout( pendingAckList[ i ].timeStamp, MSG_NOT_ACKED_TIMEOUT_MS ) ) ) ) { // if retries left, reset and resend pending message. Do not retry when in POST since the UI might not still be responsive if ( pendingAckList[ i ].retries > 0 ) {