Index: firmware/App/Controllers/DryBiCart.c =================================================================== diff -u -r96672fa4b57d15c36d8aaa73d6f50ea0fe7fda66 -rc5ffb798313c4179717f45b6485cebcb45e6fd5d --- firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision 96672fa4b57d15c36d8aaa73d6f50ea0fe7fda66) +++ firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision c5ffb798313c4179717f45b6485cebcb45e6fd5d) @@ -36,9 +36,9 @@ // ********** private definitions ********** #define DRY_BICART_DATA_PUBLISH_INTERVAL ( 250 / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the balancing chamber data published. -#define DRY_BICART_FILL_MAX_PRESSURE 12.0F ///< Maximum pressure that drybicart can withstand. -#define DRY_BICART_FILL_COMPLETE_PRESSURE 15.0F ///< Maximum pressure reached to inidcate the drybicart fill being completed. -#define DRY_BICART_FILL_INITIATE_PRESSURE 5.0F ///< Minimum pressure required to initiate the drybicart fill process. +#define DRY_BICART_FILL_MAX_PRESSURE 12.0F ///< Maximum pressure that drybicart can withstand. +#define DRY_BICART_FILL_COMPLETE_PRESSURE 15.0F ///< Maximum pressure reached to inidcate the drybicart fill being completed. +#define DRY_BICART_FILL_INITIATE_PRESSURE 5.0F ///< Minimum pressure required to initiate the drybicart fill process. #define DRY_BICART_VENT_COMPLETE_PRESSURE 1.5F ///< Pressure reached to inidcate the drybicart venting being completed. #define DRY_BICART_VENT_TIME_MS ( 1 * MS_PER_SECOND ) ///< Wait time to vent dry bibag gas before actuating Bicarb chamber(F) venting. #define DRY_BICART_VENT_MAX_TIME_MS ( 10 * MS_PER_SECOND ) ///< Max time to vent both bicart and Chamber F. @@ -54,10 +54,10 @@ // ********** private data ********** -static DRY_BICART_FILL_EXEC_STATE_T dryBiCartFillExecState; ///< Current state of dry bicart fill executive state machine. +static DRY_BICART_FILL_EXEC_STATE_T dryBiCartFillExecState; ///< Current state of dry bicart fill executive state machine. static BICARB_CHAMBER_FILL_EXEC_STATE_T bicarbChamberFillExecState; ///< Current state of bicarb chamber fill executive state machine. -static U32 dryBiCartFillStartTime; ///< Dry bicart fill start time. -static U32 biCartFillCycleCounter; ///< Number of drybicart fill cycle +static U32 dryBiCartFillStartTime; ///< Dry bicart fill start time. +static U32 biCartFillCycleCounter; ///< Number of drybicart fill cycle static OVERRIDE_U32_T biCartMaxFillCycleCount; ///< Maximum number of drybicart fill cycle ( overrideable) static U32 lastFillDurationInMS; ///< Previous time duration to fill the bicart fill. static U32 currentFillDurationInMS; ///< Current time duartion to fill the bicart fill. @@ -68,12 +68,12 @@ // ********** private function prototypes ********** -static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartFillWaterStartState(void); -static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartFillWaterEndState(void); -static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartDegasStartState(void); -static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartDegasEndState(void); -static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartFillDurationCheckState(void); -static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartFillCompleteState(void); +static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartFillWaterStartState( void ); +static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartFillWaterEndState( void ); +static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartDegasStartState( void ); +static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartDegasEndState( void ); +static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartFillDurationCheckState( void ); +static DRY_BICART_FILL_EXEC_STATE_T handleDryBicartFillCompleteState( void ); static BICARB_CHAMBER_FILL_EXEC_STATE_T handleBicarbChamberCheckLevelState( void ); static BICARB_CHAMBER_FILL_EXEC_STATE_T handleBicarbChamberFillState( void ); @@ -83,7 +83,8 @@ /*********************************************************************//** * @brief - * The The initDryBiCart function initializes the DryBiCart module. + * The The initDryBiCart function initializes the Dry Bicarbonate Cartridge + * module. * @details \b Inputs: none * @details \b Outputs: unit variables initialized * @return none @@ -92,10 +93,10 @@ { dryBiCartFillExecState = DRY_BICART_START_STATE; bicarbChamberFillExecState = BICARB_CHAMBER_START_STATE; - dryBiCartDataPublishInterval.data = DRY_BICART_DATA_PUBLISH_INTERVAL; - dryBiCartDataPublishInterval.ovData = DRY_BICART_DATA_PUBLISH_INTERVAL; - dryBiCartDataPublishInterval.ovInitData = 0; - dryBiCartDataPublishInterval.override = OVERRIDE_RESET; + dryBiCartDataPublishInterval.data = DRY_BICART_DATA_PUBLISH_INTERVAL; + dryBiCartDataPublishInterval.ovData = DRY_BICART_DATA_PUBLISH_INTERVAL; + dryBiCartDataPublishInterval.ovInitData = 0; + dryBiCartDataPublishInterval.override = OVERRIDE_RESET; biCartMaxFillCycleCount.data = DRY_BICART_DEFAULT_MAX_FILL_CYCLE_CNT; biCartMaxFillCycleCount.ovData = DRY_BICART_DEFAULT_MAX_FILL_CYCLE_CNT; biCartMaxFillCycleCount.ovInitData = 0; @@ -131,7 +132,8 @@ /*********************************************************************//** * @brief - * The execDryBicart function executes the set of dry bicart related state machines. + * The execDryBicart function executes the set of dry bicarbonate cartridge + * and Bicarb chamber fill related state machines. * @details \b Inputs: none * @details \b Outputs: none * @return none. Index: firmware/App/Controllers/DryBiCart.h =================================================================== diff -u -rdb2df05586608658c7bbd0dbd66aeba03068b16d -rc5ffb798313c4179717f45b6485cebcb45e6fd5d --- firmware/App/Controllers/DryBiCart.h (.../DryBiCart.h) (revision db2df05586608658c7bbd0dbd66aeba03068b16d) +++ firmware/App/Controllers/DryBiCart.h (.../DryBiCart.h) (revision c5ffb798313c4179717f45b6485cebcb45e6fd5d) @@ -23,15 +23,15 @@ /** * @defgroup DryBiCart DryBiCart - * @brief DryBiCart unit. Performs dry bicart functions via a state machine. + * @brief DryBiCart unit. Performs dry bicarbonate cartridge fill, bicarb + * chamber(F) fill and cartridge draining functions via a state machine. * * @addtogroup DryBiCart * @{ */ // ********** public definitions ********** - /// dry bicart data structure typedef struct { @@ -41,15 +41,15 @@ U32 dryBiCartMaxFillCycleCount; ///< Dry bicart fill cycle max count U32 dryBiCartFillRequest; ///< Dry bicart fill request U32 bicarbChamberFillRequest; ///< Bicarb chamber fill request - U32 dryBiCartLastFillTime; ///< Dry bicart last fill duration in milli second - U32 dryBiCartCurrentFillTime; ///< Dry bicart current fill duration in milli second + U32 dryBiCartLastFillTime; ///< Dry bicart last fill duration in milli second + U32 dryBiCartCurrentFillTime; ///< Dry bicart current fill duration in milli second } DRY_BICART_DATA_T; // ********** public function prototypes ********** - void initDryBiCart( void ); // Initialize dry bicart unit -void transitionToDryBicart( void ); // Prepares for transition to dry bicart execution -U32 execDryBicartFillMode( void ); // Execute the dry bicart state machine +void initDryBiCart( void ); // Initialize dry bicart unit +void transitionToDryBicart( void ); // Prepares for transition to dry bicart execution +U32 execDryBicartFillMode( void ); // Execute the dry bicart state machine U32 execBicarbChamberFillMode( void ); // Execute the bicarb chamber fill state machine void execDryBicart( void ); // Execute the list of drybicart state machines Index: firmware/App/DDCommon.h =================================================================== diff -u -r65292e443646d135d8fcad0a2eda19d844b06dff -rc5ffb798313c4179717f45b6485cebcb45e6fd5d --- firmware/App/DDCommon.h (.../DDCommon.h) (revision 65292e443646d135d8fcad0a2eda19d844b06dff) +++ firmware/App/DDCommon.h (.../DDCommon.h) (revision c5ffb798313c4179717f45b6485cebcb45e6fd5d) @@ -52,7 +52,7 @@ //#define __BICARB_CHAMBER_FILL__ 1 //Uncomment below for Maxon controller speed change -//#define __MAXON_SPEED_UPDATE__ 1 +#define __MAXON_SPEED_UPDATE__ 1 //UnComment below for DryBicarb testing //#define __DRY_BICARB__ 1