Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -rb08c0632119b7528085ae6357f12699e95114bf6 -rb13018664f3d4fe4786a0c4200304f84a6e742ca --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision b08c0632119b7528085ae6357f12699e95114bf6) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision b13018664f3d4fe4786a0c4200304f84a6e742ca) @@ -7,8 +7,8 @@ * * @file ModeTreatment.c * -* @author (last) Sean Nash -* @date (last) 06-May-2024 +* @author (last) Vinayakam Mani +* @date (last) 10-May-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" @@ -212,6 +213,8 @@ *************************************************************************/ U32 transitionToTreatmentMode( void ) { + PRESSURE_LIMIT_CHANGE_RESPONSE_T respRecord; + if ( ( getTestConfigStatus( TEST_CONFIG_RECOVER_TREATMENT ) != TRUE ) || ( getPreviousOperationMode() != DG_MODE_FAUL ) ) { // Initialize treatment mode each time we transition to it @@ -233,6 +236,13 @@ // Enable venous bubble detection in treatment mode setVenousBubbleDetectionEnabled( TRUE ); + // Read back limits for transmit to UI. + respRecord.artPresLimitWindowmmHg = getTreatmentParameterS32( TREATMENT_PARAM_ART_PRES_LIMIT_WINDOW ); + respRecord.venPresLimitWindowmmHg = getTreatmentParameterS32( TREATMENT_PARAM_VEN_PRES_LIMIT_WINDOW ); + respRecord.venPresLimitAsymmetricmmHg = getTreatmentParameterS32( TREATMENT_PARAM_VEN_PRES_LIMIT_ASYMMETRIC ); + // Send response + sendPressureLimitsChangeResponse( &respRecord ); + return currentTreatmentState; } @@ -752,6 +762,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; } } @@ -1306,6 +1318,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 @@ -1316,6 +1330,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