Index: firmware/App/Controllers/BalancingChamber.h =================================================================== diff -u -r6d0bd19fb192dcd272fa773e8833862cc8a8f750 -rc4e1d97e73dd863ddffe895833d209e172b5ae4a --- firmware/App/Controllers/BalancingChamber.h (.../BalancingChamber.h) (revision 6d0bd19fb192dcd272fa773e8833862cc8a8f750) +++ firmware/App/Controllers/BalancingChamber.h (.../BalancingChamber.h) (revision c4e1d97e73dd863ddffe895833d209e172b5ae4a) @@ -38,15 +38,15 @@ #define BC_FRESH_FILL_PRESSURE_PSIG 15.0F ///< Fresh side pressure (drop) during balancing chamber switching, indicates fill has been started / in progress. #define BC_SPENT_FILL_PRESSURE_PSIG 29.0F ///< Spent side pressure (drop) during balancing chamber switching, indicates fill has been started / in progress. #define BAL_CHAMBER_FILL_VOLUME_ML 30.0F ///< Balancing chamber fill/drain volume per batch operation. +#define BAL_CHAMBER_TIME_BASED_D48_SPEED_RPM 250 ///< Minimum D48 speed and fixed speed for time-based balancing chamber switching. /// balancing chamber data structure typedef struct { U32 balChamberExecState; ///< Balancing chamber execution state U32 balChamberSWState; ///< Balancing chamber switching state (state 1 or state 2) F32 balChamberSWFreq; ///< Balancing chamber switching frequency - U32 balChamberSwPeriod; ///< Balancing chamber switching period - BOOL isBalChamberFillInProgress; ///< Whether balancing chamber fill in progress or not + BOOL isSpentFillComplete; ///< Whether balancing chamber spent fill completed or not U32 currentBalChamberSwitchingCounter; ///< Current balancing chamber switching counter BOOL isPressureStabilizedDuringFill; ///< Whether pressure stabilized during fill or not BOOL balChamberSWOnlyState; ///< Balancing chamber switching only status ( On/Off) @@ -63,6 +63,7 @@ void updateBalChamberSwitchingPeriod( void ); // Update the balancing chamber switching period BAL_CHAMBER_EXEC_STATE_T getCurrentBalancingChamberExecState( void ); // Get the current state of the balancing chamber execution F32 getBalChamberSwitchingFreq( void ); // Get the balancing chamber switching frequency +F32 getBalChamberActiveDialysateFlowrate( void ); // Get the active Qd used by balancing chamber timing U32 getDialDeliveryProgressStatus( void ); // Get the dialysate delivery in progress status BOOL getBalancingChamberFillinProgressStatus( void ); // Get the balancing chamber fill in progress status void valveControlForBCClosedState( void ); // Closes all balancing chamber valves