Index: firmware/App/Controllers/DryBiCart.c =================================================================== diff -u -r11c6fba719b5759b7261775fbcf87ad2862c7562 -re9d780d77db564793278dac7dc613354f7b93049 --- firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision 11c6fba719b5759b7261775fbcf87ad2862c7562) +++ firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision e9d780d77db564793278dac7dc613354f7b93049) @@ -101,7 +101,7 @@ DRY_BICART_SUPPLY, ///< Dry bicart chamber fill DRY_BICART_DRAIN, ///< Dry bicart drain DRY_BICART_DEPRESSURIZE, ///< Dry bicart depressurize - DRY_BICART_PRE_GEN_CHAMBER_FILL, + DRY_BICART_PRE_GEN_CHAMBER_FILL, ///< Dry bicart pre generate no delivery fill. NUM_OF_DRY_BICART_OPERATION ///< Number of dry bicart operation } DRY_BICART_OPERATION_T; @@ -111,7 +111,7 @@ static BICARB_CHAMBER_FILL_EXEC_STATE_T bicarbChamberFillExecState; ///< Current state of bicarb chamber fill executive state machine. static DRY_BICART_DRAIN_EXEC_STATE_T dryBiCartDrainExecState; ///< Current state of dry bicart drain executive state machine static DRY_BICART_DEPRESSURIZE_EXEC_STATE_T dryBiCartDepressurizeExecState; ///< Current state of dry bicart depressurize executive state machine -static BICARB_CHAMBER_PRE_GEN_FILL_EXEC_STATE_T bicarbChamberPreGenFillExecState; +static BICARB_CHAMBER_PRE_GEN_FILL_EXEC_STATE_T bicarbChamberPreGenFillExecState; ///< Current state of dry bicart pre gen fill executive state machine. // fill static U32 dryBiCartFillStartTime; ///< Dry bicart fill start time. static U32 biCartFillCycleCounter; ///< Number of drybicart fill cycle @@ -144,8 +144,8 @@ //static U32 dryBiCartDrainCondStableCount; ///< Debounce counter for "zero" conductivity static U32 dryBiCartDrainTimePeriod; ///< Dry bicart drain time period -static U32 dryBiCarbPreGenSupplyStartTime; -static U32 dryBiCartPreGenPersistenceStartTime; +static U32 dryBiCarbPreGenSupplyStartTime; ///< Dry bicart pre gen supply start time. +static U32 dryBiCartPreGenPersistenceStartTime; ///< Dry bicart pre gen persistense start time. static U32 drybicartPreGenPersistenceOnLowercartPressureStartTime; ///< Dry bicart Persistence on lower cart pressure start time. static U32 dryBiCartPersistenceStartTime; ///< Dry bicart Persistence time. static U32 drybicartPersistenceOnLowercartPressureStartTime; ///< Dry bicart Persistence on lower cart pressure start time. @@ -536,10 +536,10 @@ /*********************************************************************//** * @brief - * The execBicarbChamberFillMode function executes the bicarb chamber fill - * (delivering bicarbonate from Bicart assembly to chamber F)state machine. - * @details \b Inputs: bicarbChamberFillExecState - * @details \b Outputs: bicarbChamberFillExecState + * The execBicarbChamberPreGenFillMode function executes the bicarb chamber fill + * (delivering bicarbonate from Bicart assembly to chamber F) state machine for pre gen. + * @details \b Inputs: bicarbChamberPreGenFillExecState + * @details \b Outputs: bicarbChamberPreGenFillExecState * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT when wrong bicarb chamber * fill state invoked. * @return current state. @@ -579,7 +579,7 @@ break; default: - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_BICARB_CHAMBER_FILL_INVALID_EXEC_STATE, bicarbChamberFillExecState ); + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_BICARB_CHAMBER_PRE_GEN_FILL_INVALID_EXEC_STATE, bicarbChamberPreGenFillExecState ); break; } @@ -600,6 +600,7 @@ BOOL result = FALSE; BOOL requestStatus = getU32OverrideValue( &bicarbChamberPreGenFillRequested ) \ || getU32OverrideValue( &dryBiCartDrainRequested ) || \ + getU32OverrideValue( &dryBiCartFillRequested ) || \ getU32OverrideValue( &dryBiCartDepressurizeRequested ) ; //ensure that there is no other operation in progress before new request set to true @@ -659,8 +660,10 @@ BOOL result = FALSE; BOOL requestStatus = getU32OverrideValue( &dryBiCartFillRequested ) ||\ getU32OverrideValue( &dryBiCartDrainRequested ) || \ - getU32OverrideValue( &dryBiCartDepressurizeRequested ); + getU32OverrideValue( &dryBiCartDepressurizeRequested )|| \ + getU32OverrideValue( &bicarbChamberPreGenFillRequested ); + // ensure that there is no other operation in progress before new request set to true if ( FALSE == requestStatus ) { @@ -745,8 +748,10 @@ BOOL result = FALSE; BOOL requestStatus = getU32OverrideValue( &bicarbChamberFillRequested ) \ || getU32OverrideValue( &dryBiCartDrainRequested ) || \ - getU32OverrideValue( &dryBiCartDepressurizeRequested ) ; + getU32OverrideValue( &dryBiCartDepressurizeRequested ) || \ + getU32OverrideValue( &bicarbChamberPreGenFillRequested ); + //ensure that there is no other operation in progress before new request set to true if ( FALSE == requestStatus ) { @@ -791,8 +796,10 @@ BOOL result = FALSE; BOOL requestStatus = getU32OverrideValue( &bicarbChamberFillRequested ) || \ getU32OverrideValue( &dryBiCartFillRequested ) || \ - getU32OverrideValue( &dryBiCartDepressurizeRequested ); + getU32OverrideValue( &dryBiCartDepressurizeRequested ) || \ + getU32OverrideValue( &bicarbChamberPreGenFillRequested ); + //ensure that there is no other operation in progress before new request set to true if ( FALSE == requestStatus ) { @@ -836,7 +843,8 @@ BOOL result = FALSE; BOOL requestStatus = getU32OverrideValue( &bicarbChamberFillRequested ) || \ getU32OverrideValue( &dryBiCartFillRequested ) || \ - getU32OverrideValue( &dryBiCartDrainRequested ); + getU32OverrideValue( &dryBiCartDrainRequested ) || \ + getU32OverrideValue( &bicarbChamberPreGenFillRequested ); //ensure that there is no other operation in progress before new request set to true if ( FALSE == requestStatus ) @@ -1822,7 +1830,7 @@ /*********************************************************************//** * @brief - * The handleBicarbChamberStartState function wait for bicarb chamber fill request + * The handleBicarbChamberPreGenStartState function wait for pre gen bicarb chamber fill request * @details \b Inputs: bicarbChamberFillRequested * @details \b Outputs: none * @return the next drybicart fluid drain state. @@ -1842,7 +1850,7 @@ } /*********************************************************************//** * @brief - * The handleBicarbChamberCartridgeFillWaterStartState function fill water in the dry bicart + * The handleBicarbChamberPreGenCartridgeFillWaterStartState function fill water in the dry bicart * @details \b Inputs: none * @details \b Outputs: valve states, dryBiCarbSupplyStartTime, dryBiCartPersistenceStartTime * @return the next bicarb cartridge fill water end state. @@ -1869,8 +1877,8 @@ /*********************************************************************//** * @brief - * The handleBicarbChamberCartridgeFillWaterStartState function stop water in the dry bicart - * @details \b Inputs: D66 pressure, dryBiCartPersistenceStartTime + * The handleBicarbChamberPreGenCartridgeFillWaterEndState function stop water in the dry bicart + * @details \b Inputs: D66 pressure, dryBiCartPreGenPersistenceStartTime * @details \b Outputs: valve states * @return the next bicarb chamber check level state. *************************************************************************/ @@ -1909,9 +1917,9 @@ /*********************************************************************//** * @brief - * The handleBicarbChamberSupplyStart function open the bicarb inlet valve (D80). + * The handleBicarbChamberPreGenSupplyStart function open the bicarb inlet valve (D80). * @details \b Inputs: none - * @details \b Outputs: valve states, dryBiCarbSupplyStartTime + * @details \b Outputs: valve states, dryBiCarbPreGenSupplyStartTime * @return the next bicarb chamber fill state. *************************************************************************/ static BICARB_CHAMBER_PRE_GEN_FILL_EXEC_STATE_T handleBicarbChamberPreGenSupplyStart( void ) @@ -1933,10 +1941,10 @@ /*********************************************************************//** * @brief - * The handleBicarbChamberPressureCheckStartState function actuates the vent valve + * The handleBicarbChamberPreGenPressureCheckState function actuates the vent valve * present in the Bicart assembly. - * @details \b Inputs: D66 Pressure, D63 level, dryBiCarbSupplyStartTime, - * dryBiCarbSypplyVentStartTime, dryBiCartPersistenceStartTime, bicarbChamberLevel, + * @details \b Inputs: D66 Pressure, D63 level, dryBiCarbPreGenSupplyStartTime, + * dryBiCarbSupplyVentStartTime, dryBiCartPersistenceStartTime, bicarbChamberLevel, * dryBiCartPressureDecayStartTimeFlag, drybicartPersistenceOnLowercartPressureStartTime * @details \b Outputs: dryBiCarbSypplyVentStartTime * @return the next bicarb chamber Supply Vent Start state. @@ -2015,9 +2023,9 @@ /*********************************************************************//** * @brief - * The handleBicarbChamberSupplyVentStartState function actuates the vent valve + * The handleBicarbChamberPreGenSupplyVentStartState function actuates the vent valve * present in the Bicart assembly. - * @details \b Inputs: dryBiCarbSypplyVentStartTime, dryBiCartPersistenceStartTime + * @details \b Inputs: dryBiCarbSypplyVentStartTime, dryBiCartPreGenPersistenceStartTime * @details \b Outputs: dryBiCarbSypplyVentStartTime * @return the next bicarb chamber Supply Vent End state. *************************************************************************/ @@ -2067,10 +2075,10 @@ /*********************************************************************//** * @brief - * The handleBicarbChamberSupplyVentEndState function actuates the vent valve + * The handleBicarbChamberPreGenSupplyVentEndState function actuates the vent valve * present in the Bicart assembly. - * @details \b Inputs: dryBiCarbSypplyVentStartTime - * @details \b Outputs: bicarbChamberFillRequested + * @details \b Inputs: dryBiCartPressureDecayStartTimeFlag + * @details \b Outputs: bicarbChamberPreGenFillRequested * @return the next bicarb chamber start state. *************************************************************************/ static BICARB_CHAMBER_PRE_GEN_FILL_EXEC_STATE_T handleBicarbChamberPreGenSupplyVentEndState(void) @@ -2201,6 +2209,23 @@ /*********************************************************************//** * @brief + * The testPreGenBiCarbChamberFillRequestOverride function starts/stops the pre gen bicarb + * chamber F fill. + * @details \b Inputs: bicarbChamberPreGenFillRequested + * @details \b Outputs: bicarbChamberPreGenFillRequested + * @param message set message from Dialin which includes the bicarb chamber + * fill start/stop. + * @return TRUE if set request is successful, FALSE if not + *************************************************************************/ +BOOL testPreGenBiCarbChamberFillRequestOverride( MESSAGE_T *message ) +{ + BOOL result = u32Override( message, &bicarbChamberPreGenFillRequested, FALSE, TRUE ); + + return result; +} + +/*********************************************************************//** + * @brief * The testDryBiCartDrainRequestOverride function starts/stops the bicart * drain request * @details \b Inputs: dryBiCartDrainRequested