Index: firmware/App/Controllers/DryBiCart.c =================================================================== diff -u -r483ebbb75171ec93ab24d1f69f83a6248376266f -r095866efd8f10bdead490578e7584051d79292f0 --- firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision 483ebbb75171ec93ab24d1f69f83a6248376266f) +++ firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision 095866efd8f10bdead490578e7584051d79292f0) @@ -46,18 +46,18 @@ #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 DRY_BICART_PERSISTENCE_DURATION_MS 200 ///< 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_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_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 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 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_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 3.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 @@ -67,15 +67,13 @@ // Bicarb chamber fill/Supply #ifdef CONDUCTIVE_LEVEL_SENSOR_ENABLED -#define DRY_BICART_SUPPLY_VALVE_D80_OPEN_TIME_MS ( 60 * MS_PER_SECOND ) ///< Max time allowed for supply (opening D80 valve) during bicarb chamber (F) fill using level sensor +#define DRY_BICART_SUPPLY_VALVE_D80_OPEN_TIME_MS ( 10 * MS_PER_SECOND ) ///< Max time allowed for supply (opening D80 valve) during bicarb chamber (F) fill using level sensor #else #define DRY_BICART_SUPPLY_VALVE_D80_OPEN_TIME_MS ( 3 * MS_PER_SECOND ) ///< Max time allowed for supply (opening D80 valve) during bicarb chamber (F) fill time based fill #endif #define DRY_BICART_SUPPLY_VENT_TIME_MS ( 1 * MS_PER_SECOND ) ///< Wait time to vent dry bicart gas before actuating Bicarb chamber(F) venting. #define DRY_BICART_SUPPLY_VENT_MAX_TIME_MS ( 1 * MS_PER_SECOND ) ///< Max time to vent both dry bicart and Chamber F. #define DRY_BICART_SUPPLY_COMPLETE_TIME_MS ( 2 * MS_PER_SECOND ) ///< Wait time to close the D80 valve after D65 is closed -#define DRY_BICART_SUPPLY_DECAY_COMPLETE_PRESSURE_PSI 4.0F ///< Minimum decay pressure needed to end the supply process. -#define DRY_BICART_SUPPLY_VENT_CYCLE_TIME_MS ( 15 * SEC_PER_MIN * MS_PER_SECOND ) ///< Vent cycle time to initiate D85 opening. // Dry Bicart Drain #define LARGE_DRY_BICART_MAX_DRAIN_TIME_MS ( 8 * SEC_PER_MIN * MS_PER_SECOND ) ///< Max drain time for large dry bicart in ms. @@ -86,10 +84,6 @@ #define DRY_BICART_DRAIN_COND_ZERO_THRESH 0.05F ///< Zero conductivity threshold #define DRY_BICART_DRAIN_COND_STABLE_SAMPLES 10U ///< De-bounce samples (10*50ms=500ms) -#define STD_MIX_BC_VOLUME 30.0F ///< Standard balancing chamber volume -#define TARGET_ADJ_BICARB_SETTING 137.0F ///< User defined Bicarb setting -#define TARGET_ADJ_NA_SETTINGS 32.0F ///< User defined Na setting - /// Payload record structure for dry bicart fill request typedef struct { @@ -147,8 +141,6 @@ static U32 dryBiCartPersistenceStartTime; ///< Dry bicart Persistence time. static U32 drybicartPersistenceOnLowercartPressureStartTime; ///< Dry bicart Persistence on lower cart pressure start time. static BOOL dryBiCartPressureDecayStartTimeFlag; ///< Dry bicart d66 pressure decay start timer. -static BOOL dryBiCartVentCycleWaitTimeStartedFlag; ///< Flag indicating venting cycle timer started for opening D85. -static U32 dryBiCartVentCycleStartTime; ///< Dry bicart Vent cycle start time. static DRY_BICART_OPERATION_T dryBicartStartRequest; ///< Dry bicart operation, fill or supply or drain request static DRY_BICART_OPERATION_T prevDryBicartState; ///< Dry BiCart State Change Tracker @@ -172,8 +164,6 @@ static BICARB_CHAMBER_FILL_EXEC_STATE_T handleBicarbChamberPressureCheckState( void ); static BICARB_CHAMBER_FILL_EXEC_STATE_T handleBicarbChamberSupplyVentStartState(void); static BICARB_CHAMBER_FILL_EXEC_STATE_T handleBicarbChamberSupplyVentEndState(void); -static BOOL isDryBicartChamberFillWindowOpen( void ); -static void closeD65IfBalChamberSwitchImminent( void ); // Drain static DRY_BICART_DRAIN_EXEC_STATE_T handleDryBicartDrainStartState( void ); static DRY_BICART_DRAIN_EXEC_STATE_T handleDryBicartFluidDrainState( void ); @@ -247,9 +237,7 @@ dryBiCartLowerCartPressure.override = OVERRIDE_RESET; dryBiCartPressureDecayStartTimeFlag = FALSE; - dryBiCartVentCycleWaitTimeStartedFlag = FALSE; dryBiCartFillVentTimeOut = FALSE; - dryBiCartVentCycleStartTime = 0; dryBiCartFillStartTime = 0; lastFillDurationInMS = 0; currentFillDurationInMS = 0; @@ -563,46 +551,6 @@ /*********************************************************************//** * @brief - * The isDryBicartChamberFillWindowOpen function checks whether D65 may be - * opened for dry bicarb refill: fresh-side BC valves closed and BC switch not - * within the 50 ms valve-close window. - * @details \b Inputs: getBalChamberFreshSideValvesClosedStatus, isBalChamberSwitchImminent - * @details \b Outputs: none - * @return TRUE when the BC fill is completed and allow D65 to fill Chamber F - *************************************************************************/ -static BOOL isDryBicartChamberFillWindowOpen( void ) -{ - BOOL result = FALSE; - - if ( ( TRUE == getBalChamberFreshSideValvesClosedStatus() ) && - ( FALSE == isBalChamberSwitchImminent() ) ) - { - result = TRUE; - } - - return result; -} - -/*********************************************************************//** - * @brief - * The closeD65IfBalChamberSwitchImminent function closes D65 when the balancing - * chamber is within 100 ms of switching. - * @details \b Inputs: isBalChamberSwitchImminent - * @details \b Outputs: valve states - * @return none - *************************************************************************/ -static void closeD65IfBalChamberSwitchImminent( void ) -{ - if ( TRUE == isBalChamberSwitchImminent() ) - { - setValveState( D65_VALV, VALVE_STATE_CLOSED ); - // Open D80 only in supply state - setValveState( D80_VALV, VALVE_STATE_OPEN ); - } -} - -/*********************************************************************//** - * @brief * The setBicartFillRequested function sets the bicart fill request * flag value to be True. * @details \b Inputs: bicarbChamberFillRequested, dryBiCartDrainRequested, @@ -890,16 +838,16 @@ F32 d66Pressure = getFilteredPressure( D66_PRES ); F32 fillCompletePressure = GET_FILL_COMPLETE_PRESSURE_PSI; - // Close dry bicart inlet water if D66 pressure is equal to fill complete pressure + // Close dry bicart inlet water if D66 pressure is 17 PSI if ( d66Pressure >= fillCompletePressure ) { - // start the persistence timer once d66 reaches fill complete pressure + // start the persistence timer once d66 reaches 17 PSI if ( 0 == dryBiCartPersistenceStartTime ) { dryBiCartPersistenceStartTime = getMSTimerCount(); } - // defined persistence on D66 pressure since pressure overshoot just after D65 opening + // 200 ms persistence on D66 pressure since pressure overshoot just after D65 opening if ( TRUE == didTimeout( dryBiCartPersistenceStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) { setValveState( D65_VALV, VALVE_STATE_CLOSED ); @@ -966,15 +914,15 @@ //Vent chamber F to atmosphere setValveState( D64_VALV, VALVE_STATE_OPEN ); - // D66 pressure drops to below fill vent complete pressure + // D66 pressure drops to below 1.5 PSI if ( ( d66Pressure <= DRY_BICART_FILL_VENT_COMPLETE_PRESSURE_PSI ) ) { - // start the persistence timer once d66 reaches fill vent complete pressure + // start the persistence timer once d66 reaches 1.5 PSI if ( 0 == dryBiCartPersistenceStartTime ) { dryBiCartPersistenceStartTime = getMSTimerCount(); } - // defined persistence on D66 pressure since pressure drop below fill vent complete pressure after opening D64 + // 200 ms persistence on D66 pressure since pressure drop below 1.5 PSI after opening D64 if ( TRUE == didTimeout( dryBiCartPersistenceStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) { setValveState( D85_VALV, VALVE_STATE_CLOSED ); @@ -1098,9 +1046,8 @@ * @brief * The handleBicarbChamberStartState function wait for bicarb chamber fill request * @details \b Inputs: bicarbChamberFillRequested - * @details \b Outputs: dryBiCartVentCycleWaitTimeStartedFlag, dryBiCartPressureDecayStartTimeFlag, - * dryBiCartVentCycleStartTime. - * @return the next drybicart fluid supply state. + * @details \b Outputs: none + * @return the next drybicart fluid drain state. *************************************************************************/ static BICARB_CHAMBER_FILL_EXEC_STATE_T handleBicarbChamberStartState( void ) { @@ -1110,13 +1057,7 @@ if ( TRUE == getU32OverrideValue( &bicarbChamberFillRequested ) ) { - state = BICARB_CHAMBER_SUPPLY_STATE; - - if ( FALSE == dryBiCartVentCycleWaitTimeStartedFlag ) - { - dryBiCartVentCycleWaitTimeStartedFlag = TRUE; - dryBiCartVentCycleStartTime = getMSTimerCount(); - } + state = BICARB_CARTRIDGE_FILL_WATER_START_STATE; } return state; @@ -1130,32 +1071,27 @@ *************************************************************************/ static BICARB_CHAMBER_FILL_EXEC_STATE_T handleBicarbChamberCartridgeFillWaterStartState( void ) { - BICARB_CHAMBER_FILL_EXEC_STATE_T state = BICARB_CARTRIDGE_FILL_WATER_START_STATE; + BICARB_CHAMBER_FILL_EXEC_STATE_T state = BICARB_CARTRIDGE_FILL_WATER_END_STATE; - if ( TRUE == isDryBicartChamberFillWindowOpen() ) - { - // Close vent valves and descaling valve - setValveState( D80_VALV, VALVE_STATE_CLOSED ); - setValveState( D81_VALV, VALVE_STATE_CLOSED ); - setValveState( D85_VALV, VALVE_STATE_CLOSED ); + // Close vent valves and descaling valve + setValveState( D80_VALV, VALVE_STATE_CLOSED ); + setValveState( D81_VALV, VALVE_STATE_CLOSED ); + setValveState( D85_VALV, VALVE_STATE_CLOSED ); - // open inlet water to bicart only when fresh-side BC valves are closed - setValveState( D65_VALV, VALVE_STATE_OPEN ); - setValveState( D64_VALV, VALVE_STATE_OPEN ); + // open inlet water to bicart + setValveState( D65_VALV, VALVE_STATE_OPEN ); + setValveState( D64_VALV, VALVE_STATE_OPEN ); - dryBiCarbSupplyStartTime = getMSTimerCount(); - dryBiCartPersistenceStartTime = 0; + dryBiCarbSupplyStartTime = getMSTimerCount(); + dryBiCartPersistenceStartTime = 0; - state = BICARB_CARTRIDGE_FILL_WATER_END_STATE; - } - return state; } /*********************************************************************//** * @brief - * The handleBicarbChamberCartridgeFillWaterStartState function stops the inlet water to cartridge. - * @details \b Inputs: dryBiCartPersistenceStartTime + * The handleBicarbChamberCartridgeFillWaterStartState function stop water in the dry bicart + * @details \b Inputs: D66 pressure, dryBiCartPersistenceStartTime * @details \b Outputs: valve states * @return the next bicarb chamber check level state. *************************************************************************/ @@ -1164,18 +1100,8 @@ 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; - LVL_STATE_T bicarbChamberLevel = getBicarbChamberLevelStatus(); - if ( FALSE == isDryBicartChamberFillWindowOpen() ) - { - setValveState( D65_VALV, VALVE_STATE_CLOSED ); - } - else if ( TRUE == isDryBicartChamberFillWindowOpen() ) - { - setValveState( D65_VALV, VALVE_STATE_OPEN ); - } - - // check D66 pressure greater than or equal to Fill complete pressure + // check D66 pressure greater than or equal to 17 PSI if ( d66Pressure >= fillCompletePressure ) { // start the persistence timer once d66 reaches 17 PSI @@ -1184,30 +1110,21 @@ dryBiCartPersistenceStartTime = getMSTimerCount(); } - // Defined persistence on D66 pressure since pressure overshoot just after D65 opening only for chamber fill + // 200 ms persistence on D66 pressure since pressure overshoot just after D65 opening if ( TRUE == didTimeout( dryBiCartPersistenceStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) { // Close water inlet valve as D66 pressure reaches 11 PSI after persistence setValveState( D65_VALV, VALVE_STATE_CLOSED ); dryBiCartPersistenceStartTime = 0; - //state = BICARB_CHAMBER_SUPPLY_STATE; - state = BICARB_SUPPLY_VENT_END_STATE; - + state = BICARB_CHAMBER_SUPPLY_STATE; } } else { dryBiCartPersistenceStartTime = 0; } - //Additional code - if ( LVL_STATE_LOW == bicarbChamberLevel ) - { - //Force transition to end state to allow next supply - state = BICARB_SUPPLY_VENT_END_STATE; - } - return state; } @@ -1223,8 +1140,7 @@ BICARB_CHAMBER_FILL_EXEC_STATE_T state = BICARB_CHAMBER_PRESSURE_CHECK_STATE; // TODO: set supply in progress to inform BC control to disable alarm - setValveState( D64_VALV, VALVE_STATE_OPEN ); - + setValveState( D64_VALV, VALVE_STATE_CLOSED ); // Open the Bicarb chamber inlet valve setValveState( D80_VALV, VALVE_STATE_OPEN ); @@ -1240,9 +1156,10 @@ * @brief * The handleBicarbChamberPressureCheckStartState function actuates the vent valve * present in the Bicart assembly. - * @details \b Inputs: dryBiCarbSupplyStartTime, dryBiCarbSypplyVentStartTime, dryBiCartPersistenceStartTime, - * bicarbChamberLevel, dryBiCartPressureDecayStartTimeFlag, drybicartPersistenceOnLowercartPressureStartTime - * @details \b Outputs: dryBiCarbSypplyVentStartTime, valve states + * @details \b Inputs: D66 Pressure, D63 level, dryBiCarbSupplyStartTime, + * dryBiCarbSypplyVentStartTime, dryBiCartPersistenceStartTime, bicarbChamberLevel, + * dryBiCartPressureDecayStartTimeFlag, drybicartPersistenceOnLowercartPressureStartTime + * @details \b Outputs: dryBiCarbSypplyVentStartTime * @return the next bicarb chamber Supply Vent Start state. *************************************************************************/ static BICARB_CHAMBER_FILL_EXEC_STATE_T handleBicarbChamberPressureCheckState( void ) @@ -1251,46 +1168,32 @@ F32 d66Pressure = getFilteredPressure( D66_PRES ); LVL_STATE_T bicarbChamberLevel = getBicarbChamberLevelStatus(); - // Close D65 irrespective of pressure for balancing chamber fresh side fill to complete. - closeD65IfBalChamberSwitchImminent(); - // Once upper level reached high , close the valve, timeout is for safety in case level sensor didn't work(10 sec), or else its a time based filling (3 sec) if ( ( LVL_STATE_HIGH == bicarbChamberLevel ) || ( TRUE == didTimeout( dryBiCarbSupplyStartTime, DRY_BICART_SUPPLY_VALVE_D80_OPEN_TIME_MS ) ) ) { - if ( TRUE == didTimeout( dryBiCartVentCycleStartTime, DRY_BICART_SUPPLY_VENT_CYCLE_TIME_MS ) ) + setValveState( D65_VALV, VALVE_STATE_CLOSED ); + + // start the timer for d66 pressure decay + if( FALSE == dryBiCartPressureDecayStartTimeFlag ) { - // start the timer for d66 pressure decay - if ( FALSE == dryBiCartPressureDecayStartTimeFlag ) + dryBiCarbSupplyStartTime = getMSTimerCount(); + dryBiCartPressureDecayStartTimeFlag = TRUE; + } + // do not close the D80 valve, wait till d66 decays to 3 PSI + if ( TRUE == didTimeout( dryBiCarbSupplyStartTime, DRY_BICART_SUPPLY_COMPLETE_TIME_MS ) ) + { + if ( d66Pressure <= getDryBicartLowerCartPressure() ) { + setValveState( D80_VALV, VALVE_STATE_CLOSED ); + setValveState( D85_VALV, VALVE_STATE_OPEN ); + dryBiCarbSupplyStartTime = getMSTimerCount(); - dryBiCartPressureDecayStartTimeFlag = TRUE; - } - // do not close the D80 valve, wait till d66 decays to supply decay complete pressure - if ( TRUE == didTimeout( dryBiCarbSupplyStartTime, DRY_BICART_SUPPLY_COMPLETE_TIME_MS ) ) - { - if ( d66Pressure <= DRY_BICART_SUPPLY_DECAY_COMPLETE_PRESSURE_PSI ) - { - setValveState( D80_VALV, VALVE_STATE_CLOSED ); - setValveState( D64_VALV, VALVE_STATE_CLOSED ); - setValveState( D85_VALV, VALVE_STATE_OPEN ); + dryBiCarbSypplyVentStartTime = getMSTimerCount(); - dryBiCarbSupplyStartTime = getMSTimerCount(); - dryBiCarbSypplyVentStartTime = getMSTimerCount(); - - state = BICARB_SUPPLY_VENT_START_STATE; - } + state = BICARB_SUPPLY_VENT_START_STATE; } } - else - { - setValveState( D65_VALV, VALVE_STATE_CLOSED ); - setValveState( D80_VALV, VALVE_STATE_CLOSED ); - dryBiCarbSupplyStartTime = getMSTimerCount(); - - state = BICARB_CARTRIDGE_FILL_WATER_START_STATE; - - } } else if ( d66Pressure <= getDryBicartLowerCartPressure() ) { @@ -1299,13 +1202,10 @@ { drybicartPersistenceOnLowercartPressureStartTime = getMSTimerCount(); } - - // defined persistence on D66 pressure - if ( ( TRUE == didTimeout( drybicartPersistenceOnLowercartPressureStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) && - ( TRUE == isDryBicartChamberFillWindowOpen() ) ) + // 200 ms persistence on D66 pressure + if ( TRUE == didTimeout( drybicartPersistenceOnLowercartPressureStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) { setValveState( D65_VALV, VALVE_STATE_OPEN ); - setValveState( D80_VALV, VALVE_STATE_CLOSED ); drybicartPersistenceOnLowercartPressureStartTime = 0; } } @@ -1318,11 +1218,10 @@ dryBiCartPersistenceStartTime = getMSTimerCount(); } - // defined persistence on D66 pressure since pressure overshoot just after D65 opening + // 200 ms persistence on D66 pressure since pressure overshoot just after D65 opening if ( TRUE == didTimeout( dryBiCartPersistenceStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) { setValveState( D65_VALV, VALVE_STATE_CLOSED ); - setValveState( D80_VALV, VALVE_STATE_OPEN ); dryBiCartPersistenceStartTime = 0; } } @@ -1340,7 +1239,7 @@ * The handleBicarbChamberSupplyVentStartState function actuates the vent valve * present in the Bicart assembly. * @details \b Inputs: dryBiCarbSypplyVentStartTime, dryBiCartPersistenceStartTime - * @details \b Outputs: dryBiCarbSypplyVentStartTime, valve states + * @details \b Outputs: dryBiCarbSypplyVentStartTime * @return the next bicarb chamber Supply Vent End state. *************************************************************************/ static BICARB_CHAMBER_FILL_EXEC_STATE_T handleBicarbChamberSupplyVentStartState(void) @@ -1353,20 +1252,20 @@ //Vent chamber F to atmosphere setValveState( D64_VALV, VALVE_STATE_OPEN ); - // D66 pressure drops to below fill vent complete pressure or time out + // D66 pressure drops to below 1.5 PSI or time out if ( ( d66Pressure <= DRY_BICART_FILL_VENT_COMPLETE_PRESSURE_PSI ) ) { - // start the persistence timer once d66 reaches if it drops below fill vent complete pressure + // start the persistence timer once d66 reaches if it drops below 1.5 if ( 0 == dryBiCartPersistenceStartTime ) { dryBiCartPersistenceStartTime = getMSTimerCount(); } - // defined persistence on D66 pressure since pressure overshoot just after D65 opening + // 200 ms persistence on D66 pressure since pressure overshoot just after D65 opening if ( TRUE == didTimeout( dryBiCartPersistenceStartTime, DRY_BICART_PERSISTENCE_DURATION_MS ) ) { setValveState( D85_VALV, VALVE_STATE_CLOSED ); dryBiCartPersistenceStartTime = 0; - dryBiCartVentCycleWaitTimeStartedFlag = FALSE; + state = BICARB_SUPPLY_VENT_END_STATE; } } @@ -1375,7 +1274,6 @@ setValveState( D85_VALV, VALVE_STATE_CLOSED ); dryBiCartPersistenceStartTime = 0; dryBiCartFillVentTimeOut = TRUE; - dryBiCartVentCycleWaitTimeStartedFlag = FALSE; state = BICARB_SUPPLY_VENT_END_STATE; } @@ -1721,7 +1619,7 @@ * @details \b Outputs: dryBiCartDataPublishInterval * @param Override message from Dialin which includes the interval * (in ms) to override the DD dry bicart data publish interval to. - * @return TRUE if override successful, FALSE if not. + * @return TRUE if override successful, FALSE if not *************************************************************************/ BOOL testDryBiCartDataPublishIntervalOverride( MESSAGE_T *message ) {