Index: firmware/App/Services/StateServices/FluidBolus.c =================================================================== diff -u -rda286decac70b8da5b369ccca36c05fb5bdb7c73 -rc2951f468ebc19160ee9af14cc9c35bc16121889 --- firmware/App/Services/StateServices/FluidBolus.c (.../FluidBolus.c) (revision da286decac70b8da5b369ccca36c05fb5bdb7c73) +++ firmware/App/Services/StateServices/FluidBolus.c (.../FluidBolus.c) (revision c2951f468ebc19160ee9af14cc9c35bc16121889) @@ -21,6 +21,7 @@ #include "FluidBolus.h" #include "Messaging.h" #include "Pressures.h" +#include "ModeStandby.h" #include "ModeTreatment.h" #include "StateTxBloodPrime.h" #include "StateTxDialysis.h" @@ -44,7 +45,7 @@ // ********** private data ********** static FLUID_BOLUS_STATE_T currentFluidBolusState; ///< Current fluid bolus state -static FLUID_BOLUS_MEDIUM_T currentFluidBolusMedium; ///< Current fluid bolus medium +static FLUID_TYPE_T fluidType; ///< Fluid type for bolus static U32 fluidBolusBroadCastTimerCtr; ///< Broadcast Timer counter static BOOL fluidBolusStartRequested; ///< Flag indicates a fluid bolus start has been requested by user. static BOOL fluidBolusAbortRequested; ///< Flag indicates a fluid bolus abort has been requested by user. @@ -81,7 +82,7 @@ void initFluidBolus( void ) { currentFluidBolusState = FLUID_BOLUS_IDLE_STATE; - currentFluidBolusMedium = getFluidBolusMedium(); + fluidType = getFluidType(); fluidBolusBroadCastTimerCtr = FLUID_BOLUS_DATA_PUB_INTERVAL - 10; // setup to stagger publish from other broadcasters targetBloodFlowMLPM = 0; totalFluidVolumeDelivered_mL = 0.0F; @@ -155,27 +156,6 @@ /*********************************************************************//** * @brief - * The getFluidBolusMedium function determines the fluid bolus medium based - * on the installed tube set type. - * @details \b Inputs: none - * @details \b Outputs: none - * @return FLUID_BOLUS_MEDIUM_SUBSTITUTE for HDF tubing set, - * FLUID_BOLUS_MEDIUM_SALINE otherwise. - *************************************************************************/ -FLUID_BOLUS_MEDIUM_T getFluidBolusMedium( void ) -{ - FLUID_BOLUS_MEDIUM_T medium = FLUID_BOLUS_MEDIUM_SALINE; - - if ( TUBE_SET_TYPE_HDF == getTubeSetType() ) - { - medium = FLUID_BOLUS_MEDIUM_SUBSTITUTE; - } - - return medium; -} - -/*********************************************************************//** - * @brief * The isFluidBolusActive function determines whether a fluid bolus is * currently being delivered. * @details \b Inputs: currentFluidBolusState @@ -333,7 +313,7 @@ setValvePosition( H1_VALV, VALVE_POSITION_C_CLOSE ); setValvePosition( H19_VALV, VALVE_POSITION_B_OPEN ); - if ( FLUID_BOLUS_MEDIUM_SALINE == currentFluidBolusMedium ) + if ( FLUID_TYPE_SALINE == fluidType ) { setBloodPumpTargetFlowRate( targetBloodFlowMLPM, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); } @@ -371,7 +351,7 @@ updateFluidBolusVolumeDelivered(); - if ( FLUID_BOLUS_MEDIUM_SALINE == currentFluidBolusMedium ) + if ( FLUID_TYPE_SALINE == fluidType ) { // Check for empty saline bag per arterial line pressure if ( TRUE == isSalineBagEmpty() )