Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -rc8c95741c34a1768808a40152f0f2174bacb84ee -redea658600106142cef72c6bb60825ca90c9c80b --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision c8c95741c34a1768808a40152f0f2174bacb84ee) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision edea658600106142cef72c6bb60825ca90c9c80b) @@ -146,49 +146,56 @@ { BOOL isSuccess = TRUE; - switch( newState ) + if(newState != dialOutFlowState) { - case DIALOUT_FLOW_RUN_UF_STATE: - break; - case DIALOUT_FLOW_PAUSE_UF_STATE: - if (dialOutFlowState == DIALOUT_FLOW_STOP_STATE) - { - // We won't allow change of state to pause - newState = DIALOUT_FLOW_STOP_STATE; - isSuccess = FALSE; - } - else - { - bagStartVolumeInMl = (isNewBag == TRUE) ? 0.0 : bagStartVolumeInMl; - } - break; + switch( newState ) + { + case DIALOUT_FLOW_RUN_UF_STATE: + break; - case DIALOUT_FLOW_STOP_STATE: - if (dialOutFlowState == DIALOUT_FLOW_PAUSE_UF_STATE) - { - // We won't allow change of state to pause - newState = DIALOUT_FLOW_PAUSE_UF_STATE; + case DIALOUT_FLOW_PAUSE_UF_STATE: + if (dialOutFlowState == DIALOUT_FLOW_STOP_STATE) + { + // We won't allow change of state to pause + newState = DIALOUT_FLOW_STOP_STATE; + isSuccess = FALSE; + } + else + { + bagStartVolumeInMl = (isNewBag == TRUE) ? 0.0 : bagStartVolumeInMl; + } + break; + + case DIALOUT_FLOW_STOP_STATE: + if (dialOutFlowState == DIALOUT_FLOW_PAUSE_UF_STATE) + { + // We won't allow change of state to pause + newState = DIALOUT_FLOW_PAUSE_UF_STATE; + isSuccess = FALSE; + } + else + { + // Reset total target volume + totalTargetUFVolumeInMl = 0.0; + accumulativeTotalUFVolumeInMl = 0.0; + bagStartVolumeInMl = 0.0; + sentPWM = 0.0; + bagStartVolumeInMl = 0.0; + ResetSimulator(); + stopDialOutPump(); + } + break; + + default: + newState = dialOutFlowState; isSuccess = FALSE; - } - else - { - // Reset total target volume - totalTargetUFVolumeInMl = 0.0; - accumulativeTotalUFVolumeInMl = 0.0; - bagStartVolumeInMl = 0.0; - sentPWM = 0.0; - bagStartVolumeInMl = (isNewBag == TRUE) ? 0.0 : bagStartVolumeInMl; - ResetSimulator(); - stopDialOutPump(); - } - break; + break; + } - default: - break; + dialOutFlowState = newState; + } - dialOutFlowState = newState; - return isSuccess; } @@ -307,7 +314,7 @@ * @param signal is a measured signal enum. * @return actual signal as float. *************************************************************************/ -F32 getMeasuredVariable( DIALOUT_MEASURED_SIGNALS_T signal) +F32 ( DIALOUT_MEASURED_SIGNALS_T signal) { #define DIP_SPEED_ADC_TO_RPM_FACTOR 1.375 // conversion factor from ADC counts to RPM for dialIn pump motor #define DIP_CURRENT_ADC_TO_MA_FACTOR 2.65 // conversion factor from ADC counts to mA for dialIn pump motor Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -re7e4d0d8f84b61de25fe21ecf9aa11b2732b598d -redea658600106142cef72c6bb60825ca90c9c80b --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision e7e4d0d8f84b61de25fe21ecf9aa11b2732b598d) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision edea658600106142cef72c6bb60825ca90c9c80b) @@ -773,7 +773,7 @@ } // handle any test messages if tester has logged in successfully - if ( ( msgID > MSG_ID_FIRST_TESTER_MESSAGE ) && ( msgID <= END_OF_MSG_IDS ) /*leo-del && ( TRUE == isTestingActivated() ) */) + if ( ( msgID > MSG_ID_FIRST_TESTER_MESSAGE ) && ( msgID <= END_OF_MSG_IDS ) && ( TRUE == isTestingActivated() ) ) { switch ( msgID ) {