Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -rf7f6305f054732569330f6001568777857e20442 -re197cedaa4eb13953c70bf490c81217fff5e21fc --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision f7f6305f054732569330f6001568777857e20442) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision e197cedaa4eb13953c70bf490c81217fff5e21fc) @@ -74,10 +74,9 @@ static F32 freshDialPressure; ///< Fresh side dialysate pressure static F32 spentDialPressure; ///< Spent side dialysate pressure -//TODO: remove later +//TODO: remove later once level sensor working static U32 bicarbChamberPeriodicFillCounter; ///< Counter for checking the timeout for drybicart chamber fill request. - // ********** private function prototypes ********** static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1FillStart( void ); @@ -132,11 +131,9 @@ freshDialPressure = 0.0F; spentDialPressure = 0.0F; - if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DRY_BICARB ) == TRUE ) - { - bicarbChamberPeriodicFillCounter = 0; - } -} + //TODO:remove once level sensor working + bicarbChamberPeriodicFillCounter = 0; + } /*********************************************************************//** * @brief @@ -531,11 +528,11 @@ BOOL isFreshDialysatePressureInRange = ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ); BOOL isSpentDialysatePressureInRange = ( spentDialPressure >= SPENT_DIAL_PRESSURE_MIN_PSIG ) && ( spentDialPressure <= SPENT_DIAL_PRESSURE_MAX_PSIG ); - BOOL isBalChamberSwitchOnly = ( TRUE == getBalChamberSwitchingOnlyStatus() ); + BOOL isBCSwitchOnlyStatus = ( TRUE == getBalChamberSwitchingOnlyStatus() ); BOOL isDisableBCPressureAlarms = ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) ); // Check fresh and spent dialysate pressure in range or BC switch only flag set - if ( ( isFreshDialysatePressureInRange && isSpentDialysatePressureInRange ) || isBalChamberSwitchOnly || isDisableBCPressureAlarms ) + if ( ( TRUE == isFreshDialysatePressureInRange && TRUE == isSpentDialysatePressureInRange ) || ( TRUE == isBCSwitchOnlyStatus ) || ( TRUE == isDisableBCPressureAlarms ) ) { //Valve control for state 1 fill valveControlForBCState1FillStart(); @@ -637,7 +634,7 @@ // Check fresh and spent dialysate pressure back in range to indicate fill complete. if ( getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) != TRUE ) { - if ( isFreshDialysatePressureInRange && isSpentDialysatePressureInRange ) + if ( TRUE == isFreshDialysatePressureInRange && TRUE == isSpentDialysatePressureInRange ) { if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) { @@ -749,11 +746,11 @@ BOOL isFreshDialysatePressureInRange = ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ); BOOL isSpentDialysatePressureInRange = ( spentDialPressure >= SPENT_DIAL_PRESSURE_MIN_PSIG ) && ( spentDialPressure <= SPENT_DIAL_PRESSURE_MAX_PSIG ); - BOOL isBalChamberSwitchOnly = ( TRUE == getBalChamberSwitchingOnlyStatus() ); + BOOL isBCSwitchOnlyStatus = ( TRUE == getBalChamberSwitchingOnlyStatus() ); BOOL isDisableBCPressureAlarms = ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) ); // Check fresh and spent dialysate pressure in range - if ( ( isFreshDialysatePressureInRange && isSpentDialysatePressureInRange ) || isBalChamberSwitchOnly || isDisableBCPressureAlarms ) + if ( ( TRUE == isFreshDialysatePressureInRange && TRUE == isSpentDialysatePressureInRange ) || ( TRUE == isBCSwitchOnlyStatus ) || ( TRUE == isDisableBCPressureAlarms ) ) { // Valve control for state 2 fill valveControlForBCState2FillStart(); @@ -804,7 +801,7 @@ // Check fresh and spent dialysate pressure back in range to indicate fill complete. if ( getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) != TRUE ) { - if ( isFreshDialysatePressureInRange && isSpentDialysatePressureInRange ) + if ( TRUE == isFreshDialysatePressureInRange && TRUE == isSpentDialysatePressureInRange ) { if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) {