Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -r27dab35610123b728c64b9db11967c95a45a2b01 -r1c478c1aff953528127767db1f4f747a7f7089c8 --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision 27dab35610123b728c64b9db11967c95a45a2b01) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision 1c478c1aff953528127767db1f4f747a7f7089c8) @@ -53,14 +53,14 @@ #define SPENT_FILL_SLOPE_SPENT_PRESSURE_HIGH_PSIG 2.0F ///< Above this absolute spent pressure, only one rise hit is required. #define SPENT_FILL_SLOPE_SPENT_PRESSURE_LOW_PSIG 0.5F ///< Below this absolute spent pressure, use Qd-based required rise hit count. #define SPENT_FILL_SLOPE_MAX_RISE_HITS 2 ///< Rise hits required when Qd <= 150 in the low spent-pressure band. -#define SPENT_FILL_DETECT_COUNT_TOL_PCT 0.20F ///< Allowed detection timing tolerance as a fraction of expected BC switching count. +#define SPENT_FILL_DETECT_COUNT_TOL_PCT 1.0F ///< Allowed detection timing tolerance as a fraction of expected BC switching count. #define QD_THRESHOLD_HIGH_MLPM 400.0F ///< Qd threshold (mL/min) below which mid pressure limit applies. #define SPENT_DIFF_COUNT_ZERO 0 ///< Zero count difference for spent side fill comparing target count #define D48_SPEED_ADJUST_FACTOR 0.5F ///< D48 speed adjustment factor ( 50% of speed adjustment = 0.5) #define D48_SPEED_RANGE_LIMIT 0.25F ///< D48 speed adjustment range check limit ( D48 speed can vary +/-25% of initial calculated speed) #define BICARB_CHAMBER_PERIODIC_FILL_TIME ( 1 * SEC_PER_MIN * \ ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ) ///< Periodic bicarb chamber fill request 60 sec x 20 = 1200 -#define BAL_CHAMBER_FILL_TIMEOUT_FACTOR 2.0F ///< Balancing Chamber fill timeout factor (2000% of observed fill count) +#define BAL_CHAMBER_FILL_TIMEOUT_FACTOR 2.5F ///< Balancing Chamber fill timeout factor (250% of observed fill count) /// Payload record structure for balancing chamber switch only request typedef struct @@ -221,7 +221,7 @@ //Update last td dialysate flow rate lastTdDialysateFlowrate = tdDialysateFlowrate; - // Update fill timeout count based on the switching period (e.g. 200% of period) + // Update fill timeout count based on the switching period (e.g. 250% of period) balChamberFillTimeoutCount = (U32)( (F32)balChamberSwitchingPeriod * BAL_CHAMBER_FILL_TIMEOUT_FACTOR ); //Reset the BC switching flag for new Qd. @@ -255,10 +255,8 @@ *************************************************************************/ U32 execBalancingChamberControl( void ) { - LVL_STATE_T bicarbChamberLevel = getBicarbChamberLevelStatus(); + LVL_STATE_T bicarbChamberLevel = getBicarbChamberLevelStatus(); - updateBalChamberSwitchingPeriod(); - // Increment counter indicating fill is in progress. currentBalChamberSwitchingCounter += 1; currentBalChamberFillCounter += 1;