Index: App/Contollers/Buttons.c =================================================================== diff -u -rc91e9da338d92432930d3589a4055ebbb404c6cb -r833095dbbe2b21a989b05f48bd7ddc390ad964cb --- App/Contollers/Buttons.c (.../Buttons.c) (revision c91e9da338d92432930d3589a4055ebbb404c6cb) +++ App/Contollers/Buttons.c (.../Buttons.c) (revision 833095dbbe2b21a989b05f48bd7ddc390ad964cb) @@ -43,6 +43,9 @@ #define STOP_BUTTON_PENDING_TIMEOUT 500 // ms #define STUCK_BUTTON_TIMEOUT 1000 // ms +#define USER_CONFIRMED 1 +#define USER_REJECTED 0 + // ********** private data ********** static BUTTON_STATE_T offButtonState = BUTTON_STATE_RELEASED; @@ -188,7 +191,7 @@ void userConfirmOffButton( U08 response ) { // did user confirm? - if ( 1 == response ) + if ( USER_CONFIRMED == response ) { if ( TRUE == isCurrentOpModeOkToTurnOff() ) { @@ -297,9 +300,14 @@ // if off request in a valid mode, send to UI for user confirmation if ( TRUE == isCurrentOpModeOkToTurnOff() ) { - // TODO - send off button to UI for user confirmation - // TODO - remove later (just pretend user confirmed for now) - userConfirmOffButton(1); + // send off button to UI for user confirmation + sendOffButtonMsgToUI(); +// ***************************** TEST CODE ****************************** +// TODO - remove later (just pretend user confirmed for now) +#if 1 + userConfirmOffButton( USER_CONFIRMED ); +#endif +// ************************** END TEST CODE ****************************** } } prevOffButtonState = offButtonState;