Index: firmware/App/Modes/TreatmentRecirc.c =================================================================== diff -u -r01588478fb5cb7e78646b3646ba70a40269db20c -r3c9724b7e07c1a82d0e7fd653a99d7cb96d06e5a --- firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision 01588478fb5cb7e78646b3646ba70a40269db20c) +++ firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision 3c9724b7e07c1a82d0e7fd653a99d7cb96d06e5a) @@ -67,7 +67,6 @@ static BOOL handleRecircReconnectUserAction( REQUEST_REJECT_REASON_CODE_T *rejReason ); static BOOL handleRecicConfirmReconnectUserAction( REQUEST_REJECT_REASON_CODE_T *rejReason ); static BOOL handleRecircResumeUserAction( REQUEST_REJECT_REASON_CODE_T *rejReason ); -static BOOL handleRecircEndTreatmentUserAction( REQUEST_REJECT_REASON_CODE_T *rejReason ); static BOOL handleRecircConfirmDisconnectUserAction( REQUEST_REJECT_REASON_CODE_T *rejReason ); static void publishTreatmentRecircData( void ); @@ -178,7 +177,7 @@ * The execTreatmentRecirc function executes the Treatment circulate sub-mode * state machine. * @details Inputs: treatmentRecircState - * @details Outputs: treatmentRecircState, recircTimerCtr + * @details Outputs: treatmentRecircState, recircTimerCtr, recircEndTreatmentRequested * @return none *************************************************************************/ void execTreatmentRecirc( void ) @@ -188,6 +187,12 @@ // Count time in this sub-mode recircTimerCtr++; + // Check for user confirmation of end treatment + if ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == getConfirmationRequestStatus( GENERIC_CONFIRM_ID_TREATMENT_END ) ) + { + recircEndTreatmentRequested = TRUE; + } + switch ( treatmentRecircState ) { case TREATMENT_RECIRC_DISCONNECT_PATIENT_STATE: @@ -369,7 +374,9 @@ break; case REQUESTED_USER_ACTION_TX_RECIRC_END_TREATMENT: - accepted = handleRecircEndTreatmentUserAction( &rejReason ); + // Send message to UI to get user confirmation to end treatment - action initiated only upon receipt of user confirmation from UI + addConfirmationRequest( GENERIC_CONFIRM_ID_TREATMENT_END, GENERIC_CONFIRM_CMD_REQUEST_OPEN, 0 ); + accepted = TRUE; break; case REQUESTED_USER_ACTION_TX_RECIRC_CONFIRM_DISCONNECT: @@ -477,26 +484,6 @@ /*********************************************************************//** * @brief - * The handleRecircEndTreatmentUserAction function handles an end treatment - * user action request. It is assumed that the calling function will set - * the reject reason parameter to None beforehand. - * @details Inputs: treatmentRecircState - * @details Outputs: ending of treatment action handled - * @param rejReason Code indicating reason for rejection - * @return TRUE if user action accepted, FALSE if not - *************************************************************************/ -static BOOL handleRecircEndTreatmentUserAction( REQUEST_REJECT_REASON_CODE_T *rejReason ) -{ - BOOL result = FALSE; - - result = TRUE; - recircEndTreatmentRequested = TRUE; - - return result; -} - -/*********************************************************************//** - * @brief * The handleRecircConfirmDisconnectUserAction function handles a confirm * patient disconnect user action request. It is assumed that the calling * function will set the reject reason parameter to None beforehand.