Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -rc2e547d07b8fdadafd2cee283c77a10ff06ebcfa -rbd702f72b93a866671007e6816da1f334a70aec0 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision c2e547d07b8fdadafd2cee283c77a10ff06ebcfa) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision bd702f72b93a866671007e6816da1f334a70aec0) @@ -96,7 +96,7 @@ /// blood flow sensor signal strength low alarm persistence. #define FLOW_SIG_STRGTH_ALARM_PERSIST ( ( MS_PER_SECOND / TASK_PRIORITY_INTERVAL ) * 5 ) -#define MIN_FLOW_SIG_STRENGTH 90.0 ///< Minimum flow sensor signal strength. +#define MIN_FLOW_SIG_STRENGTH 0.9 ///< Minimum flow sensor signal strength (90%). /// Enumeration of blood pump controller states. typedef enum BloodPump_States Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rc2e547d07b8fdadafd2cee283c77a10ff06ebcfa -rbd702f72b93a866671007e6816da1f334a70aec0 --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision c2e547d07b8fdadafd2cee283c77a10ff06ebcfa) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision bd702f72b93a866671007e6816da1f334a70aec0) @@ -94,7 +94,7 @@ /// dialysate flow sensor signal strength low alarm persistence. #define FLOW_SIG_STRGTH_ALARM_PERSIST ( ( MS_PER_SECOND / TASK_PRIORITY_INTERVAL ) * 5 ) -#define MIN_FLOW_SIG_STRENGTH 90.0 ///< Minimum flow sensor signal strength. +#define MIN_FLOW_SIG_STRENGTH 0.9 ///< Minimum flow sensor signal strength (90%). /// Enumeration of dialysate inlet pump states. typedef enum DialInPump_States Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -ra21a04cc7f2624b9c74992a8e918b71933802dd6 -rbd702f72b93a866671007e6816da1f334a70aec0 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision a21a04cc7f2624b9c74992a8e918b71933802dd6) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision bd702f72b93a866671007e6816da1f334a70aec0) @@ -765,8 +765,6 @@ { if ( SALINE_BOLUS_STATE_IDLE == currentSalineBolusState ) { - // set outlet pump to dialysate rate - setDialOutPumpTargetRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // since we were doing UF prior to saline bolus, we want to auto-resume when done salineBolusAutoResumeUF = TRUE; // go to UF paused state @@ -995,14 +993,12 @@ errorFound = TRUE; #endif } - bolusSalineVolumeDelivered = 0.0; result = SALINE_BOLUS_STATE_IDLE; } // user is aborting saline bolus else if ( TRUE == salineBolusAbortRequested ) { salineBolusAbortRequested = FALSE; - bolusSalineVolumeDelivered = 0.0; result = SALINE_BOLUS_STATE_IDLE; } // determine if safety thinks we've over-delivered the bolus @@ -1023,23 +1019,20 @@ signalBloodPumpHardStop(); signalDialInPumpHardStop(); // send last saline bolus data + bolusSalineVolumeDelivered = 0.0; salineBolusBroadcastTimerCtr = SALINE_BOLUS_DATA_PUB_INTERVAL; publishSalineBolusData(); - // switch back to patient artery - setValvePosition( VBA, VALVE_POSITION_B_OPEN ); + // dialysis back to UF state + *dialysisState = DIALYSIS_UF_STATE; // end dialyzer bypass and resume dialysis if no alarms triggered if ( FALSE == errorFound ) { - // end dialyzer bypass - setValvePosition( VDI, VALVE_POSITION_B_OPEN ); - setValvePosition( VDO, VALVE_POSITION_B_OPEN ); // resume UF if appropriate if ( TRUE == salineBolusAutoResumeUF ) { currentUFState = UF_RUNNING_STATE; } // resume dialysis - *dialysisState = DIALYSIS_UF_STATE; startDialysis(); } } @@ -1060,7 +1053,9 @@ { SALINE_BOLUS_STATE_T result = SALINE_BOLUS_STATE_MAX_DELIVERED; - // nothing to be done here - this is a terminal state for a given treatment - no more saline may be delivered to patient + // this is a terminal state for a given treatment - no more saline may be delivered to patient + // if we get here, pop back to UF + *dialysisState = DIALYSIS_UF_STATE; return result; }