Exemple #1
0
 private void OnForwardTimerElapsed(object sender, EventArgs e)
 {
     _forwardTimer.Reset();
     Backward();
     _state = MoveState.MoveBack;
     _backwardTimer.Start();
 }
Exemple #2
0
 //Start timed motor movement or continue movement if paused.
 public void Play()
 {
     _stopping = false; //allows user to cancel rolling stop by pressing play again.
     if (_state == MoveState.Start)
     {
         _state = MoveState.MoveFwd;
         Forward();
         if (!LimitMode)
         {
             CheckIntervalChange();
             _forwardTimer.Start();
         }
     }
     else if (_state == MoveState.PauseBack || _state == MoveState.PauseFwd)
     {
         Continue();
     }
 }