Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -re9f15ff59ac0350adcbe544df8b3451e15ee7287 -r026197c08dc426a0a79c9a958d20578d52a9fee3 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision e9f15ff59ac0350adcbe544df8b3451e15ee7287) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 026197c08dc426a0a79c9a958d20578d52a9fee3) @@ -573,7 +573,7 @@ } else { - ; // do nothing + // do nothing } return result; Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -re9f15ff59ac0350adcbe544df8b3451e15ee7287 -r026197c08dc426a0a79c9a958d20578d52a9fee3 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision e9f15ff59ac0350adcbe544df8b3451e15ee7287) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 026197c08dc426a0a79c9a958d20578d52a9fee3) @@ -482,17 +482,14 @@ if ( CONFIRMATION_REQUEST_STATUS_TIMEOUT == status ) { cmd.requestType = GENERIC_CONFIRM_CMD_TIMEOUT_CLOSE; - sendMessage( MSG_ID_TD_UI_GENERIC_CONFIRMATION_REQUEST, - COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&cmd, - sizeof( GENERIC_CONFIRMATION_REQUEST_T ) ); } else { cmd.requestType = GENERIC_CONFIRM_CMD_ACCEPT_CLOSE; - sendMessage( MSG_ID_TD_UI_GENERIC_CONFIRMATION_REQUEST, - COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&cmd, - sizeof( GENERIC_CONFIRMATION_REQUEST_T ) ); } + sendMessage( MSG_ID_TD_UI_GENERIC_CONFIRMATION_REQUEST, + COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&cmd, + sizeof( GENERIC_CONFIRMATION_REQUEST_T ) ); // Clear the confirmation request, it is done and consumed confirmRequests[ i ].requestID = GENERIC_CONFIRM_ID_NONE; @@ -587,7 +584,7 @@ // Find an unused slot for ( i = 0; i < MAX_PENDING_CONFIRM_REQUESTS; i++ ) { - if ( CONFIRMATION_REQUEST_STATUS_UNUSED == confirmRequests[i].status ) + if ( CONFIRMATION_REQUEST_STATUS_UNUSED == confirmRequests[ i ].status ) { confirmRequests[ i ].requestID = requestID; confirmRequests[ i ].requestType = requestType; Index: firmware/App/Monitors/Buttons.c =================================================================== diff -u -re9f15ff59ac0350adcbe544df8b3451e15ee7287 -r026197c08dc426a0a79c9a958d20578d52a9fee3 --- firmware/App/Monitors/Buttons.c (.../Buttons.c) (revision e9f15ff59ac0350adcbe544df8b3451e15ee7287) +++ firmware/App/Monitors/Buttons.c (.../Buttons.c) (revision 026197c08dc426a0a79c9a958d20578d52a9fee3) @@ -48,7 +48,7 @@ NUM_OF_BUTTONS ///< Number of hardware buttons } BUTTON_T; -#define OFF_REQUEST_PULSE_COUNT 4 ///< Number of edges for power off sequence on power off output signal. +#define OFF_REQUEST_PULSE_COUNT 6 ///< Number of edges for power off sequence on power off output signal. #define OFF_REQUEST_PULSE_INTVL_MS 50 ///< Duration (in ms) of power off sequence steps. #define OFF_REQUEST_DELAY_TIME_MS 2000 ///< Duration (in ms) of delay before power off sequence is initiated to provide sub-systems time to wrap things up. #define STOP_BUTTON_PENDING_TIMEOUT_MS 500 ///< Timeout period (in ms) for stop button press to be consumed. @@ -62,7 +62,7 @@ static OVERRIDE_U32_T dataOffButtonState; ///< Current off button state (overrideable). static BUTTON_STATE_T prevOffButtonState; ///< Previous state of off button. -static BOOL offRequestAwaitingUserConfirmation = FALSE; ///< Flag indicates whether a power off request is pending user confirmation. +static BOOL offRequestAwaitingUserConfirmation; ///< Flag indicates whether a power off request is pending user confirmation. static volatile U32 offRequestPendingTimer; ///< Timer counter for pending power off request. static volatile BOOL offButtonPressPending; ///< Flag indicates whether a confirmed power off request is pending execution. static volatile U32 offRequestPulseCount; ///< Power off sequence step counter. @@ -315,7 +315,6 @@ *************************************************************************/ static void handleOffButtonProcessing( void ) { - static U08 shutdownFlag = FALSE; CONFIRMATION_REQUEST_STATUS_T responseStatus = CONFIRMATION_REQUEST_STATUS_UNUSED; // Handle button state transitions for off button @@ -400,12 +399,6 @@ // If user confirmed off button press, manage off request sequence if ( TRUE == offButtonPressPending ) { - if ( !shutdownFlag ) - { - addConfirmationRequest( GENERIC_CONFIRM_ID_POWER_OFF, GENERIC_CONFIRM_CMD_REQUEST_INPROGRESS, 0 ); - shutdownFlag = TRUE; - } - offRequestDelayTimer += TASK_PRIORITY_INTERVAL; if ( offRequestDelayTimer >= OFF_REQUEST_DELAY_TIME_MS ) @@ -421,7 +414,6 @@ { offButtonPressPending = FALSE; offRequestDelayTimer = 0; - shutdownFlag = FALSE; } toggleCPLDOffRequest();