Esempio n. 1
0
        private void BUT_start_Click(object sender, EventArgs e)
        {
            ((MyButton)sender).Enabled = false;
            BUT_continue.Enabled       = true;

            busy = true;

            try
            {
                // start the process off
                MainV2.comPort.doCommand(MAVLink.MAV_CMD.PREFLIGHT_CALIBRATION, 0, 0, 0, 0, 1, 0, 0);
                MainV2.comPort.giveComport = true;
            }
            catch
            {
                busy = false;
                CustomMessageBox.Show(Strings.ErrorNoResponce, Strings.ERROR);
                return;
            }

            // start thread to update display
            System.Threading.ThreadPool.QueueUserWorkItem(readmessage, this);

            BUT_continue.Focus();
        }
Esempio n. 2
0
        private void BUT_start_Click(object sender, EventArgs e)
        {
            ((MyButton)sender).Enabled = false;
            BUT_continue.Enabled       = true;

            // start the process off
            MainV2.comPort.doCommand(MAVLink.MAV_CMD.PREFLIGHT_CALIBRATION, 0, 0, 0, 0, 1, 0, 0);
            MainV2.comPort.giveComport = true;

            // start thread to update display
            System.Threading.ThreadPool.QueueUserWorkItem(readmessage, this);

            BUT_continue.Focus();
        }
Esempio n. 3
0
        private void BUT_start_Click(object sender, EventArgs e)
        {
            ((MyButton)sender).Enabled = false;
            BUT_continue.Enabled       = true;

            busy = true;

            try
            {
                // start the process off
                MainV2.comPort.doCommand(MAVLink.MAV_CMD.PREFLIGHT_CALIBRATION, 0, 0, 0, 0, 1, 0, 0);

                MainV2.comPort.SubscribeToPacketType(MAVLink.MAVLINK_MSG_ID.STATUSTEXT, receivedPacket);
            }
            catch
            {
                busy = false;
                CustomMessageBox.Show(Strings.ErrorNoResponce, Strings.ERROR);
                return;
            }

            BUT_continue.Focus();
        }