Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -r8d4bc50b9ec9758cd79cb026dd6ebe8cd69a19d8 -rf70ddc5911bffe11fc5e670c8566164af4b6c88f --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 8d4bc50b9ec9758cd79cb026dd6ebe8cd69a19d8) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision f70ddc5911bffe11fc5e670c8566164af4b6c88f) @@ -7,8 +7,8 @@ * * @file ModeTreatment.c * -* @author (last) Dara Navaei -* @date (last) 14-Mar-2024 +* @author (last) Sean Nash +* @date (last) 22-Apr-2024 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -28,6 +28,7 @@ #include "NVDataMgmt.h" #include "OperationModes.h" #include "PersistentAlarm.h" +#include "PresOccl.h" #include "Reservoirs.h" #include "Rinseback.h" #include "RTC.h" @@ -752,6 +753,8 @@ sendTreatmentLogEventData( UF_START_RESUME_EVENT, 0.0, presUFRate ); } transitionToDialysis(); + // To update partial blood pump occlusion baseline - start of treatment + signalBloodPumpPressureOcclBaseline(); result = TREATMENT_DIALYSIS_STATE; } } @@ -1184,6 +1187,7 @@ } // UF volume cannot be set lower than the UF volume that has already been collected else if ( ( uFVolume > ( getF32TreatmentParamUpperRangeLimit( TREATMENT_PARAM_UF_VOLUME ) * ML_PER_LITER ) ) || + ( uFVolume < ( getF32TreatmentParamLowerRangeLimit( TREATMENT_PARAM_UF_VOLUME ) * ML_PER_LITER ) ) || ( uFVolume <= colUFVol ) ) { rejectReason = REQUEST_REJECT_REASON_UF_VOLUME_OUT_OF_RANGE; @@ -1303,6 +1307,8 @@ // Set to new rate result &= setTreatmentParameterU32( TREATMENT_PARAM_BLOOD_FLOW, bloodRate ); setDialysisBloodPumpFlowRate( getTreatmentParameterU32( TREATMENT_PARAM_BLOOD_FLOW ) ); + // Update partial occlusion baseline when blood flow rate changes + signalBloodPumpPressureOcclBaseline(); } // Handle dialysate flow rate changes @@ -1313,6 +1319,8 @@ // Set to new rate result &= setTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_FLOW, dialRate ); setDialysisDialInFlowAndUFRate( getTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_FLOW ), presMaxUFVolumeML, presUFRate ); + // Update partial occlusion baseline when dialysate flow rate changes + signalBloodPumpPressureOcclBaseline(); } } else