public UAS() { servoController = ServoController.getInstance(); servoController.setBaudRate(115200); InitializeComponent(); List <string> devices = WebCamService.Capture.getDevices(); foreach (string device in devices) { cameraBox.Items.Add(device); } foreach (string port in SerialPort.GetPortNames()) { portNameBox.Items.Add(port); } if (!hud1.Visible) { hud1.Visible = true; } if (!hud1.Enabled) { hud1.Enabled = true; } if (!hud1.hudon) { hud1.hudon = true; } ConnectHandler = new EventHandler(UAS_Connect); myhud = hud1; myhud = hud1; timer = new System.Timers.Timer(3000); timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); hTrackBar.Maximum = 150; hTrackBar.Minimum = 50; hTrackBar.Value = 100; vTrackBar.Maximum = 150; vTrackBar.Minimum = 50; vTrackBar.Value = 100; pitchLabel.Text = "Pitch: " + vTrackBar.Value; rollLabel.Text = "Roll: " + hTrackBar.Value; stabroll = true; stabpitch = true; stabyaw = true; mountMode = MAVLink.MAV_MOUNT_MODE.NEUTRAL; }
public UAS() { InitializeComponent(); if (!hud1.Visible) { hud1.Visible = true; } if (!hud1.Enabled) { hud1.Enabled = true; } if (!hud1.hudon) { hud1.hudon = true; } /*vTrackBar.Enabled = false; * hTrackBar.Enabled = false; * reset.Enabled = false; * modeBox.Enabled = false; * stabilityCheck.Enabled = false; * stabpitchCheck.Enabled = false; * stabyawCheck.Enabled = false; * compModeBar.Enabled = false;*/ ConnectHandler = new EventHandler(UAS_Connect); myhud = hud1; myhud = hud1; timer = new System.Timers.Timer(3000); timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); hTrackBar.Maximum = 9000; hTrackBar.Minimum = -9000; hTrackBar.Value = 0; vTrackBar.Maximum = 0; vTrackBar.Minimum = -9000; vTrackBar.Value = -4500; pitchLabel.Text = "Pitch: " + vTrackBar.Value / 100; rollLabel.Text = "Roll: " + hTrackBar.Value / 100; stabroll = true; stabpitch = true; stabyaw = true; mountMode = MAVLink.MAV_MOUNT_MODE.NEUTRAL; }
public UAS() { servoController = ServoController.getInstance(); servoController.setBaudRate(115200); InitializeComponent(); List<string> devices = WebCamService.Capture.getDevices(); foreach (string device in devices) { cameraBox.Items.Add(device); } foreach (string port in SerialPort.GetPortNames()) { portNameBox.Items.Add(port); } if (!hud1.Visible) hud1.Visible = true; if (!hud1.Enabled) hud1.Enabled = true; if (!hud1.hudon) hud1.hudon = true; ConnectHandler = new EventHandler(UAS_Connect); myhud = hud1; myhud = hud1; timer = new System.Timers.Timer(3000); timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); hTrackBar.Maximum = 150; hTrackBar.Minimum = 50; hTrackBar.Value = 100; vTrackBar.Maximum = 150; vTrackBar.Minimum = 50; vTrackBar.Value = 100; pitchLabel.Text = "Pitch: " + vTrackBar.Value; rollLabel.Text = "Roll: " + hTrackBar.Value; stabroll = true; stabpitch = true; stabyaw = true; mountMode = MAVLink.MAV_MOUNT_MODE.NEUTRAL; }
public UAS() { InitializeComponent(); if (!hud1.Visible) hud1.Visible = true; if (!hud1.Enabled) hud1.Enabled = true; if (!hud1.hudon) hud1.hudon = true; /*vTrackBar.Enabled = false; hTrackBar.Enabled = false; reset.Enabled = false; modeBox.Enabled = false; stabilityCheck.Enabled = false; stabpitchCheck.Enabled = false; stabyawCheck.Enabled = false; compModeBar.Enabled = false;*/ ConnectHandler = new EventHandler(UAS_Connect); myhud = hud1; myhud = hud1; timer = new System.Timers.Timer(3000); timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); hTrackBar.Maximum = 9000; hTrackBar.Minimum = -9000; hTrackBar.Value = 0; vTrackBar.Maximum = 0; vTrackBar.Minimum = -9000; vTrackBar.Value = -4500; pitchLabel.Text = "Pitch: " + vTrackBar.Value / 100; rollLabel.Text = "Roll: " + hTrackBar.Value / 100; stabroll = true; stabpitch = true; stabyaw = true; mountMode = MAVLink.MAV_MOUNT_MODE.NEUTRAL; }
private void modeBox_SelectedIndexChanged(object sender, EventArgs e) { mountMode = (MAVLink.MAV_MOUNT_MODE)Enum.Parse(typeof(MAVLink.MAV_MOUNT_MODE), modeBox.Text); MainV2.comPort.setMountConfigure(mountMode, stabroll, stabpitch, stabyaw); }
private void modeBox_SelectedIndexChanged(object sender, EventArgs e) { mountMode = (MAVLink.MAV_MOUNT_MODE) Enum.Parse(typeof(MAVLink.MAV_MOUNT_MODE), modeBox.Text); MainV2.comPort.setMountConfigure(mountMode, stabroll, stabpitch, stabyaw); }