Index: firmware/App/Controllers/DryBiCart.c =================================================================== diff -u -r719bfc8812804a82dbfcb02013de03ecb312ba05 -r7339a52a44b3095162224ac775ba2a627469481a --- firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision 719bfc8812804a82dbfcb02013de03ecb312ba05) +++ firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision 7339a52a44b3095162224ac775ba2a627469481a) @@ -44,23 +44,30 @@ // ********** private definitions ********** #define DRY_BICART_DATA_PUBLISH_INTERVAL ( 250 / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the drybicart data published. -#define WCDI2_PRESSURE_OFFSET_PSI 7.0F ///< The difference between the actual pressure measured at bicart assembly and the measured D66 pressure based on the placement of the sensor for WCID1 -#define WCID1_PRESSURE_OFFSET_PSI 1.0F ///< The difference between the actual pressure measured at bicart assembly and the measured D66 pressure based on the placement of the sensor for WCID2 -#define DRY_BICART_PERSISTENCE_DURATION_MS 500 ///< Fill persistence duration to overcome the pressure overshoot/ drop for beta 1.9 and above. -//#define DRY_BICART_FILL_PERSISTENCE_DURATION_MS ( 1 * MS_PER_SECOND ) ///< Fill persistence duration to overcome the pressure overshoot/ drop for beta 1.9 and above. +#define WCDI2_PRESSURE_OFFSET_PSI 7.0F ///< The difference between the actual pressure measured at bicart assembly and the measured D66 pressure based on the placement of the sensor for WCID1 +#define WCID1_PRESSURE_OFFSET_PSI 1.0F ///< The difference between the actual pressure measured at bicart assembly and the measured D66 pressure based on the placement of the sensor for WCID2 +#define DRY_BICART_PERSISTENCE_DURATION_MS 200 ///< Fill persistence duration to overcome the pressure overshoot/ drop for beta 1.9 and above. +#define DRY_BICART_SUPPLY_PERSISTENCE_DURATION_MS 500 ///< Supply Fill persistence duration to overcome the pressure overshoot/ drop for beta 1.9 and above. // Dry Bicart Fill - #define DRY_BICART_FILL_COMPLETE_TIME_MS ( 1 * MS_PER_SECOND ) ///< Wait time to reset the request flag after fill complete -#define DRY_BICART_WCID2_FILL_COMPLETE_PRESSURE_PSI ( 3.0F + WCDI2_PRESSURE_OFFSET_PSI ) ///< Maximum pressure reached to indicate the dry bicart fill being completed for WCID2 +#define DRY_BICART_WCID2_FILL_COMPLETE_PRESSURE_PSI ( 10.0F + WCDI2_PRESSURE_OFFSET_PSI ) ///< Maximum pressure reached to indicate the dry bicart fill being completed for WCID2 #define DRY_BICART_WCID1_FILL_COMPLETE_PRESSURE_PSI ( 10.0F + WCID1_PRESSURE_OFFSET_PSI ) ///< Maximum pressure reached to indicate the dry bicart fill being completed for WCID1. +#define DRY_BICART_WCID2_SUPPLY_COMPLETE_PRESSURE_PSI ( 10.0F ) ///< Maximum pressure reached to indicate the dry bicart supply fill being completed for WCID2 +#define DRY_BICART_WCID1_SUPPLY_COMPLETE_PRESSURE_PSI ( 6.0F ) ///< Maximum pressure reached to indicate the dry bicart supply fill being completed for WCID1. + #define GET_FILL_COMPLETE_PRESSURE_PSI (getTestConfigStatus( TEST_CONFIG_DD_ENABLE_WCID_1 ) != TRUE ? \ DRY_BICART_WCID2_FILL_COMPLETE_PRESSURE_PSI : DRY_BICART_WCID1_FILL_COMPLETE_PRESSURE_PSI ) ///< Get fill complete pressure based on the WCID configuration + +#define GET_SUPPLY_COMPLETE_PRESSURE_PSI (getTestConfigStatus( TEST_CONFIG_DD_ENABLE_WCID_1 ) != TRUE ? \ + DRY_BICART_WCID2_SUPPLY_COMPLETE_PRESSURE_PSI : DRY_BICART_WCID1_SUPPLY_COMPLETE_PRESSURE_PSI ) ///< Get fill complete pressure based on the WCID configuration + #define DRY_BICART_FILL_INITIATE_PRESSURE_PSI 1.5F ///< Minimum pressure required to initiate the dry bicart fill process. #define DRY_BICART_FILL_COMPLETE_SUPPLY_PRESSURE_PSI 10.0F ///< Maximum pressure allowed at bicart fill during supply process/state #define DRY_BICART_FILL_INITIATE_SUPPLY_PRESSURE_PSI 4.0F ///< Minimum pressure required to initiate the dry bicart fill during supply process/state #define DRY_BICART_MAX_FILL_CYCLE_CNT 10 ///< Max fill cycle allowed (by override) for dry bicart fill/mix with water. #define DRY_BICART_MINIMUM_FILL_CYCLE_CNT 3 ///< Minimum fill cycle count for filling dry bicart + // Dry Bicart Fill Vent #define DRY_BICART_FILL_VENT_TIME_MS ( 1 * MS_PER_SECOND ) ///< Wait time to vent dry bicart gas before actuating Bicarb chamber(F) venting. #define DRY_BICART_FILL_VENT_MAX_TIME_MS ( 3 * MS_PER_SECOND ) ///< Max time to vent both dry bicart and Chamber F. @@ -88,7 +95,7 @@ #define DRY_BICART_DRAIN_D85_OPEN_TIME_MS ( 10 * MS_PER_SECOND ) #define DRY_BICART_DRAIN_TIMEOUT_INCREMENT_MS ( 2 * MS_PER_SECOND ) ///< Amount to increase each time #define DRY_BICART_DRAIN_MAX_ALLOWED_CLOSE_TIME_MS ( 20 * MS_PER_SECOND ) -#define DRY_BICART_DRAIN_D18_PRESSURE_PSI 8 +#define DRY_BICART_DRAIN_D18_PRESSURE_PSI 5 /// Payload record structure for dry bicart fill request typedef struct @@ -239,8 +246,8 @@ dryBiCartType.ovInitData = 0; dryBiCartType.override = OVERRIDE_RESET; - dryBiCartUpperCartPressure.data = DRY_BICART_FILL_COMPLETE_SUPPLY_PRESSURE_PSI; - dryBiCartUpperCartPressure.ovData = DRY_BICART_FILL_COMPLETE_SUPPLY_PRESSURE_PSI; + dryBiCartUpperCartPressure.data = GET_SUPPLY_COMPLETE_PRESSURE_PSI; + dryBiCartUpperCartPressure.ovData = GET_SUPPLY_COMPLETE_PRESSURE_PSI; dryBiCartUpperCartPressure.ovInitData = 0.0F; dryBiCartUpperCartPressure.override = OVERRIDE_RESET; @@ -1169,7 +1176,7 @@ { BICARB_CHAMBER_FILL_EXEC_STATE_T state = BICARB_CARTRIDGE_FILL_WATER_END_STATE; F32 d66Pressure = getFilteredPressure( D66_PRES ); - F32 fillCompletePressure = GET_FILL_COMPLETE_PRESSURE_PSI; + F32 fillCompletePressure = GET_SUPPLY_COMPLETE_PRESSURE_PSI; LVL_STATE_T bicarbChamberLevel = getBicarbChamberLevelStatus(); if ( FALSE == isDryBicartChamberFillWindowOpen() ) @@ -1191,7 +1198,7 @@ } // Defined persistence on D66 pressure since pressure overshoot just after D65 opening only for chamber fill - if ( TRUE == didTimeout( dryBiCartPersistenceStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) + if ( TRUE == didTimeout( dryBiCartPersistenceStartTime, DRY_BICART_SUPPLY_PERSISTENCE_DURATION_MS ) ) { // Close water inlet valve as D66 pressure reaches 11 PSI after persistence setValveState( D65_VALV, VALVE_STATE_CLOSED ); @@ -1306,7 +1313,7 @@ } // defined persistence on D66 pressure - if ( ( TRUE == didTimeout( drybicartPersistenceOnLowercartPressureStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) && + if ( ( TRUE == didTimeout( drybicartPersistenceOnLowercartPressureStartTime, DRY_BICART_SUPPLY_PERSISTENCE_DURATION_MS ) ) && ( TRUE == isDryBicartChamberFillWindowOpen() ) ) { setValveState( D65_VALV, VALVE_STATE_OPEN ); @@ -1324,7 +1331,7 @@ } // defined persistence on D66 pressure since pressure overshoot just after D65 opening - if ( TRUE == didTimeout( dryBiCartPersistenceStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) + if ( TRUE == didTimeout( dryBiCartPersistenceStartTime, DRY_BICART_SUPPLY_PERSISTENCE_DURATION_MS ) ) { setValveState( D65_VALV, VALVE_STATE_CLOSED ); setValveState( D80_VALV, VALVE_STATE_OPEN );