Example #1
0
 private async void Follow_path_Click(object sender, EventArgs e)
 {
     if (Connect_to_Brick)
     {
         OutputMess.Clear();
         OutputMess.AppendText("Following path");
         await _brick.FollowPath();
     }
     else
     {
         MessageBox.Show("Pls Type in port");
     }
 }
Example #2
0
        private async void StopButton_Click(object sender, EventArgs e)
        {
            if (Connect_to_Brick)
            {
                await _brick.Stop();

                OutputMess.Clear();
                OutputMess.AppendText("Stop");
            }
            else
            {
                MessageBox.Show("Pls Type in port");
            }
        }
Example #3
0
        private async void DropOff_Click(object sender, EventArgs e)
        {
            if (Connect_to_Brick)
            {
                await _brick.DropOff(false);

                OutputMess.Clear();
                OutputMess.AppendText("Droping off");
            }
            else
            {
                MessageBox.Show("Pls Type in port");
            }
        }
Example #4
0
        private async void PickUp_Click(object sender, EventArgs e)
        {
            if (Connect_to_Brick)
            {
                await _brick.PickUp(false);

                Debug.WriteLine("Picking Up");
                OutputMess.Clear();
                OutputMess.AppendText("Picking Up");
            }
            else
            {
                MessageBox.Show("Pls Type in port");
            }
        }
Example #5
0
        private async void _RightClicked(object sender, EventArgs e)
        {
            if (Connect_to_Brick)
            {
                await _brick.TurnRight(true, -30, 1500);

                Debug.WriteLine("Turning right");
                OutputMess.Clear();
                OutputMess.AppendText("Turning right");
            }
            else
            {
                MessageBox.Show("Pls Type in port");
            }
        }
Example #6
0
        private async void _BackwardClicked(object sender, EventArgs e)
        {
            if (Connect_to_Brick)
            {
                await _brick.MoveBackward(true, -30, 2000, 2);

                Debug.WriteLine("Moving backward");
                OutputMess.Clear();
                OutputMess.AppendText("Moving backward");
            }
            else
            {
                MessageBox.Show("Pls Type in port");
            }
        }
Example #7
0
 private void BluetoothPort_TextChanged(object sender, EventArgs e)
 {
     PortSpecified     = true;
     BluetoothPortName = BlueToothPort.Text;
     OutputMess.Clear();
 }