Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -refba6ee17f35ecad287d33a15f795e446a5574a8 -rd05ec20825ed98eb4c9bfc3ff45f81894090a1ec --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision efba6ee17f35ecad287d33a15f795e446a5574a8) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision d05ec20825ed98eb4c9bfc3ff45f81894090a1ec) @@ -63,8 +63,8 @@ #define CONC_PUMPS_PRIME_AT_MAX_SPEED_TIME_OUT_MS ( 7 * MS_PER_SECOND ) ///< Concentrate pumps prime at maximum speed timeout in milliseconds. #define CONC_PUMPS_PRIME_CHECK_COND_SNSRS_TIME_OUT_MS ( 10 * MS_PER_SECOND ) ///< Concentrate pumps prime check conductivity sensors timeout in milliseconds. -#define CONC_PUMPS_PRIME_MAX_ALLOWED_PRIME_TIME_OUT_MS ( 25 * MS_PER_SECOND ) ///< Concentrate pumps prime maximum allowed timeout in prime in milliseconds. - +#define CONC_PUMPS_PRIME_MAX_ALLOWED_PRIME_TIME_OUT_MS ( 50 * MS_PER_SECOND ) ///< Concentrate pumps prime maximum allowed timeout in prime in milliseconds. +#define NINTY_FIVE_PERCENT_FACTOR 0.95F ///< Ninety five percent of expected conductivity #define FLOW_INTEGRATED_VOLUME_CHECK_TOLERANCE 0.1F ///< Flow integrated volume has 10% tolerance compare to load cell reading. #define FIVE_PERCENT_FACTOR 0.05F ///< 5.0 / 100.0 used to calculate conductivity within range of -/+ 5%. @@ -791,15 +791,15 @@ if ( TRUE == didTimeout( concPumpPrimeStartTimeMS, CONC_PUMPS_PRIME_CHECK_COND_SNSRS_TIME_OUT_MS ) ) { /* Once the time for priming the concentrate lines has elapsed, check the mixing conductivity of the sensors - * If the acid and bicarb conductivity values are at about 50% of the target concentrate during fill, transition to the next state - * If the acid and bicarb conductivity values are not at 50% but the maximum prime time has elapsed, transition to the next state + * If the acid and bicarb conductivity values are at about 95% of the target concentrate during fill, transition to the next state + * If the acid and bicarb conductivity values are not at 95% but the maximum prime time has elapsed, transition to the next state */ F32 acidConduSPerCM = getConductivityValue( CONDUCTIVITYSENSORS_CD1_SENSOR ); F32 bicarbConduSPerCM = getConductivityValue( CONDUCTIVITYSENSORS_CD2_SENSOR ); F32 acidFillConduSPerCM = chemicalsCond.fillCondValues[ chemicalsTypes.acidType ][ FILL_COND_NORMAL_OP ].acidConduSPerCM; F32 bicarbFillConduSPerCM = chemicalsCond.fillCondValues[ chemicalsTypes.acidType ][ FILL_COND_NORMAL_OP ].bicarbConduSPerCM; - if ( ( acidConduSPerCM >= ( acidFillConduSPerCM * HALF ) ) && ( bicarbConduSPerCM >= ( bicarbFillConduSPerCM * HALF ) ) ) + if ( ( acidConduSPerCM >= ( acidFillConduSPerCM * NINTY_FIVE_PERCENT_FACTOR ) ) && ( bicarbConduSPerCM >= ( bicarbFillConduSPerCM * NINTY_FIVE_PERCENT_FACTOR ) ) ) { result = DG_FILL_MODE_STATE_DELIVER_DIALYSATE; setModeFillStateTransition( result );