Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -ra6737c3bcc8286c153b778c2c395f465e76aaafb -re970cb1e6259770040219849902bc5747f39e728 --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision a6737c3bcc8286c153b778c2c395f465e76aaafb) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision e970cb1e6259770040219849902bc5747f39e728) @@ -781,7 +781,8 @@ // Check both spent and fresh side fill is complete isBothFillsComplete = ( ( TRUE == isSpentFillComplete ) && ( TRUE == isPressureStabilizedDuringFill ) ) ? TRUE : FALSE; - isFirstCycleNotDone = ( FALSE == isFirstCycleBCSwitchingCompleted ) && ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ); + isFirstCycleNotDone = ( ( FALSE == isFirstCycleBCSwitchingCompleted ) && + ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) ) ? TRUE : FALSE; if ( FALSE == getBalChamberSwitchingOnlyStatus() ) { @@ -1051,7 +1052,8 @@ // Check switching cycle time or pressure check for valve closure isBothFillsComplete = ( ( TRUE == isSpentFillComplete ) && ( TRUE == isPressureStabilizedDuringFill ) ) ? TRUE : FALSE; - isFirstCycleNotDone = ( ( FALSE == isFirstCycleBCSwitchingCompleted ) && ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) ); + isFirstCycleNotDone = ( ( FALSE == isFirstCycleBCSwitchingCompleted ) && + ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) ) ? TRUE : FALSE; if ( FALSE == getBalChamberSwitchingOnlyStatus() ) { @@ -1391,7 +1393,7 @@ } } - //Update spent fill is complete + //Update spent fill is complete if ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) { isSpentFillComplete = TRUE;