Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -r3c0614e16047ada1ea30c9e7f883f78d98b363e3 -ra3f4042b73d09dd6dac075937878685f26053c0a --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 3c0614e16047ada1ea30c9e7f883f78d98b363e3) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision a3f4042b73d09dd6dac075937878685f26053c0a) @@ -45,6 +45,7 @@ #define DEFAULT_RINSEBACK_FLOW_RATE_ML_MIN 200 ///< Default rinseback flow rate (in mL/min). #define MIN_RINSEBACK_FLOW_RATE_ML_MIN 100 ///< Minimum rinseback flow rate (in mL/min). #define MAX_RINSEBACK_FLOW_RATE_ML_MIN 300 ///< Maximum rinseback flow rate (in mL/min). +#define DEFAULT_FILL_RESERVOIR_TO_VOLUME_ML 1500 ///< default Fill reservoir to this volume (in mL). /// Interval at which rinseback progress is to be published to UI. #define RINSEBACK_DATA_PUBLISH_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) @@ -188,6 +189,20 @@ stopSyringePump(); endAirTrapControl(); + // 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();