Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r39bd83ee1d4898c4d244410933dc6f23d42b0c9c -rc80e40e4402028b1c09357e78360bf61afff4e9b --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 39bd83ee1d4898c4d244410933dc6f23d42b0c9c) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision c80e40e4402028b1c09357e78360bf61afff4e9b) @@ -21,13 +21,13 @@ #include "sci.h" #include "sys_dma.h" -#include "SystemComm.h" #include "Comm.h" -#include "Interrupts.h" -#include "OperationModes.h" +#include "Interrupts.h" +#include "OperationModes.h" +#include "SystemComm.h" +#include "SystemCommMessages.h" #include "Timers.h" #include "Utilities.h" -#include "SystemCommMessages.h" /** * @addtogroup SystemComm @@ -50,7 +50,7 @@ #define MAX_COMM_CRC_FAILURE_WINDOW_MS (10 * SEC_PER_MIN * MS_PER_SECOND) ///< CRC error window #define MSG_NOT_ACKED_TIMEOUT_MS 150 ///< Maximum time for a Denali message that requires ACK to be ACK'd -#define MSG_NOT_ACKED_TIMEOUT_MS_INIT 5000 ///< Maximum time for a Denali message that requires ACK to be ACK'd on the INIT state for the first (UI version request) message of the POST +#define MSG_NOT_ACKED_TIMEOUT_MS_INIT 5000 ///< Maximum time for a Denali message that requires ACK to be ACK'd on the INIT state for the first (UI version request) message of the POST #define MSG_NOT_ACKED_MAX_RETRIES 3 ///< Maximum number of times a message that requires ACK that was not ACK'd can be re-sent before alarm #define PENDING_ACK_LIST_SIZE 25 ///< Maximum number of Denali messages that can be pending ACK at any given time @@ -873,13 +873,13 @@ // Find expired messages pending ACK for ( i = 0; i < PENDING_ACK_LIST_SIZE; i++ ) - { // Pending ACK expired? + { // Pending ACK expired? U32 timeoutPeriod = MSG_NOT_ACKED_TIMEOUT_MS; // set the timeout as default if ( MODE_INIT == getCurrentOperationMode() ) { // change it to longer timeout if the HD is in INIT state timeoutPeriod = MSG_NOT_ACKED_TIMEOUT_MS_INIT; - } + } if ( ( TRUE == pendingAckList[ i ].used ) && ( TRUE == didTimeout( pendingAckList[ i ].timeStamp, timeoutPeriod ) ) ) { // If retries left, reset and resend pending message if ( pendingAckList[ i ].retries > 0 )