Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -rf373b6c38077c7e6071939e702fab65db58c1146 -rec17ff0ee8477fde41197b5cadb5b665cf56fd75 --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision f373b6c38077c7e6071939e702fab65db58c1146) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision ec17ff0ee8477fde41197b5cadb5b665cf56fd75) @@ -7,8 +7,8 @@ * * @file Rinseback.c * -* @author (last) Dara Navaei -* @date (last) 05-Mar-2024 +* @author (last) Vinayakam Mani +* @date (last) 10-Apr-2024 * * @author (original) Sean Nash * @date (original) 20-Jan-2021 @@ -227,6 +227,21 @@ setBloodPumpTargetFlowRate( rate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // Start air trap leveling control startAirTrapControl(); + + // If DG restarted for some reason, lets make sure we set the heating parameters first before commanding to + // turn on the trimmer heater and start the DG as well. + if ( DG_MODE_STAN == getDGOpMode() ) + { + F32 targetTempC = getTreatmentParameterF32( TREATMENT_PARAM_DIALYSATE_TEMPERATURE ); + U32 dialysateFlowMLPM = getTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_FLOW ); + + // Set the heating parameters + setPreTreatmentHeatingParams( targetTempC, DEFAULT_FILL_RESERVOIR_TO_VOLUME_ML, DEFAULT_TARGET_FILL_FLOW_RATE_LPM, dialysateFlowMLPM ); + + // Start the DG + cmdStartDG(); + } + // Re-circulate dialysate side of dialyzer w/ heating to maintain temperature setDialInPumpTargetFlowRate( DIALYSATE_FLOW_RATE_FOR_RECIRC, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); cmdStartDGTrimmerHeater();