Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -ra3f4042b73d09dd6dac075937878685f26053c0a -r56c5146e45e2ad076fe5f32f040dc633098bf487 --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision a3f4042b73d09dd6dac075937878685f26053c0a) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 56c5146e45e2ad076fe5f32f040dc633098bf487) @@ -8,7 +8,7 @@ * @file Rinseback.c * * @author (last) Dara Navaei -* @date (last) 14-Mar-2024 +* @date (last) 15-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();