Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r322747d530c1b8205be257557e53dcfe9caad50a -r67731d57db9a620418b3b848d8f75ff204902c36 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 322747d530c1b8205be257557e53dcfe9caad50a) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 67731d57db9a620418b3b848d8f75ff204902c36) @@ -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 BOOL pendingStartDDPreGenRequest; ///< Flag indicating TD has requested DD start the pre generation dialysate request. 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,7 @@ void initStandbyMode( void ) { standbyState = DD_STANDBY_MODE_STATE_IDLE; - pendingStartDDRequest.data = FALSE; - pendingStartDDRequest.ovData = FALSE; - pendingStartDDRequest.ovInitData = FALSE; - pendingStartDDRequest.override = OVERRIDE_RESET; + pendingStartDDPreGenRequest = FALSE; pendingBalanceChamberSwOnlyRequest = FALSE; // pendingStartDDFlushRequest = FALSE; // pendingStartDDHeatDisinfectRequest = FALSE; @@ -119,11 +116,6 @@ *************************************************************************/ U32 execStandbyMode( void ) { - if ( TRUE == areInletWaterConditionsAlarmsActive() ) - { - standbyState = DD_STANDBY_MODE_STATE_PAUSE; - } - // execute current Standby state switch ( standbyState ) { @@ -146,34 +138,9 @@ /*********************************************************************//** * @brief - * The areInletWaterConditionsAlarmsActive function checks whether the inlet - * water pressure conditions are out of range and any of their alarms are active. - * @details \b Inputs: Input and Output pressure of water inlet pressur regulator. - * @details \b Outputs: None - * @return TRUE if any of the alarms are active, otherwise, FALSE - *************************************************************************/ -BOOL areInletWaterConditionsAlarmsActive( void ) -{ - BOOL status = FALSE; - - //TODO: testing - Comment water pressure check - // Check Inlet Water Pressure - both Water inlet pressure Input, pressure Output after pressure regulator. - // checkInletWaterPressure(); - - // Check any active alarms - status |= isAlarmActive( ALARM_ID_DD_INLET_WATER_PRESSURE_OUT_LOW_RANGE ); - status |= isAlarmActive( ALARM_ID_DD_INLET_WATER_PRESSURE_OUT_HIGH_RANGE ); - status |= isAlarmActive( ALARM_ID_DD_INLET_WATER_PRESSURE_IN_HIGH_RANGE ); - status |= isAlarmActive( ALARM_ID_DD_INLET_WATER_PRESSURE_IN_LOW_RANGE ); - - return status; -} - -/*********************************************************************//** - * @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, @@ -192,10 +159,10 @@ // { // define the alarm // } - if ( TRUE == getU32OverrideValue( &pendingStartDDRequest ) ) + if ( TRUE == pendingStartDDPreGenRequest ) { - pendingStartDDRequest.data = FALSE; - requestNewOperationMode( DD_MODE_GEND ); + pendingStartDDPreGenRequest = FALSE; + requestNewOperationMode( DD_MODE_PREG ); } //Test request to handle only balancing chamber switching else if ( TRUE == pendingBalanceChamberSwOnlyRequest ) @@ -238,29 +205,25 @@ { DD_STANDBY_MODE_STATE_T state = DD_STANDBY_MODE_STATE_PAUSE; - if ( FALSE == areInletWaterConditionsAlarmsActive() ) - { - state = DD_STANDBY_MODE_STATE_IDLE; - } - return state; } /*********************************************************************//** * @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 = TRUE; } return result; @@ -501,21 +464,4 @@ *************************************************************************/ -/*********************************************************************//** - * @brief - * The testDDstartGenDialysateOverride function sets the override value - * to start the gen dialysate operation mode. - * @details Inputs: pendingStartDDRequest - * @details Outputs: pendingStartDDRequest - * @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 result = u32Override( message, &pendingStartDDRequest, FALSE, TRUE ); - - return result; -} - /**@}*/