Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -rf5baeac6a5f000705cd51e4779a967acf4088981 -re12eefac42a3806a34f3ddac6df30bbb5ca51f6f --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision f5baeac6a5f000705cd51e4779a967acf4088981) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision e12eefac42a3806a34f3ddac6df30bbb5ca51f6f) @@ -43,7 +43,7 @@ static DD_STANDBY_MODE_STATE_T standbyState; ///< Currently active standby state. -static OVERRIDE_U32_T pendingStartDDRequest; ///< Flag indicating TD has requested DD start the dialysis delivery(Overridable). +static OVERRIDE_U32_T pendingStartDDPreGenRequest; ///< Flag indicating TD has requested DD start the pre generation dialysate request(Overridable). static BOOL pendingBalanceChamberSwOnlyRequest; ///< Flag indicating balancing chamber switch only request. //static BOOL pendingStartDDFlushRequest; ///< Flag indicating TD has requested DD start flush. //static BOOL pendingStartDDHeatDisinfectRequest; ///< Flag indicating TD has requested DD start heat disinfect. @@ -65,10 +65,10 @@ void initStandbyMode( void ) { standbyState = DD_STANDBY_MODE_STATE_IDLE; - pendingStartDDRequest.data = FALSE; - pendingStartDDRequest.ovData = FALSE; - pendingStartDDRequest.ovInitData = FALSE; - pendingStartDDRequest.override = OVERRIDE_RESET; + pendingStartDDPreGenRequest.data = FALSE; + pendingStartDDPreGenRequest.ovData = FALSE; + pendingStartDDPreGenRequest.ovInitData = FALSE; + pendingStartDDPreGenRequest.override = OVERRIDE_RESET; pendingBalanceChamberSwOnlyRequest = FALSE; // pendingStartDDFlushRequest = FALSE; // pendingStartDDHeatDisinfectRequest = FALSE; @@ -173,7 +173,7 @@ * @brief * The handleStandbyIdleState function executes the idle state of the * standby mode state machine. - * @details \b Inputs: pendingSampleWaterRequest, pendingStartDDRequest, + * @details \b Inputs: pendingSampleWaterRequest, pendingStartDDPreGenRequest, * pendingStartDDFlushRequest, pendingStartDDHeatDisinfectRequest, * pendingStartDDChemicalDisinfectRequest * @details \b Outputs: Idle state of the standby mode executed, @@ -187,26 +187,26 @@ { DD_STANDBY_MODE_STATE_T state = DD_STANDBY_MODE_STATE_IDLE; - //TODO : Testing - commenting solo mode for now - - // go to standby solo mode if TD is turned off or stops communicating. + //TODO : Define comm loss alarm when TD is turned off or stops communicating // if ( FALSE == isTDCommunicating() ) -// { // TODO if TD comm loss, do we need solo standby? -// SEND_EVENT_WITH_2_U32_DATA( DD_EVENT_TD_COMMUNICATION_LOSS, 0, 0 ) -// //requestNewOperationMode( DD_MODE_SOLO ); +// { + // define the alarm // } -// else if ( TRUE == getU32OverrideValue( &pendingStartDDRequest ) ) - - if ( TRUE == getU32OverrideValue( &pendingStartDDRequest ) ) + if ( TRUE == getU32OverrideValue( &pendingStartDDPreGenRequest ) ) { - pendingStartDDRequest.data = FALSE; - requestNewOperationMode( DD_MODE_GEND ); + pendingStartDDPreGenRequest.data = FALSE; + requestNewOperationMode( DD_MODE_PREG ); } //Test request to handle only balancing chamber switching else if ( TRUE == pendingBalanceChamberSwOnlyRequest ) { execBalancingChamberControl(); } + //Test request to handle only balancing chamber switching + else if ( TRUE == pendingBalanceChamberSwOnlyRequest ) + { + execBalancingChamberControl(); + } // else if ( TRUE == pendingStartDDFlushRequest ) // { // pendingStartDDFlushRequest = FALSE; @@ -253,19 +253,20 @@ /*********************************************************************//** * @brief - * The requestDDStart function handles an TD request to start (go to generation dialysis mode). + * The requestDDPreGenStart function handles an TD request to start/ + * go to pre generation dialysis mode. * @details \b Inputs: standbyState - * @details \b Outputs: pendingStartDDRequest + * @details \b Outputs: pendingStartDDPreGenRequest * @return TRUE if request accepted, FALSE if not. *************************************************************************/ -BOOL requestDDStart( void ) +BOOL requestDDPreGenStart( void ) { BOOL result = FALSE; if ( DD_STANDBY_MODE_STATE_IDLE == standbyState ) { - result = TRUE; - pendingStartDDRequest.data = TRUE; + result = TRUE; + pendingStartDDPreGenRequest.data = TRUE; } return result; @@ -508,17 +509,17 @@ /*********************************************************************//** * @brief - * The testDDstartGenDialysateOverride function sets the override value - * to start the gen dialysate operation mode. - * @details Inputs: pendingStartDDRequest - * @details Outputs: pendingStartDDRequest + * The testDDStartPreGenDialysateOverride function sets the override value + * to start the pre-gen dialysate operation mode. + * @details Inputs: pendingStartDDPreGenRequest + * @details Outputs: pendingStartDDPreGenRequest * @param message Override message from Dialin which includes the flag * to override the operation mode. * @return TRUE if override successful, FALSE if not *************************************************************************/ -BOOL testDDstartGenDialysateOverride( MESSAGE_T *message ) +BOOL testDDStartPreGenDialysateOverride( MESSAGE_T *message ) { - BOOL result = u32Override( message, &pendingStartDDRequest, FALSE, TRUE ); + BOOL result = u32Override( message, &pendingStartDDPreGenRequest, FALSE, TRUE ); return result; }