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 ) { Index: firmware/App/Modes/ModeGenDialysate.c =================================================================== diff -u -rf7f6305f054732569330f6001568777857e20442 -re197cedaa4eb13953c70bf490c81217fff5e21fc --- firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision f7f6305f054732569330f6001568777857e20442) +++ firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision e197cedaa4eb13953c70bf490c81217fff5e21fc) @@ -178,13 +178,31 @@ void execGenDialysateMonitor( void ) { // Read temperature and conductivity - //F32 hydChamberTemperature = getTemperatureValue( D4_TEMP ); - //F32 biCarbConductivity = getConductivityValue( D17_COND ); - //F32 acidBicarbMixConductivity = getConductivityValue( D29_COND ); + F32 hydChamberTemperature = getTemperatureValue( D4_TEMP ); + F32 biCarbConductivity = getConductivityValue( D17_COND ); + F32 acidBicarbMixConductivity = getConductivityValue( D29_COND ); + F32 bicarbCond = getConductivityValue( D74_COND ); + F32 bicarbAcidCond = getConductivityValue( D27_COND ); + F32 SpentsideCond = getConductivityValue( D43_COND ); + F32 d16temp = getTeensyConductivityTemperatureValue( D17_COND ); + F32 d17Cond = getFilteredConductivity( D17_COND ); + F32 d27Cond = getFilteredConductivity( D27_COND ); + F32 d29Cond = getFilteredConductivity( D29_COND ); + F32 d43Cond = getFilteredConductivity( D43_COND ); + F32 d74Cond = getFilteredConductivity( D74_COND ); + // Monitor critical parameter while balancing chamber fill is in progress if ( TRUE == getBalancingChamberFillinProgressStatus() ) { + // The dialysate delivery subsystem shall monitor the following conductivity measurements: + + + //Fluid Path ID Description Conductivity Range + //D17 Bicarb Conductivity 2 - 4 mS/cm + //D27 Dialysate Conductivity 13 - 15 mS/cm + //D29 Dialysate Redundant Conductivity 13 - 15 mS/cm + // Temperature range check // Coductivity range check