Esempio n. 1
0
        // Move fuctions
        private void StopMovement()
        {
            MotorSpeedModels speed = new MotorSpeedModels();

            speed.ForwardSpeed  = 0;
            speed.BackwardSpeed = 0;
            speed.LeftSpeed     = 0;
            speed.RightSpeed    = 0;
            MovementTimer.Stop();
            LemurianHub.LemurianMove("stop", speed);
        }
Esempio n. 2
0
        private void MoveFunctions(string timer, string direction, MotorSpeedModels speed)
        {
            MovementTimer.Stop();

            if (direction == "Stop")
            {
                MovementStatus = false;
            }
            else
            {
                MovementStatus = true;
            }

            if (MovementStatus & direction != "Stop")
            {
                MovementTimer.Interval = Convert.ToInt32(timer) * 1000;
                LemurianHub.LemurianMove(direction.ToLower(), speed);
                MovementTimer.Start();
            }
            else
            {
                StopMovement();
            }
        }