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"); } }
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"); } }
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"); } }
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"); } }
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"); } }
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"); } }