Index: firmware/App/Services/StateServices/TubeSetAutoEject.c =================================================================== diff -u -r26b65c70eca7d767f27a5cbbbd67a543ff9b5f26 -r253979e460b82c6d038e0a566f3be8c6df0a28c9 --- firmware/App/Services/StateServices/TubeSetAutoEject.c (.../TubeSetAutoEject.c) (revision 26b65c70eca7d767f27a5cbbbd67a543ff9b5f26) +++ firmware/App/Services/StateServices/TubeSetAutoEject.c (.../TubeSetAutoEject.c) (revision 253979e460b82c6d038e0a566f3be8c6df0a28c9) @@ -55,8 +55,8 @@ /*********************************************************************//** * @brief * The initTubeSetAutoEject function initializes the Tube Set Eject service. -* @details Inputs: none -* @details Outputs: Resets the flags, counters and sets the initial +* @details \b Inputs: none +* @details \b Outputs: Resets the flags, counters and sets the initial * Tube Set Eject sub-state. * @return none **************************************************************************/ @@ -71,8 +71,8 @@ * @brief * The execTubeSetEject function executes the Tube Set Eject * state machine. - * @details Inputs: currentAutoEjectState - * @details Outputs: currentAutoEjectState. Advances the + * @details \b Inputs: currentAutoEjectState + * @details \b Outputs: currentAutoEjectState. Advances the * Tube Set Eject sub-state * @return none *************************************************************************/ @@ -115,8 +115,8 @@ * The handleAutoEjectAwaitConfirmState function handles the Await confirm * state of the Tube Set Eject state machine. * Waits for the user request to auto-eject - * @details Inputs: autoEjectReqReceived - * @details Outputs: autoEjectReqReceived + * @details \b Inputs: autoEjectReqReceived + * @details \b Outputs: autoEjectReqReceived, autoEjectTimerCounter * @return next Auto-Eject state *************************************************************************/ static TUBE_SET_AUTO_EJECT_STATE_T handleAutoEjectAwaitConfirmState( void ) @@ -139,8 +139,8 @@ * The handleAutoEjectHomingState function handles the Homing state * of the Tube Set Eject state machine. * Homes the blood pump (H4) - * @details Inputs: autoEjectTimerCounter, isPeristalticPumpHome() - * @details Outputs: autoEjectTimerCounter + * @details \b Inputs: autoEjectTimerCounter, isPeristalticPumpHome() + * @details \b Outputs: autoEjectTimerCounter * @return next Auto-Eject state *************************************************************************/ static TUBE_SET_AUTO_EJECT_STATE_T handleAutoEjectHomingState( void ) @@ -158,6 +158,10 @@ autoEjectTimerCounter = 0; state = TUBE_SET_AUTO_EJECT_STATE_EXTENDING_EJECTOR; } + else + { + // No action required + } return state; } @@ -167,8 +171,8 @@ * The handleAutoEjectExtendingEjectorState function handles the * Extending Ejector state of the Tube Set Eject Service * state machine. Extends the ejector pin (H5) to engage the tubeset. - * @details Inputs: autoEjectTimerCounter, getEjectorState() - * @details Outputs: autoEjectTimerCounter + * @details \b Inputs: autoEjectTimerCounter, getEjectorState() + * @details \b Outputs: autoEjectTimerCounter * @return next Auto-Eject state *************************************************************************/ static TUBE_SET_AUTO_EJECT_STATE_T handleAutoEjectExtendingEjectorState( void ) @@ -185,6 +189,10 @@ autoEjectTimerCounter = 0; state = TUBE_SET_AUTO_EJECT_STATE_EJECTING; } + else + { + // No action required + } return state; } @@ -195,8 +203,8 @@ * of the Tube Set Eject state machine. Rotates the blood pump (H4) * forward at 100 mL/min with the ejector extended to push the tubeset * out of the rotor. - * @details Inputs: autoEjectTimerCounter, isPeristalticPumpHome() - * @details Outputs: autoEjectTimerCounter + * @details \b Inputs: autoEjectTimerCounter, isPeristalticPumpHome() + * @details \b Outputs: autoEjectTimerCounter * @return next Auto-Eject state *************************************************************************/ static TUBE_SET_AUTO_EJECT_STATE_T handleAutoEjectEjectingState( void ) @@ -215,6 +223,10 @@ autoEjectTimerCounter = 0; state = TUBE_SET_AUTO_EJECT_STATE_RETRACTING_EJECTOR; } + else + { + // No action required + } return state; } @@ -224,8 +236,8 @@ * The handleAutoEjectRetractingEjectorState function handles the * Retracting Ejector state of the Tube Set Eject state * machine. Retracts the ejector pin (H5) after the tubeset has been ejected. - * @details Inputs: autoEjectTimerCounter, getEjectorState() - * @details Outputs: autoEjectTimerCounter + * @details \b Inputs: autoEjectTimerCounter, getEjectorState() + * @details \b Outputs: autoEjectTimerCounter * @return next Auto-Eject state *************************************************************************/ static TUBE_SET_AUTO_EJECT_STATE_T handleAutoEjectRetractingEjectorState( void ) @@ -239,8 +251,12 @@ else if ( EJECTOR_STATE_RETRACTED == getEjectorState() ) { autoEjectTimerCounter = 0; - state = NUM_OF_TUBE_SET_AUTO_EJECT_SUB_STATES; + state = TUBE_SET_AUTO_EJECT_STATE_COMPLETE; } + else + { + // No action required + } return state; } @@ -249,8 +265,8 @@ * @brief * The handleAutoEjectCompleteState function handles the Complete state of * the Tube Set Eject state machine. - * @details Inputs: none - * @details Outputs: none + * @details \b Inputs: none + * @details \b Outputs: none * @return Auto-Eject complete state *************************************************************************/ static TUBE_SET_AUTO_EJECT_STATE_T handleAutoEjectCompleteState( void ) @@ -262,22 +278,27 @@ * @brief * The isTubeSetEjectComplete function reports whether the eject * service has finished successfully. - * @details \b Inputs: none + * @details \b Inputs: currentAutoEjectState * @details \b Outputs: none * @return TRUE if auto-eject completed and ejector is retracted, * FALSE otherwise. *************************************************************************/ BOOL isTubeSetAutoEjectComplete( void ) { - return ( TUBE_SET_INSTALL_STATE_COMPLETE == currentAutoEjectState ? TRUE : FALSE ); + BOOL result = FALSE; + + result = ( TUBE_SET_AUTO_EJECT_STATE_COMPLETE == currentAutoEjectState ? TRUE : FALSE ); + + return result; } /*********************************************************************//** * @brief * The handleAutoEjectRequest function handles a UI request to remove the * disposable tubeset. - * @details Inputs: none - * @details Outputs: autoEjectReqReceived + * @details \b Message \b Sent: MSG_ID_TD_ADJUST_DISPOSABLES_REMOVAL_CONFIRM_RESPONSE + * @details \b Inputs: currentAutoEjectState, getCurrentOperationMode() + * @details \b Outputs: autoEjectReqReceived * @param message UI message which includes the user confirmation to * eject the tubeset * @return TRUE if confirmation/rejection accepted, FALSE if not