Index: firmware/App/Controllers/DrainPump.c =================================================================== diff -u -rd3819286869611f9c02add72a0f8e321598fdf42 -r24e8fcb5744724be72ea26bebd95ec594c2c26fe --- firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision d3819286869611f9c02add72a0f8e321598fdf42) +++ firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision 24e8fcb5744724be72ea26bebd95ec594c2c26fe) @@ -116,7 +116,7 @@ static DRAIN_PUMP_STATE_T pendingDrainPumpCmd = DRAIN_PUMP_OFF_STATE; ///< Delayed (pending) drain pump command. static F32 pendingDrainPumpCmdTarget = 0.0; ///< Delayed (pending) drain pump command target (rpm or PSI depending on command). static U32 pendingDrainPumpCmdCountDown = 0; ///< Delayed (pending) drain pump command count down timer (in task intervals). -static F32 modeRecircTargetFlushVolL = 0.0; ///< Mode recirculation target flush volume in liters. +static F32 targetFlushLineVolume_L = 0.0; ///< Target flush volume in liters. /// ADC to RPM conversion coefficient or RPM to ADC conversion. static const F32 CONVERSION_COEFF = SEC_PER_MIN / ( 2 * TOGGLE_PERIOD_RESOLUTION_SECONDS * ROTATIONAL_TO_TOGGLE_PERIOD_CONVERSION ); @@ -142,7 +142,7 @@ stopDrainPump(); hasClosedLoopBeenRequested = FALSE; - modeRecircTargetFlushVolL = 0.0; + targetFlushLineVolume_L = 0.0; // Initialize the drain pump PI controller initializePIController( PI_CONTROLLER_ID_DRAIN_PUMP, DRAIN_PUMP_MIN_DAC, @@ -485,15 +485,14 @@ /*********************************************************************//** * @brief - * The getRecirculationDrainVol function returns the mode recirculation - * target flush volume. - * @details Inputs: modeRecircTargetFlushVolL + * The getFlushLineVolume function returns the target flush line volume. + * @details Inputs: targetFlushLineVolume_L * @details Outputs: none - * @return modeRecircTargetFlushVolL which is a float + * @return the target flush line volume in Liter *************************************************************************/ -F32 getRecirculationDrainVol( void ) +F32 getFlushLineVolume( void ) { - return modeRecircTargetFlushVolL; + return targetFlushLineVolume_L; } /*********************************************************************//** @@ -661,7 +660,7 @@ } // The calibration data was valid, update the local copy - modeRecircTargetFlushVolL = calData.volume; + targetFlushLineVolume_L = calData.volume; return status; } Index: firmware/App/Controllers/DrainPump.h =================================================================== diff -u -rdf0a0b9ce1414b00b381e516714f9089d8e4ae21 -r24e8fcb5744724be72ea26bebd95ec594c2c26fe --- firmware/App/Controllers/DrainPump.h (.../DrainPump.h) (revision df0a0b9ce1414b00b381e516714f9089d8e4ae21) +++ firmware/App/Controllers/DrainPump.h (.../DrainPump.h) (revision 24e8fcb5744724be72ea26bebd95ec594c2c26fe) @@ -65,7 +65,7 @@ F32 getTargetDrainPumpOutletPressure( void ); BOOL isDrainPumpOn( void ); -F32 getRecirculationDrainVol( void ); +F32 getFlushLineVolume( void ); BOOL testSetDrainPumpDataPublishIntervalOverride( U32 value ); BOOL testResetDrainPumpDataPublishIntervalOverride( void ); Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -rc914eb443ee2679eb9fe3668119058ccc578437d -r24e8fcb5744724be72ea26bebd95ec594c2c26fe --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision c914eb443ee2679eb9fe3668119058ccc578437d) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 24e8fcb5744724be72ea26bebd95ec594c2c26fe) @@ -407,8 +407,8 @@ F32 const measuredROFlowRate_mL_min = getMeasuredROFlowRate() * ML_PER_LITER; F32 const acidConductivity = getConductivityValue( CONDUCTIVITYSENSORS_CD1_SENSOR ); F32 const dialysateConductivity = getConductivityValue( CONDUCTIVITYSENSORS_CD2_SENSOR ); - BOOL const isAcidConductivityOutOfRange = ( acidConductivity <= MIN_ACID_CONCENTRATE_CONDUCTIVITY ) && ( MAX_ACID_CONCENTRATE_CONDUCTIVITY >= acidConductivity ); - BOOL const isDialysateConductivityOutOfRange = ( dialysateConductivity <= MIN_DIALYSATE_CONDUCTIVITY ) && ( MAX_DIALYSATE_CONDUCTIVITY >= dialysateConductivity ); + BOOL const isAcidConductivityOutOfRange = ( acidConductivity <= MIN_ACID_CONCENTRATE_CONDUCTIVITY ) || ( MAX_ACID_CONCENTRATE_CONDUCTIVITY >= acidConductivity ); + BOOL const isDialysateConductivityOutOfRange = ( dialysateConductivity <= MIN_DIALYSATE_CONDUCTIVITY ) || ( MAX_DIALYSATE_CONDUCTIVITY >= dialysateConductivity ); DG_FILL_MODE_STATE_T result = DG_FILL_MODE_STATE_DELIVER_DIALYSATE; DG_RESERVOIR_ID_T inactiveReservoir = getInactiveReservoir(); @@ -480,8 +480,7 @@ } #ifndef DISABLE_DIALYSATE_CHECK - if ( ( avgAcidConductivity < MIN_ACID_CONCENTRATE_CONDUCTIVITY ) || ( avgAcidConductivity > MAX_ACID_CONCENTRATE_CONDUCTIVITY ) || - ( avgDialysateConductivity < MIN_DIALYSATE_CONDUCTIVITY ) || ( avgDialysateConductivity > MAX_DIALYSATE_CONDUCTIVITY ) ) + if ( ( avgDialysateConductivity < MIN_DIALYSATE_CONDUCTIVITY ) || ( avgDialysateConductivity > MAX_DIALYSATE_CONDUCTIVITY ) ) { SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DIALYSATE_CONDUCTIVITY_FAULT, avgAcidConductivity, avgDialysateConductivity ); } Index: firmware/App/Modes/ModeGenIdle.c =================================================================== diff -u -rc914eb443ee2679eb9fe3668119058ccc578437d -r24e8fcb5744724be72ea26bebd95ec594c2c26fe --- firmware/App/Modes/ModeGenIdle.c (.../ModeGenIdle.c) (revision c914eb443ee2679eb9fe3668119058ccc578437d) +++ firmware/App/Modes/ModeGenIdle.c (.../ModeGenIdle.c) (revision 24e8fcb5744724be72ea26bebd95ec594c2c26fe) @@ -156,7 +156,7 @@ * @brief * The getCurrentGenIdleState function returns the current state of the * generation idle mode. - * @details Inputs: recircState + * @details Inputs: genIdleState * @details Outputs: none * @return the current state of generation idle mode *************************************************************************/ @@ -198,8 +198,8 @@ // Integrate volume of water moved through line flushLinesVolumeL += waterVolume; - // When enough water volume has flowed to flush the lines, transition to re-circ state - if ( flushLinesVolumeL >= getRecirculationDrainVol() ) + // When enough water volume has flowed to flush the lines, transition to flush water state + if ( flushLinesVolumeL >= getFlushLineVolume() ) { setValveState( VDR, VALVE_STATE_RECIRC_C_TO_NC ); setROPumpTargetFlowRate( TARGET_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI );