ardupilot/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.cs
Michael Oborne 5dfb1bd129 Mission Planner 1.2.12
add arduino chip detect
fix apm2,2.5 dialog test
add write timeout. this will stop planner hangs on bad serial devices.
change quickview decimal places to 0.00
fix map clicking issue.
fix wind direction wrapping
add airspeed use
modify firmware screen from Marooned
major flightdata tab change.
add save/load polygon from file
add some error handling dialogs
2012-09-20 07:37:36 +08:00

54 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ArdupilotMega.Controls.BackstageView;
using ArdupilotMega.Controls;
namespace ArdupilotMega.GCSViews.ConfigurationView
{
public partial class ConfigFailSafe : UserControl, IActivate, IDeactivate
{
Timer timer = new Timer();
public ConfigFailSafe()
{
InitializeComponent();
mavlinkCheckBox1.setup(1, 0, "THR_FAILSAFE", MainV2.comPort.param);
mavlinkNumericUpDown1.setup(800, 1200, 1, 1, "THR_FS_VALUE", MainV2.comPort.param);
// setup rc update
timer.Tick += new EventHandler(timer_Tick);
}
public void Deactivate()
{
timer.Stop();
}
void timer_Tick(object sender, EventArgs e)
{
// update all linked controls - 10hz
try
{
MainV2.cs.UpdateCurrentSettings(currentStateBindingSource);
}
catch { }
}
public void Activate()
{
timer.Enabled = true;
timer.Interval = 100;
timer.Start();
CustomMessageBox.Show("Ensure your props are not on the Plane/Quad","FailSafe",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}
}
}