Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -rfc923bac57545b5794893c47a97770d8d7cfcee4 -r7e0d7c16341ea0ccd9b806a2db97553498d10365 --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision fc923bac57545b5794893c47a97770d8d7cfcee4) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 7e0d7c16341ea0ccd9b806a2db97553498d10365) @@ -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();