Index: firmware/App/Controllers/BalancingChamber.h =================================================================== diff -u -ra414ca5b1458b0800e32672eeb7545a9dd575002 -r1d4d4b56b96a50cf32c9db93c322cc97a25cab7d --- firmware/App/Controllers/BalancingChamber.h (.../BalancingChamber.h) (revision a414ca5b1458b0800e32672eeb7545a9dd575002) +++ firmware/App/Controllers/BalancingChamber.h (.../BalancingChamber.h) (revision 1d4d4b56b96a50cf32c9db93c322cc97a25cab7d) @@ -31,29 +31,31 @@ // ********** public definitions ********** -#define FRESH_DIAL_PRESSURE_MIN_PSIG 21.0F ///< Minimum fresh dialysate pressure (PDf) limit for balancing chamber fill operations. -#define FRESH_DIAL_PRESSURE_MAX_PSIG 27.0F ///< Maximum fresh dialysate pressure (PDf) limit for balancing chamber fill operations. -#define SPENT_DIAL_PRESSURE_MIN_PSIG 27.0F ///< Minimum spent dialysate pressure (PDs) limit for balancing chamber fill operations. -#define SPENT_DIAL_PRESSURE_MAX_PSIG 31.0F ///< Maximum spent dialysate pressure (PDs) limit for balancing chamber fill operations. +#define FRESH_DIAL_PRESSURE_MIN_PSIG 21.0F ///< Minimum fresh dialysate pressure (D18) limit for balancing chamber fill operations. +#define FRESH_DIAL_PRESSURE_MAX_PSIG 27.0F ///< Maximum fresh dialysate pressure (D18) limit for balancing chamber fill operations. +#define SPENT_DIAL_PRESSURE_MIN_PSIG 27.0F ///< Minimum spent dialysate pressure (D51) limit for balancing chamber fill operations. +#define SPENT_DIAL_PRESSURE_MAX_PSIG 31.0F ///< Maximum spent dialysate pressure (D51) limit for balancing chamber fill operations. +#define BC_FILL_PRESSURE_MIN_PSIG 13.0F ///< Minimum pressure (drop) during balancing chamber switching, indicates fill has been started / in progress. +#define BC_FILL_PRESSURE_MAX_PSIG 9.0F ///< Maximum pressure (drop) during balancing chamber switching, indicates fill has been started / in progress. /// 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 - U32 currentBalChamberSwitchingCounter; ///< Current balancing chamber switching counter - BOOL isPressureStalbilizedDuringFill; ///< Whether pressure stabilized during fill or not - BOOL balChamberSWOnlyState; ///< Balancing chamber switching only status ( On/Off) + 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 + U32 currentBalChamberSwitchingCounter; ///< Current balancing chamber switching counter + BOOL isPressureStalbilizedDuringFill; ///< Whether pressure stabilized during fill or not + BOOL balChamberSWOnlyState; ///< Balancing chamber switching only status ( On/Off) } BAL_CHAMBER_DATA_T; // ********** public function prototypes ********** -void initBalanceChamber( void ); // Initialize balancing chamber unit -void transitionToBalChamberFill( void ); // Prepares for transition to balancing chamber execution -U32 execBalancingChamberControl( void ); // Execute the balancing chamber state machine +void initBalanceChamber( void ); // Initialize balancing chamber unit +void transitionToBalChamberFill( void ); // Prepares for transition to balancing chamber execution +U32 execBalancingChamberControl( void ); // Execute the balancing chamber state machine 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 @@ -69,6 +71,8 @@ BOOL testDDBalChamberDataPublishIntervalOverride( MESSAGE_T *message ); // To override the balancing chamber data publish interval BOOL testBalChamberSwFreqOverride( MESSAGE_T *message ); // To override the balancing chamber switching frequency BOOL testBCSwitchOnlyStartStopOverride( MESSAGE_T *message ); // To override the balancning chamber switching only start/stop control +BOOL testAcidDoseVolumeOverride( MESSAGE_T *message ); // To override acid dosing volume +BOOL testBicarbDoseVolumeOverride( MESSAGE_T *message ); // To override bicarb dosing volume /**@}*/