Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -recd204503f9f4837800080a58c07dac8a2e8d602 -rae3a2d3b6952e59cdf469d48e9f4c26574564eff --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision ecd204503f9f4837800080a58c07dac8a2e8d602) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision ae3a2d3b6952e59cdf469d48e9f4c26574564eff) @@ -8,7 +8,7 @@ * @file BalancingChamber.c * * @author (last) Sameer Kalliadan Poyil -* @date (last) 16-Apr-2026 +* @date (last) 28-Apr-2026 * * @author (original) Vinayakam Mani * @date (original) 28-Jan-2025 @@ -22,6 +22,7 @@ #include "DryBiCart.h" #include "FpgaDD.h" #include "Heaters.h" +#include "Level.h" #include "ModeGenDialysate.h" #include "ModeStandby.h" #include "Messaging.h" @@ -254,6 +255,8 @@ *************************************************************************/ U32 execBalancingChamberControl( void ) { + LVL_STATE_T bicarbChamberLevel = getBicarbChamberLevelStatus(); + updateBalChamberSwitchingPeriod(); // Increment counter indicating fill is in progress. @@ -262,6 +265,17 @@ if ( ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DRY_BICARB ) == TRUE ) && ( balChamberExecState > BAL_CHAMBER_STATE_IDLE ) ) { +#ifdef CONDUCTIVE_LEVEL_SENSOR_ENABLED + if ( LVL_STATE_LOW == bicarbChamberLevel ) + { + if ( FALSE == setBicarbChamberFillRequested() ) + { + // TODO + //drybicart state machines are combined and so this is not an issue in future + //set alarm ? + } + } +#else // time based chamber F fill // Increment counter for dry bicarb chamber fill bicarbChamberPeriodicFillCounter += 1; // Fill bicarb chamber once every 60secs. @@ -275,6 +289,7 @@ } bicarbChamberPeriodicFillCounter = 0; } +#endif } switch ( balChamberExecState )