Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -ra761e8948ce133140a08ce2549991f6dd309dd18 -r3e9328290bdbc18a940935bd7f7c720ca8432b1d --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision a761e8948ce133140a08ce2549991f6dd309dd18) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 3e9328290bdbc18a940935bd7f7c720ca8432b1d) @@ -99,7 +99,7 @@ static DG_RESERVOIR_VOLUME_RECORD_T reservoirsCalRecord; ///< DG reservoirs non-volatile record. static DG_HEATING_CAL_RECORD_T heatingConstsCalRecord; ///< DG heating calibration record. static F32 targetFillFlowRateLPM; ///< Target fill flow rate in L/min. -static BOOL isThisTheFirstCycle = TRUE; ///< Boolean flag to indicate whether this is the first cycle. +static BOOL isThisTheFirstCycle; ///< Boolean flag to indicate whether this is the first cycle. static RESERVOIRS_PREVIOUS_STATUS reservoirPreviousStatus[ NUM_OF_DG_RESERVOIRS ]; ///< Reservoirs previous status. /*********************************************************************//** @@ -147,8 +147,7 @@ // publish active reservoir, fill/drain volume targets at 1 Hz. if ( ++dataPublishCounter >= RESERVOIR_DATA_PUB_INTERVAL ) { - RESERVOIR_DATA_T data; - + RESERVOIR_DATA_T data; data.activeReservoir = getU32OverrideValue( &activeReservoir ); data.fillToVolumeMl = getU32OverrideValue( &fillVolumeTargetMl ); data.drainToVolumeMl = getU32OverrideValue( &drainVolumeTargetMl ); @@ -209,9 +208,8 @@ void setActiveReservoirCmd( DG_RESERVOIR_ID_T resID ) { DG_CMD_RESPONSE_T cmdResponse; - - cmdResponse.commandID = DG_CMD_SWITCH_RESERVOIR; - cmdResponse.rejected = TRUE; + cmdResponse.commandID = DG_CMD_SWITCH_RESERVOIR; + cmdResponse.rejected = TRUE; cmdResponse.rejectCode = DG_CMD_REQUEST_REJECT_REASON_NONE; // switch reservoir command only valid in generation idle mode @@ -540,9 +538,6 @@ heatersTempCalc.tempTargetTrimmer = params.trimmerTargetTemperature; heatersTempCalc.flowTargetDialysateLPM = params.dialysateFlowLPM; - // Set the trimmer heater target temperature since this value is needed for calculations - //setHeaterTargetTemperature( DG_TRIMMER_HEATER, getTrimmerHeaterTargetTemperature() ); // TODO remove - // Check if this is the first time that the dialysate heating parameters are set in DG if ( TRUE == isThisTheFirstCycle ) {