Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -rb90c3887b95a6eee7f8014ff478f204ed8a5211c -rad186fef9ecae0cee9c7656576b0b1c3e2077d2d --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision b90c3887b95a6eee7f8014ff478f204ed8a5211c) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision ad186fef9ecae0cee9c7656576b0b1c3e2077d2d) @@ -106,6 +106,7 @@ static U32 canXmitRetryCtr = 0; ///< counter for CAN transmit retries. static OVERRIDE_U32_T hdCommunicationStatus = {0, 0, 0, 0}; ///< has HD sent a message since last check static volatile U32 timeOfLastHDCheckIn = 0; ///< last time we received an HD broadcast +static OVERRIDE_U32_T pendingACKOverride = { 0, 0, 0, 0 }; ///< Pending ACK override data structure. // ********** private function prototypes ********** @@ -780,7 +781,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 ) ) ) + if ( ( TRUE == pendingAckList[ i ].used ) && ( ( TRUE == didTimeout( pendingAckList[ i ].timeStamp, MSG_NOT_ACKED_TIMEOUT_MS ) ) || ( getU32OverrideValue( &pendingACKOverride ) > 0 ) ) ) { // 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 ) { @@ -1368,6 +1369,10 @@ handleTestDGRAMStatusOverrideRequest( message ); break; + case MSG_ID_DG_CAN_RECEIVE_ACK_MESSAGE_OVERRIDE: + handleTestDGPendingACKOverrideRequest( message ); + break; + default: // TODO - unrecognized message ID received - ignore break; @@ -1425,4 +1430,48 @@ return result; } +/*********************************************************************//** + * @brief + * The testSetPendingACKOverride function overrides the + * pendingACKOverride variable. + * @details Inputs: none + * @details Outputs: pendingACKOverride + * @param value override for pendingACKOverride + * @return TRUE if override successful, FALSE if not + *************************************************************************/ +BOOL testSetPendingACKOverride( U32 value ) +{ + BOOL result = FALSE; + + if ( TRUE == isTestingActivated() ) + { + result = TRUE; + pendingACKOverride.ovData = value; + pendingACKOverride.override = OVERRIDE_KEY; + } + + return result; +} + +/*********************************************************************//** + * @brief + * The testResetPendingACKOverride function resets the override + * of the pendingACKOverride variable. + * @details Inputs: none + * @details Outputs: pendingACKOverride + * @return TRUE if override reset successful, FALSE if not + *************************************************************************/ +BOOL testResetPendingACKOverride( void ) +{ + BOOL result = FALSE; + + if ( TRUE == isTestingActivated() ) + { + result = TRUE; + pendingACKOverride.override = OVERRIDE_RESET; + pendingACKOverride.ovData = pendingACKOverride.ovInitData; + } + + return result; +} /**@}*/