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 TLDTracker(int device) { this.device = device; controller = ServoController.getInstance(); }