Esempio n. 1
0
        private void BUT_MagCalibration_Click(object sender, EventArgs e)
        {
            if (!MainV2.comPort.BaseStream.IsOpen)
            {
                CustomMessageBox.Show(Strings.ErrorNotConnected, Strings.ERROR);
                Wizard.instance.Close();
            }

            try
            {
                MainV2.comPort.MAV.cs.ratesensors = 2;

                MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.EXTRA3, MainV2.comPort.MAV.cs.ratesensors);
                MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.RAW_SENSORS, MainV2.comPort.MAV.cs.ratesensors);

                MainV2.comPort.setParam("MAG_ENABLE", 1);
            }
            catch
            {
                CustomMessageBox.Show(Strings.ErrorNotConnected, Strings.ERROR);
                Wizard.instance.Close();
            }

            MagCalib.DoGUIMagCalib();
        }
Esempio n. 2
0
        private void BUT_MagCalibration_Click(object sender, EventArgs e)
        {
            if (!MainV2.comPort.BaseStream.IsOpen)
            {
                CustomMessageBox.Show("You are no longer connected to the board\n the wizard will now exit", "Error");
                Wizard.instance.Close();
            }

            try
            {
                MainV2.comPort.MAV.cs.ratesensors = 2;

                MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.EXTRA3, MainV2.comPort.MAV.cs.ratesensors);
                MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.RAW_SENSORS, MainV2.comPort.MAV.cs.ratesensors);

                MainV2.comPort.setParam("MAG_ENABLE", 1);
            }
            catch
            {
                CustomMessageBox.Show("You are no longer connected to the board\n the wizard will now exit", "Error");
                Wizard.instance.Close();
            }

            MagCalib.DoGUIMagCalib();
        }
 private void BUT_MagCalibration_Click(object sender, EventArgs e)
 {
     MagCalib.DoGUIMagCalib();
 }
Esempio n. 4
0
 private void BUT_MagCalibration_Click(object sender, EventArgs e)
 {
     MagCalib.DoGUIMagCalib();
     Activate(); // Necessary to refresh offset values displayed on form
 }