Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r4778daea54641e73f72322ba660a673f9ba6dfb8 -rd466db5e5f2d865456aa12140b3d1bb56335730b --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 4778daea54641e73f72322ba660a673f9ba6dfb8) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision d466db5e5f2d865456aa12140b3d1bb56335730b) @@ -24,12 +24,17 @@ #include "ModeTreatment.h" #include "ModeStandby.h" #include "OperationModes.h" +#include "PinchValve.h" #include "Switches.h" #include "SystemCommTD.h" #include "TxParams.h" #include "Valve3Way.h" #include "Valves.h" +//#if 1 +//#include "PinchValve.h" +//#endif + /** * @addtogroup TDStandbyMode * @{ @@ -48,10 +53,15 @@ static FLUID_TYPE_T fluidType; ///< Fluid type assigned based on user selection. static TREATMENT_TYPE_T modality; ///< Modality from the treatment initiation. + // ********** private function prototypes ********** static TD_STANDBY_STATE_T handleStandbyModeStartState( void ); static TD_STANDBY_STATE_T handleStandbyModeWaitForTreatmentState( void ); +//#if 1 +//static BOOL startTest = FALSE; +//static BOOL startPos = FALSE; +//#endif /*********************************************************************//** * @brief @@ -67,6 +77,8 @@ homingInitiated = FALSE; fluidType = FLUID_TYPE_UNKNOWN; modality = TREATMENT_MODALITY_HD_SALINE_FLUID; +// startTest = FALSE; +// startPos = FALSE; } /*********************************************************************//** @@ -113,6 +125,9 @@ // sendDGServiceRequestToDG(); // sendDGUsageInfoRequestToDG(); +//#if 1 +// initPinchValveDriver(); +//#endif return currentStandbyState; } @@ -132,6 +147,41 @@ { // Ignore stop button in this mode. } +//#if 1 +// if ( TRUE == startTest ) +// { +// startTest = FALSE; +// startPos = TRUE; +// homePinchValve(H1_VALV); +// homePinchValve(H19_VALV); +// } +// if ( ( TRUE == isPinchValveHomed( H1_VALV ) ) && ( TRUE == isPinchValveHomed( H19_VALV ) ) && startPos == TRUE ) +// { +// static U32 p = 1; +// static U32 d = 0; +// +// if ( ( TRUE != isPinchValveBusy( H1_VALV ) ) && ( TRUE != isPinchValveBusy( H19_VALV ) ) ) +// { +// if ( ++d > 40 ) +// { +// d = 0; +// setPinchValvePosition( H1_VALV, (VALVE_POSITION_T)p ); +// setPinchValvePosition( H19_VALV, (VALVE_POSITION_T)p ); +// p++; +// if ( p >= NUM_OF_VALVE_POSITIONS ) +// { +// p = 1; +// } +// } +// } +// } +// if ( TRUE == startPos ) +// { +// startPos = FALSE; +// setPinchValvePosition ( H1_VALV, VALVE_POSITION_C_CLOSE ); +// setPinchValvePosition ( H19_VALV, VALVE_POSITION_B_OPEN ); +// } +//#endif // State machine for standby mode @@ -223,6 +273,7 @@ DD_OP_MODE_T ddOperationMode = getDDOpMode(); F32 bicarbConvFactor = BICARBONATE_CONVERSION_FACTOR; + // switch ( dgOperationMode ) // { // case DG_MODE_GENE: @@ -290,6 +341,7 @@ return state; } + /*********************************************************************//** * @brief * The setFluidType function sets the fluid type based on the user's