diff --git a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj
index 72c896177c..230d5f31d8 100644
--- a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj
+++ b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj
@@ -271,6 +271,12 @@
QuickView.cs
+
+ Form
+
+
+ SerialOutput2.cs
+
UserControl
@@ -693,6 +699,9 @@
QuickView.cs
+
+ SerialOutput2.cs
+
ConfigAccelerometerCalibrationQuad.cs
diff --git a/Tools/ArdupilotMegaPlanner/Comms/CommsTCPSerial.cs b/Tools/ArdupilotMegaPlanner/Comms/CommsTCPSerial.cs
index 8a6ee0729f..c419b73b9b 100644
--- a/Tools/ArdupilotMegaPlanner/Comms/CommsTCPSerial.cs
+++ b/Tools/ArdupilotMegaPlanner/Comms/CommsTCPSerial.cs
@@ -16,7 +16,6 @@ namespace ArdupilotMega.Comms
{
private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
TcpClient client = new TcpClient();
- BufferedStream clientbuf;
IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any, 0);
int retrys = 3;
@@ -95,7 +94,7 @@ namespace ArdupilotMega.Comms
if (ArdupilotMega.MainV2.config["TCP_host"] != null)
host = ArdupilotMega.MainV2.config["TCP_host"].ToString();
- if (!MainV2.MONO)
+ //if (!MainV2.MONO)
{
if (System.Windows.Forms.DialogResult.Cancel == ArdupilotMega.Common.InputBox("remote host", "Enter host name/ip (ensure remote end is already started)", ref host))
{
@@ -117,8 +116,6 @@ namespace ArdupilotMega.Comms
client.NoDelay = true;
client.Client.NoDelay = true;
- clientbuf = new BufferedStream(client.GetStream());
-
VerifyConnected();
return;
@@ -139,7 +136,6 @@ namespace ArdupilotMega.Comms
{
log.Info("tcp reconnect");
client.Connect(ArdupilotMega.MainV2.config["TCP_host"].ToString(), int.Parse(ArdupilotMega.MainV2.config["TCP_port"].ToString()));
- clientbuf = new BufferedStream(client.GetStream());
retrys--;
}
diff --git a/Tools/ArdupilotMegaPlanner/Controls/HUD.cs b/Tools/ArdupilotMegaPlanner/Controls/HUD.cs
index 88d7e48fd8..311596edd0 100644
--- a/Tools/ArdupilotMegaPlanner/Controls/HUD.cs
+++ b/Tools/ArdupilotMegaPlanner/Controls/HUD.cs
@@ -29,7 +29,7 @@ namespace ArdupilotMega.Controls
object paintlock = new object();
object streamlock = new object();
MemoryStream _streamjpg = new MemoryStream();
- [System.ComponentModel.Browsable(false)]
+ //[System.ComponentModel.Browsable(false)]
public MemoryStream streamjpg { get { lock (streamlock) { return _streamjpg; } } set { lock (streamlock) { _streamjpg = value; } } }
///
/// this is to reduce cpu usage
diff --git a/Tools/ArdupilotMegaPlanner/Controls/ValuesControl.Designer.cs b/Tools/ArdupilotMegaPlanner/Controls/ValuesControl.Designer.cs
index 387d57a490..514ad1c950 100644
--- a/Tools/ArdupilotMegaPlanner/Controls/ValuesControl.Designer.cs
+++ b/Tools/ArdupilotMegaPlanner/Controls/ValuesControl.Designer.cs
@@ -28,69 +28,69 @@
///
private void InitializeComponent()
{
- this.comboBox1 = new System.Windows.Forms.ComboBox();
- this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
- this.label1 = new System.Windows.Forms.Label();
- this.myLabel1 = new ArdupilotMega.Controls.MyLabel();
- this.tableLayoutPanel1.SuspendLayout();
- this.SuspendLayout();
- //
- // comboBox1
- //
- this.comboBox1.FormattingEnabled = true;
- this.comboBox1.Location = new System.Drawing.Point(3, 21);
- this.comboBox1.Name = "comboBox1";
- this.comboBox1.Size = new System.Drawing.Size(206, 21);
- this.comboBox1.TabIndex = 1;
- //
- // tableLayoutPanel1
- //
- this.tableLayoutPanel1.AutoSize = true;
- this.tableLayoutPanel1.ColumnCount = 1;
- this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tableLayoutPanel1.Controls.Add(this.comboBox1, 0, 1);
- this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
- this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 28);
- this.tableLayoutPanel1.Name = "tableLayoutPanel1";
- this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 5, 0, 10);
- this.tableLayoutPanel1.RowCount = 2;
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.Size = new System.Drawing.Size(471, 55);
- this.tableLayoutPanel1.TabIndex = 2;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(3, 5);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(35, 13);
- this.label1.TabIndex = 0;
- this.label1.Text = "label1";
- //
- // myLabel1
- //
- this.myLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.myLabel1.Location = new System.Drawing.Point(4, 3);
- this.myLabel1.Name = "myLabel1";
- this.myLabel1.resize = false;
- this.myLabel1.Size = new System.Drawing.Size(206, 23);
- this.myLabel1.TabIndex = 0;
- this.myLabel1.Text = "myLabel1";
- //
- // ValuesControl
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.AutoSize = true;
- this.Controls.Add(this.tableLayoutPanel1);
- this.Controls.Add(this.myLabel1);
- this.Name = "ValuesControl";
- this.Size = new System.Drawing.Size(478, 108);
- this.tableLayoutPanel1.ResumeLayout(false);
- this.tableLayoutPanel1.PerformLayout();
- this.ResumeLayout(false);
- this.PerformLayout();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.label1 = new System.Windows.Forms.Label();
+ this.myLabel1 = new ArdupilotMega.Controls.MyLabel();
+ this.tableLayoutPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(3, 21);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(206, 21);
+ this.comboBox1.TabIndex = 1;
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.AutoSize = true;
+ this.tableLayoutPanel1.ColumnCount = 1;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+ this.tableLayoutPanel1.Controls.Add(this.comboBox1, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 28);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 5, 0, 10);
+ this.tableLayoutPanel1.RowCount = 2;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(471, 55);
+ this.tableLayoutPanel1.TabIndex = 2;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(3, 5);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(35, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "label1";
+ //
+ // myLabel1
+ //
+ this.myLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.myLabel1.Location = new System.Drawing.Point(4, 3);
+ this.myLabel1.Name = "myLabel1";
+ this.myLabel1.resize = false;
+ this.myLabel1.Size = new System.Drawing.Size(471, 23);
+ this.myLabel1.TabIndex = 0;
+ this.myLabel1.Text = "myLabel1";
+ //
+ // ValuesControl
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoSize = true;
+ this.Controls.Add(this.tableLayoutPanel1);
+ this.Controls.Add(this.myLabel1);
+ this.Name = "ValuesControl";
+ this.Size = new System.Drawing.Size(478, 108);
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanel1.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
}
diff --git a/Tools/ArdupilotMegaPlanner/CurrentState.cs b/Tools/ArdupilotMegaPlanner/CurrentState.cs
index 10c4d93494..100905f329 100644
--- a/Tools/ArdupilotMegaPlanner/CurrentState.cs
+++ b/Tools/ArdupilotMegaPlanner/CurrentState.cs
@@ -206,18 +206,23 @@ namespace ArdupilotMega
public float HomeAlt { get { return (float)HomeLocation.Alt; } set { } }
internal PointLatLngAlt HomeLocation = new PointLatLngAlt();
+ PointLatLngAlt _trackerloc = new PointLatLngAlt();
+ internal PointLatLngAlt TrackerLocation { get { if (_trackerloc.Lng != 0) return _trackerloc; return HomeLocation; } set { _trackerloc = value; } }
+
+ internal PointLatLngAlt GuidedModeWP = new PointLatLngAlt();
+
public float DistToMAV
{
get
{
// shrinking factor for longitude going to poles direction
- double rads = Math.Abs(HomeLocation.Lat) * 0.0174532925;
+ double rads = Math.Abs(TrackerLocation.Lat) * 0.0174532925;
double scaleLongDown = Math.Cos(rads);
double scaleLongUp = 1.0f / Math.Cos(rads);
//DST to Home
- double dstlat = Math.Abs(HomeLocation.Lat - lat) * 111319.5;
- double dstlon = Math.Abs(HomeLocation.Lng - lng) * 111319.5 * scaleLongDown;
+ double dstlat = Math.Abs(TrackerLocation.Lat - lat) * 111319.5;
+ double dstlon = Math.Abs(TrackerLocation.Lng - lng) * 111319.5 * scaleLongDown;
return (float)Math.Sqrt((dstlat * dstlat) + (dstlon * dstlon));
}
}
@@ -231,7 +236,7 @@ namespace ArdupilotMega
if (dist < 5)
return 0;
- float altdiff = (float)(alt - HomeLocation.Alt);
+ float altdiff = (float)(alt - TrackerLocation.Alt);
float angle = (float)Math.Atan(altdiff / dist) * rad2deg;
@@ -244,13 +249,13 @@ namespace ArdupilotMega
get
{
// shrinking factor for longitude going to poles direction
- double rads = Math.Abs(HomeLocation.Lat) * 0.0174532925;
+ double rads = Math.Abs(TrackerLocation.Lat) * 0.0174532925;
double scaleLongDown = Math.Cos(rads);
double scaleLongUp = 1.0f / Math.Cos(rads);
//DIR to Home
- double dstlon = (HomeLocation.Lng - lng); //OffSet_X
- double dstlat = (HomeLocation.Lat - lat) * scaleLongUp; //OffSet Y
+ double dstlon = (TrackerLocation.Lng - lng); //OffSet_X
+ double dstlat = (TrackerLocation.Lat - lat) * scaleLongUp; //OffSet Y
double bearing = 90 + (Math.Atan2(dstlat, -dstlon) * 57.295775); //absolut home direction
if (bearing < 0) bearing += 360;//normalization
//bearing = bearing - 180;//absolut return direction
diff --git a/Tools/ArdupilotMegaPlanner/FollowMe.cs b/Tools/ArdupilotMegaPlanner/FollowMe.cs
index e92baf2c22..63e7525890 100644
--- a/Tools/ArdupilotMegaPlanner/FollowMe.cs
+++ b/Tools/ArdupilotMegaPlanner/FollowMe.cs
@@ -161,7 +161,7 @@ namespace ArdupilotMega
MainV2.comPort.setGuidedModeWP(gotohere);
- GCSViews.FlightData.GuidedModeWP = new PointLatLngAlt(gotohere);
+ MainV2.cs.GuidedModeWP = new PointLatLngAlt(gotohere);
MainV2.giveComport = false;
}
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigArducopter.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigArducopter.resx
index 5f85ba9576..68fb0402b5 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigArducopter.resx
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigArducopter.resx
@@ -135,7 +135,7 @@
myLabel3
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4585.13688, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4607.22021, Culture=neutral, PublicKeyToken=null
$this
@@ -201,7 +201,7 @@
myLabel2
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4585.13688, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4607.22021, Culture=neutral, PublicKeyToken=null
$this
@@ -312,7 +312,7 @@
myLabel1
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4585.13688, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4607.22021, Culture=neutral, PublicKeyToken=null
$this
@@ -2506,7 +2506,7 @@
BUT_writePIDS
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4585.13688, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4607.22021, Culture=neutral, PublicKeyToken=null
$this
@@ -2536,7 +2536,7 @@
BUT_rerequestparams
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4585.13688, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4607.22021, Culture=neutral, PublicKeyToken=null
$this
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigBatteryMonitoring.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigBatteryMonitoring.cs
index c420b57305..25c7285a3d 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigBatteryMonitoring.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigBatteryMonitoring.cs
@@ -293,26 +293,6 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
{
CMB_batmontype.SelectedIndex = getIndex(CMB_batmontype, (int)float.Parse(MainV2.comPort.param["BATT_MONITOR"].ToString()));
}
-
- // ignore language re . vs ,
-
- if (TXT_ampspervolt.Text == (13.6612).ToString())
- {
- CMB_batmonsensortype.SelectedIndex = 1;
- }
- else if (TXT_ampspervolt.Text == (27.3224).ToString())
- {
- CMB_batmonsensortype.SelectedIndex = 2;
- }
- else if (TXT_ampspervolt.Text == (54.64481).ToString())
- {
- CMB_batmonsensortype.SelectedIndex = 3;
- }
- else
- {
- CMB_batmonsensortype.SelectedIndex = 0;
- }
-
}
if (MainV2.comPort.param["BATT_CAPACITY"] != null)
@@ -339,6 +319,25 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
TXT_ampspervolt.Enabled = false;
}
+ // ignore language re . vs ,
+
+ if (TXT_ampspervolt.Text == (13.6612).ToString())
+ {
+ CMB_batmonsensortype.SelectedIndex = 1;
+ }
+ else if (TXT_ampspervolt.Text == (27.3224).ToString())
+ {
+ CMB_batmonsensortype.SelectedIndex = 2;
+ }
+ else if (TXT_ampspervolt.Text == (54.64481).ToString())
+ {
+ CMB_batmonsensortype.SelectedIndex = 3;
+ }
+ else
+ {
+ CMB_batmonsensortype.SelectedIndex = 0;
+ }
+
startup = false;
timer1.Start();
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFriendlyParams.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFriendlyParams.cs
index 3f61ed158d..41c67c786d 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFriendlyParams.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFriendlyParams.cs
@@ -198,6 +198,8 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
catch (Exception exp) { log.Error(exp); } // just to cleanup any errors
}
+ this.SuspendLayout();
+
_params.OrderBy(x => x.Key).ForEach(x =>
{
if(!String.IsNullOrEmpty(x.Key))
@@ -327,6 +329,8 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
});
ThemeManager.ApplyThemeTo(this);
+
+ this.ResumeLayout();
}
///
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/Firmware.cs b/Tools/ArdupilotMegaPlanner/GCSViews/Firmware.cs
index 4b5e0bd23e..1696caac65 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/Firmware.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/Firmware.cs
@@ -416,7 +416,7 @@ namespace ArdupilotMega.GCSViews
// Create a request using a URL that can receive a post.
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://vps.oborne.me/axs/ax.pl?" + (string)temp);
//request.AllowAutoRedirect = true;
- request.UserAgent = MainV2.instance.Text + " (res" + MainV2.instance.Width + "x" + MainV2.instance.Height + "; " + Environment.OSVersion.VersionString + ")";
+ request.UserAgent = MainV2.instance.Text + " (res" + Screen.PrimaryScreen.Bounds.Width + "x" + Screen.PrimaryScreen.Bounds.Height + "; " + Environment.OSVersion.VersionString + "; cores " + Environment.ProcessorCount + ")";
request.Timeout = 10000;
// Set the Method property of the request to POST.
request.Method = "GET";
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs
index def244e843..41e5ef651b 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs
@@ -80,8 +80,6 @@ namespace ArdupilotMega.GCSViews
bool playingLog = false;
double LogPlayBackSpeed = 1.0;
- public static PointLatLngAlt GuidedModeWP = new PointLatLngAlt();
-
AviWriter aviwriter;
public SplitContainer MainHcopy = null;
@@ -569,9 +567,9 @@ namespace ArdupilotMega.GCSViews
routes.Markers.Add( new GMapMarkerCross(currentloc));
}
- if (MainV2.cs.mode.ToLower() == "guided" && GuidedModeWP != null && GuidedModeWP.Lat != 0)
+ if (MainV2.cs.mode.ToLower() == "guided" && MainV2.cs.GuidedModeWP != null && MainV2.cs.GuidedModeWP.Lat != 0)
{
- addpolygonmarker("Guided Mode", GuidedModeWP.Lng, GuidedModeWP.Lat, (int)GuidedModeWP.Alt, Color.Blue, routes);
+ addpolygonmarker("Guided Mode", MainV2.cs.GuidedModeWP.Lng, MainV2.cs.GuidedModeWP.Lat, (int)MainV2.cs.GuidedModeWP.Alt, Color.Blue, routes);
}
if (MainV2.cs.firmware == MainV2.Firmwares.ArduPlane)
@@ -1045,11 +1043,11 @@ namespace ArdupilotMega.GCSViews
return;
}
- if (GuidedModeWP.Alt == 0)
+ if (MainV2.cs.GuidedModeWP.Alt == 0)
{
flyToHereAltToolStripMenuItem_Click(null, null);
- if (GuidedModeWP.Alt == 0)
+ if (MainV2.cs.GuidedModeWP.Alt == 0)
return;
}
@@ -1062,7 +1060,7 @@ namespace ArdupilotMega.GCSViews
Locationwp gotohere = new Locationwp();
gotohere.id = (byte)MAVLink.MAV_CMD.WAYPOINT;
- gotohere.alt = (float)(GuidedModeWP.Alt); // back to m
+ gotohere.alt = (float)(MainV2.cs.GuidedModeWP.Alt); // back to m
gotohere.lat = (float)(gotolocation.Lat);
gotohere.lng = (float)(gotolocation.Lng);
@@ -1070,7 +1068,7 @@ namespace ArdupilotMega.GCSViews
{
MainV2.comPort.setGuidedModeWP(gotohere);
- GuidedModeWP = new PointLatLngAlt(gotohere.lat, gotohere.lng, gotohere.alt,"Guided Mode");
+ MainV2.cs.GuidedModeWP = new PointLatLngAlt(gotohere.lat, gotohere.lng, gotohere.alt, "Guided Mode");
}
catch (Exception ex) { MainV2.giveComport = false; CustomMessageBox.Show("Error sending command : " + ex.Message); }
@@ -2162,11 +2160,11 @@ print 'Roll complete'
return;
}
- GuidedModeWP.Alt = intalt;
+ MainV2.cs.GuidedModeWP.Alt = intalt;
if (MainV2.cs.mode == "Guided")
{
- MainV2.comPort.setGuidedModeWP(new Locationwp() { alt = (float)GuidedModeWP.Alt, lat = (float)GuidedModeWP.Lat, lng = (float)GuidedModeWP.Lng });
+ MainV2.comPort.setGuidedModeWP(new Locationwp() { alt = (float)MainV2.cs.GuidedModeWP.Alt, lat = (float)MainV2.cs.GuidedModeWP.Lat, lng = (float)MainV2.cs.GuidedModeWP.Lng });
}
}
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.resx b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.resx
index 9a73daa0fa..e1218b96fe 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.resx
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.resx
@@ -238,7 +238,7 @@
hud1
- ArdupilotMega.Controls.HUD, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.HUD, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
SubMainLeft.Panel1
@@ -274,7 +274,7 @@
quickView6
- ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabQuick
@@ -295,7 +295,7 @@
quickView5
- ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabQuick
@@ -316,7 +316,7 @@
quickView4
- ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabQuick
@@ -337,7 +337,7 @@
quickView3
- ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabQuick
@@ -358,7 +358,7 @@
quickView2
- ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabQuick
@@ -379,7 +379,7 @@
quickView1
- ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabQuick
@@ -433,7 +433,7 @@
BUT_script
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -466,7 +466,7 @@
BUT_joystick
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -496,7 +496,7 @@
BUT_quickmanual
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -526,7 +526,7 @@
BUT_quickrtl
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -556,7 +556,7 @@
BUT_quickauto
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -610,7 +610,7 @@
BUT_setwp
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -661,7 +661,7 @@
BUT_setmode
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -691,7 +691,7 @@
BUT_clear_track
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -742,7 +742,7 @@
BUT_Homealt
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -772,7 +772,7 @@
BUT_RAWSensor
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -802,7 +802,7 @@
BUTrestartmission
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -832,7 +832,7 @@
BUTactiondo
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabActions
@@ -886,7 +886,7 @@
Gvspeed
- AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabGauges
@@ -916,7 +916,7 @@
Gheading
- ArdupilotMega.Controls.HSI, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.HSI, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabGauges
@@ -946,7 +946,7 @@
Galt
- AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabGauges
@@ -979,7 +979,7 @@
Gspeed
- AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabGauges
@@ -1063,7 +1063,7 @@
lbl_playbackspeed
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabTLogs
@@ -1090,7 +1090,7 @@
lbl_logpercent
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabTLogs
@@ -1117,7 +1117,7 @@
NUM_playbackspeed
- ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabTLogs
@@ -1144,7 +1144,7 @@
BUT_log2kml
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabTLogs
@@ -1198,7 +1198,7 @@
BUT_playlog
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabTLogs
@@ -1225,7 +1225,7 @@
BUT_loadtelem
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
tabTLogs
@@ -1411,7 +1411,7 @@
lbl_winddir
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
splitContainer1.Panel2
@@ -1441,7 +1441,7 @@
lbl_windvel
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
splitContainer1.Panel2
@@ -1474,7 +1474,7 @@
lbl_hdop
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
splitContainer1.Panel2
@@ -1507,7 +1507,7 @@
lbl_sats
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
splitContainer1.Panel2
@@ -1679,7 +1679,7 @@
gMapControl1
- ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
splitContainer1.Panel2
@@ -1742,7 +1742,7 @@
TXT_lat
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
panel1
@@ -1799,7 +1799,7 @@
label1
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
panel1
@@ -1829,7 +1829,7 @@
TXT_long
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
panel1
@@ -1859,7 +1859,7 @@
TXT_alt
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
panel1
@@ -2060,7 +2060,7 @@
label6
- ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
$this
@@ -2168,6 +2168,6 @@
FlightData
- System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4606.24956, Culture=neutral, PublicKeyToken=null
+ System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null
\ No newline at end of file
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.Designer.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.Designer.cs
index e5a0cae95e..4f60927328 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.Designer.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.Designer.cs
@@ -63,8 +63,6 @@
this.panel5 = new System.Windows.Forms.Panel();
this.BUT_write = new ArdupilotMega.Controls.MyButton();
this.BUT_read = new ArdupilotMega.Controls.MyButton();
- this.SaveFile = new ArdupilotMega.Controls.MyButton();
- this.BUT_loadwpfile = new ArdupilotMega.Controls.MyButton();
this.panel1 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.LinkLabel();
this.label3 = new System.Windows.Forms.Label();
@@ -84,14 +82,12 @@
this.TXT_mousealt = new System.Windows.Forms.TextBox();
this.TXT_mouselong = new System.Windows.Forms.TextBox();
this.TXT_mouselat = new System.Windows.Forms.TextBox();
- this.comboBoxMapType = new System.Windows.Forms.ComboBox();
this.lbl_status = new System.Windows.Forms.Label();
this.panelWaypoints = new BSE.Windows.Forms.Panel();
this.splitter1 = new BSE.Windows.Forms.Splitter();
- this.BUT_Camera = new ArdupilotMega.Controls.MyButton();
- this.button1 = new ArdupilotMega.Controls.MyButton();
this.BUT_Add = new ArdupilotMega.Controls.MyButton();
this.panelAction = new BSE.Windows.Forms.Panel();
+ this.comboBoxMapType = new System.Windows.Forms.ComboBox();
this.panelMap = new System.Windows.Forms.Panel();
this.lbl_distance = new System.Windows.Forms.Label();
this.lbl_homedist = new System.Windows.Forms.Label();
@@ -99,7 +95,6 @@
this.MainMap = new ArdupilotMega.Controls.myGMAP();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.deleteWPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.setROIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loiterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loiterForeverToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loitertimeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -107,6 +102,10 @@
this.jumpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.jumpstartToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.jumpwPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.rTLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.landToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.takeoffToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.setROIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clearMissionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.polygonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -129,6 +128,13 @@
this.zoomToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.prefetchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.kMLOverlayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.elevationGraphToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.cameraToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.fileLoadSaveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.loadWPFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.saveWPFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.trackerHomeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.flyToHereToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.trackBar1 = new ArdupilotMega.Controls.MyTrackBar();
this.label11 = new System.Windows.Forms.Label();
this.panelBASE = new System.Windows.Forms.Panel();
@@ -338,8 +344,6 @@
resources.ApplyResources(this.panel5, "panel5");
this.panel5.Controls.Add(this.BUT_write);
this.panel5.Controls.Add(this.BUT_read);
- this.panel5.Controls.Add(this.SaveFile);
- this.panel5.Controls.Add(this.BUT_loadwpfile);
this.panel5.Name = "panel5";
//
// BUT_write
@@ -356,20 +360,6 @@
this.BUT_read.UseVisualStyleBackColor = true;
this.BUT_read.Click += new System.EventHandler(this.BUT_read_Click);
//
- // SaveFile
- //
- resources.ApplyResources(this.SaveFile, "SaveFile");
- this.SaveFile.Name = "SaveFile";
- this.SaveFile.UseVisualStyleBackColor = true;
- this.SaveFile.Click += new System.EventHandler(this.SaveFile_Click);
- //
- // BUT_loadwpfile
- //
- resources.ApplyResources(this.BUT_loadwpfile, "BUT_loadwpfile");
- this.BUT_loadwpfile.Name = "BUT_loadwpfile";
- this.BUT_loadwpfile.UseVisualStyleBackColor = true;
- this.BUT_loadwpfile.Click += new System.EventHandler(this.BUT_loadwpfile_Click);
- //
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
@@ -493,14 +483,6 @@
resources.ApplyResources(this.TXT_mouselat, "TXT_mouselat");
this.TXT_mouselat.Name = "TXT_mouselat";
//
- // comboBoxMapType
- //
- resources.ApplyResources(this.comboBoxMapType, "comboBoxMapType");
- this.comboBoxMapType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxMapType.FormattingEnabled = true;
- this.comboBoxMapType.Name = "comboBoxMapType";
- this.toolTip1.SetToolTip(this.comboBoxMapType, resources.GetString("comboBoxMapType.ToolTip"));
- //
// lbl_status
//
resources.ApplyResources(this.lbl_status, "lbl_status");
@@ -509,15 +491,12 @@
// panelWaypoints
//
this.panelWaypoints.AssociatedSplitter = this.splitter1;
- resources.ApplyResources(this.panelWaypoints, "panelWaypoints");
this.panelWaypoints.BackColor = System.Drawing.Color.Transparent;
this.panelWaypoints.CaptionFont = new System.Drawing.Font("Segoe UI", 11.75F, System.Drawing.FontStyle.Bold);
this.panelWaypoints.CaptionHeight = 21;
this.panelWaypoints.ColorScheme = BSE.Windows.Forms.ColorScheme.Custom;
- this.panelWaypoints.Controls.Add(this.BUT_Camera);
this.panelWaypoints.Controls.Add(this.CHK_altmode);
this.panelWaypoints.Controls.Add(this.LBL_WPRad);
- this.panelWaypoints.Controls.Add(this.button1);
this.panelWaypoints.Controls.Add(this.label5);
this.panelWaypoints.Controls.Add(this.TXT_loiterrad);
this.panelWaypoints.Controls.Add(this.CHK_holdalt);
@@ -540,6 +519,7 @@
this.panelWaypoints.CustomColors.ContentGradientBegin = System.Drawing.SystemColors.ButtonFace;
this.panelWaypoints.CustomColors.ContentGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252)))));
this.panelWaypoints.CustomColors.InnerBorderColor = System.Drawing.SystemColors.Window;
+ resources.ApplyResources(this.panelWaypoints, "panelWaypoints");
this.panelWaypoints.ForeColor = System.Drawing.SystemColors.ControlText;
this.panelWaypoints.Image = null;
this.panelWaypoints.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
@@ -558,22 +538,6 @@
this.splitter1.Name = "splitter1";
this.splitter1.TabStop = false;
//
- // BUT_Camera
- //
- resources.ApplyResources(this.BUT_Camera, "BUT_Camera");
- this.BUT_Camera.Name = "BUT_Camera";
- this.toolTip1.SetToolTip(this.BUT_Camera, resources.GetString("BUT_Camera.ToolTip"));
- this.BUT_Camera.UseVisualStyleBackColor = true;
- this.BUT_Camera.Click += new System.EventHandler(this.BUT_Camera_Click);
- //
- // button1
- //
- resources.ApplyResources(this.button1, "button1");
- this.button1.Name = "button1";
- this.toolTip1.SetToolTip(this.button1, resources.GetString("button1.ToolTip"));
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
// BUT_Add
//
resources.ApplyResources(this.BUT_Add, "BUT_Add");
@@ -620,6 +584,14 @@
this.panelAction.ToolTipTextExpandIconPanelExpanded = null;
this.panelAction.PanelCollapsing += new System.EventHandler(this.panel4_PanelCollapsing);
//
+ // comboBoxMapType
+ //
+ resources.ApplyResources(this.comboBoxMapType, "comboBoxMapType");
+ this.comboBoxMapType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxMapType.FormattingEnabled = true;
+ this.comboBoxMapType.Name = "comboBoxMapType";
+ this.toolTip1.SetToolTip(this.comboBoxMapType, resources.GetString("comboBoxMapType.ToolTip"));
+ //
// panelMap
//
this.panelMap.BackColor = System.Drawing.Color.Transparent;
@@ -680,15 +652,21 @@
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.deleteWPToolStripMenuItem,
- this.setROIToolStripMenuItem,
this.loiterToolStripMenuItem,
this.jumpToolStripMenuItem,
+ this.rTLToolStripMenuItem,
+ this.landToolStripMenuItem,
+ this.takeoffToolStripMenuItem,
+ this.setROIToolStripMenuItem,
this.clearMissionToolStripMenuItem,
this.toolStripSeparator1,
this.polygonToolStripMenuItem,
this.geoFenceToolStripMenuItem,
this.autoWPToolStripMenuItem,
- this.mapToolToolStripMenuItem});
+ this.mapToolToolStripMenuItem,
+ this.fileLoadSaveToolStripMenuItem,
+ this.trackerHomeToolStripMenuItem,
+ this.flyToHereToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
//
@@ -698,12 +676,6 @@
resources.ApplyResources(this.deleteWPToolStripMenuItem, "deleteWPToolStripMenuItem");
this.deleteWPToolStripMenuItem.Click += new System.EventHandler(this.deleteWPToolStripMenuItem_Click);
//
- // setROIToolStripMenuItem
- //
- this.setROIToolStripMenuItem.Name = "setROIToolStripMenuItem";
- resources.ApplyResources(this.setROIToolStripMenuItem, "setROIToolStripMenuItem");
- this.setROIToolStripMenuItem.Click += new System.EventHandler(this.setROIToolStripMenuItem_Click);
- //
// loiterToolStripMenuItem
//
this.loiterToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -751,6 +723,30 @@
resources.ApplyResources(this.jumpwPToolStripMenuItem, "jumpwPToolStripMenuItem");
this.jumpwPToolStripMenuItem.Click += new System.EventHandler(this.jumpwPToolStripMenuItem_Click);
//
+ // rTLToolStripMenuItem
+ //
+ this.rTLToolStripMenuItem.Name = "rTLToolStripMenuItem";
+ resources.ApplyResources(this.rTLToolStripMenuItem, "rTLToolStripMenuItem");
+ this.rTLToolStripMenuItem.Click += new System.EventHandler(this.rTLToolStripMenuItem_Click);
+ //
+ // landToolStripMenuItem
+ //
+ this.landToolStripMenuItem.Name = "landToolStripMenuItem";
+ resources.ApplyResources(this.landToolStripMenuItem, "landToolStripMenuItem");
+ this.landToolStripMenuItem.Click += new System.EventHandler(this.landToolStripMenuItem_Click);
+ //
+ // takeoffToolStripMenuItem
+ //
+ this.takeoffToolStripMenuItem.Name = "takeoffToolStripMenuItem";
+ resources.ApplyResources(this.takeoffToolStripMenuItem, "takeoffToolStripMenuItem");
+ this.takeoffToolStripMenuItem.Click += new System.EventHandler(this.takeoffToolStripMenuItem_Click);
+ //
+ // setROIToolStripMenuItem
+ //
+ this.setROIToolStripMenuItem.Name = "setROIToolStripMenuItem";
+ resources.ApplyResources(this.setROIToolStripMenuItem, "setROIToolStripMenuItem");
+ this.setROIToolStripMenuItem.Click += new System.EventHandler(this.setROIToolStripMenuItem_Click);
+ //
// clearMissionToolStripMenuItem
//
this.clearMissionToolStripMenuItem.Name = "clearMissionToolStripMenuItem";
@@ -847,6 +843,7 @@
//
this.createWpCircleToolStripMenuItem.Name = "createWpCircleToolStripMenuItem";
resources.ApplyResources(this.createWpCircleToolStripMenuItem, "createWpCircleToolStripMenuItem");
+ this.createWpCircleToolStripMenuItem.Click += new System.EventHandler(this.createWpCircleToolStripMenuItem_Click);
//
// gridToolStripMenuItem
//
@@ -861,7 +858,9 @@
this.rotateMapToolStripMenuItem,
this.zoomToToolStripMenuItem,
this.prefetchToolStripMenuItem,
- this.kMLOverlayToolStripMenuItem});
+ this.kMLOverlayToolStripMenuItem,
+ this.elevationGraphToolStripMenuItem,
+ this.cameraToolStripMenuItem});
this.mapToolToolStripMenuItem.Name = "mapToolToolStripMenuItem";
resources.ApplyResources(this.mapToolToolStripMenuItem, "mapToolToolStripMenuItem");
//
@@ -869,11 +868,13 @@
//
this.ContextMeasure.Name = "ContextMeasure";
resources.ApplyResources(this.ContextMeasure, "ContextMeasure");
+ this.ContextMeasure.Click += new System.EventHandler(this.ContextMeasure_Click);
//
// rotateMapToolStripMenuItem
//
this.rotateMapToolStripMenuItem.Name = "rotateMapToolStripMenuItem";
resources.ApplyResources(this.rotateMapToolStripMenuItem, "rotateMapToolStripMenuItem");
+ this.rotateMapToolStripMenuItem.Click += new System.EventHandler(this.rotateMapToolStripMenuItem_Click);
//
// zoomToToolStripMenuItem
//
@@ -893,6 +894,49 @@
resources.ApplyResources(this.kMLOverlayToolStripMenuItem, "kMLOverlayToolStripMenuItem");
this.kMLOverlayToolStripMenuItem.Click += new System.EventHandler(this.kMLOverlayToolStripMenuItem_Click);
//
+ // elevationGraphToolStripMenuItem
+ //
+ this.elevationGraphToolStripMenuItem.Name = "elevationGraphToolStripMenuItem";
+ resources.ApplyResources(this.elevationGraphToolStripMenuItem, "elevationGraphToolStripMenuItem");
+ this.elevationGraphToolStripMenuItem.Click += new System.EventHandler(this.elevationGraphToolStripMenuItem_Click);
+ //
+ // cameraToolStripMenuItem
+ //
+ this.cameraToolStripMenuItem.Name = "cameraToolStripMenuItem";
+ resources.ApplyResources(this.cameraToolStripMenuItem, "cameraToolStripMenuItem");
+ this.cameraToolStripMenuItem.Click += new System.EventHandler(this.cameraToolStripMenuItem_Click);
+ //
+ // fileLoadSaveToolStripMenuItem
+ //
+ this.fileLoadSaveToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.loadWPFileToolStripMenuItem,
+ this.saveWPFileToolStripMenuItem});
+ this.fileLoadSaveToolStripMenuItem.Name = "fileLoadSaveToolStripMenuItem";
+ resources.ApplyResources(this.fileLoadSaveToolStripMenuItem, "fileLoadSaveToolStripMenuItem");
+ //
+ // loadWPFileToolStripMenuItem
+ //
+ this.loadWPFileToolStripMenuItem.Name = "loadWPFileToolStripMenuItem";
+ resources.ApplyResources(this.loadWPFileToolStripMenuItem, "loadWPFileToolStripMenuItem");
+ this.loadWPFileToolStripMenuItem.Click += new System.EventHandler(this.loadWPFileToolStripMenuItem_Click);
+ //
+ // saveWPFileToolStripMenuItem
+ //
+ this.saveWPFileToolStripMenuItem.Name = "saveWPFileToolStripMenuItem";
+ resources.ApplyResources(this.saveWPFileToolStripMenuItem, "saveWPFileToolStripMenuItem");
+ this.saveWPFileToolStripMenuItem.Click += new System.EventHandler(this.saveWPFileToolStripMenuItem_Click);
+ //
+ // trackerHomeToolStripMenuItem
+ //
+ this.trackerHomeToolStripMenuItem.Name = "trackerHomeToolStripMenuItem";
+ resources.ApplyResources(this.trackerHomeToolStripMenuItem, "trackerHomeToolStripMenuItem");
+ this.trackerHomeToolStripMenuItem.Click += new System.EventHandler(this.trackerHomeToolStripMenuItem_Click);
+ //
+ // flyToHereToolStripMenuItem
+ //
+ this.flyToHereToolStripMenuItem.Name = "flyToHereToolStripMenuItem";
+ resources.ApplyResources(this.flyToHereToolStripMenuItem, "flyToHereToolStripMenuItem");
+ //
// trackBar1
//
resources.ApplyResources(this.trackBar1, "trackBar1");
@@ -959,7 +1003,6 @@
#endregion
- private ArdupilotMega.Controls.MyButton SaveFile;
private ArdupilotMega.Controls.MyButton BUT_read;
private ArdupilotMega.Controls.MyButton BUT_write;
private System.Windows.Forms.Panel panel5;
@@ -982,8 +1025,6 @@
private System.Windows.Forms.TextBox TXT_mousealt;
private System.Windows.Forms.TextBox TXT_mouselong;
private System.Windows.Forms.TextBox TXT_mouselat;
- private ArdupilotMega.Controls.MyButton BUT_loadwpfile;
- private System.Windows.Forms.ComboBox comboBoxMapType;
private System.Windows.Forms.Label lbl_status;
private System.Windows.Forms.DataGridView Commands;
private System.Windows.Forms.CheckBox CHK_geheight;
@@ -995,7 +1036,6 @@
private System.Windows.Forms.TextBox TXT_loiterrad;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox CHK_holdalt;
- private ArdupilotMega.Controls.MyButton button1;
private System.Windows.Forms.CheckBox CHK_altmode;
private BSE.Windows.Forms.Panel panelWaypoints;
private BSE.Windows.Forms.Panel panelAction;
@@ -1023,7 +1063,6 @@
private System.Windows.Forms.ToolStripMenuItem jumpwPToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem deleteWPToolStripMenuItem;
- private ArdupilotMega.Controls.MyButton BUT_Camera;
private System.Windows.Forms.DataGridViewComboBoxColumn Command;
private System.Windows.Forms.DataGridViewTextBoxColumn Param1;
private System.Windows.Forms.DataGridViewTextBoxColumn Param2;
@@ -1054,5 +1093,16 @@
private System.Windows.Forms.ToolStripMenuItem zoomToToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem prefetchToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem kMLOverlayToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem elevationGraphToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem cameraToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem rTLToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem landToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem takeoffToolStripMenuItem;
+ private System.Windows.Forms.ComboBox comboBoxMapType;
+ private System.Windows.Forms.ToolStripMenuItem fileLoadSaveToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem loadWPFileToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem saveWPFileToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem trackerHomeToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem flyToHereToolStripMenuItem;
}
}
\ No newline at end of file
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs
index 038e09af3e..dfd1b83fd5 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs
@@ -44,73 +44,6 @@ namespace ArdupilotMega.GCSViews
private Dictionary cmdParamNames = new Dictionary();
- ///
- /// Reads defines.h for all valid commands and eeprom positions
- ///
- /// File Path
- ///
- public bool readdefines(string file)
- {
- if (!File.Exists(file))
- {
- return false;
- }
- try
- {
- StreamReader sr = new StreamReader(file); //"defines.h"
- while (!sr.EndOfStream)
- {
- string line = sr.ReadLine();
- Regex regex2 = new Regex(@"define\s+([^\s]+)\s+([^\s]+)", RegexOptions.IgnoreCase);
- if (regex2.IsMatch(line))
- {
- MatchCollection matchs = regex2.Matches(line);
- for (int i = 0; i < matchs.Count; i++)
- {
- int num = 0;
- if (matchs[i].Groups[2].Value.ToString().ToLower().Contains("0x"))
- {
- try
- {
- num = Convert.ToInt32(matchs[i].Groups[2].Value.ToString(), 16);
- }
- catch (Exception) { System.Diagnostics.Debug.WriteLine("BAD hex " + matchs[i].Groups[1].Value.ToString()); }
- }
- else
- {
- try
- {
- num = Convert.ToInt32(matchs[i].Groups[2].Value.ToString(), 10);
- }
- catch (Exception) { System.Diagnostics.Debug.WriteLine("BAD dec " + matchs[i].Groups[1].Value.ToString()); }
- }
- System.Diagnostics.Debug.WriteLine(matchs[i].Groups[1].Value.ToString() + " = " + matchs[i].Groups[2].Value.ToString() + " = " + num.ToString());
- try
- {
- // hashdefines.Add(matchs[i].Groups[1].Value.ToString(), num);
- }
- catch (Exception) { }
- }
- }
- }
-
- sr.Close();
-
-
- // if (!hashdefines.ContainsKey("WP_START_BYTE"))
- {
- CustomMessageBox.Show("Your Ardupilot Mega project defines.h is Invalid");
- //return false;
- }
- }
- catch (Exception)
- {
- CustomMessageBox.Show("Can't open file!");
- return false;
- }
- return true;
- }
-
///
/// Read from waypoint writter *.h file
///
@@ -239,6 +172,12 @@ namespace ArdupilotMega.GCSViews
return;
}
+ if (pointno == "Tracker Home")
+ {
+ MainV2.cs.TrackerLocation = new PointLatLngAlt(lat, lng, alt, "");
+ return;
+ }
+
try
{
selectedrow = int.Parse(pointno) - 1;
@@ -698,6 +637,8 @@ namespace ArdupilotMega.GCSViews
writeKML();
+ panelWaypoints.Expand = false;
+
timer1.Start();
}
@@ -951,7 +892,7 @@ namespace ArdupilotMega.GCSViews
{
if (Commands.Rows[a].HeaderCell.Value == null)
{
- Commands.Rows[a].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
+ Commands.Rows[a].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleLeft;
Commands.Rows[a].HeaderCell.Value = (a + 1).ToString();
}
// skip rows with the correct number
@@ -2295,13 +2236,7 @@ namespace ArdupilotMega.GCSViews
private void comboBoxMapType_SelectedValueChanged(object sender, EventArgs e)
{
- try
- {
- MainMap.MapType = (MapType)comboBoxMapType.SelectedItem;
- FlightData.mymap.MapType = (MapType)comboBoxMapType.SelectedItem;
- MainV2.config["MapType"] = comboBoxMapType.Text;
- }
- catch { CustomMessageBox.Show("Map change failed. try zomming out first."); }
+
}
private void Commands_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
@@ -2383,12 +2318,7 @@ namespace ArdupilotMega.GCSViews
private void button1_Click(object sender, EventArgs e)
{
- writeKML();
- double homealt;
- double.TryParse(TXT_homealt.Text, out homealt);
- Form temp = new ElevationProfile(pointlist, homealt);
- ThemeManager.ApplyThemeTo(temp);
- temp.ShowDialog();
+
}
private void CHK_altmode_CheckedChanged(object sender, EventArgs e)
@@ -2753,9 +2683,7 @@ namespace ArdupilotMega.GCSViews
private void BUT_Camera_Click(object sender, EventArgs e)
{
- Camera form = new Camera();
- ThemeManager.ApplyThemeTo(form);
- form.Show();
+
}
private void panelMap_Resize(object sender, EventArgs e)
@@ -2783,8 +2711,16 @@ namespace ArdupilotMega.GCSViews
{
try
{
+ if (isMouseDown)
+ return;
+
routes.Markers.Clear();
+ if (MainV2.cs.TrackerLocation != MainV2.cs.HomeLocation && MainV2.cs.TrackerLocation.Lng != 0)
+ {
+ addpolygonmarker("Tracker Home", MainV2.cs.TrackerLocation.Lng, MainV2.cs.TrackerLocation.Lat, (int)MainV2.cs.TrackerLocation.Alt, Color.Blue, routes);
+ }
+
if (MainV2.cs.lat == 0 || MainV2.cs.lng == 0)
return;
@@ -2802,10 +2738,49 @@ namespace ArdupilotMega.GCSViews
{
routes.Markers.Add(new GMapMarkerQuad(currentloc, MainV2.cs.yaw, MainV2.cs.groundcourse, MainV2.cs.nav_bearing));
}
+
+ if (MainV2.cs.mode.ToLower() == "guided" && MainV2.cs.GuidedModeWP != null && MainV2.cs.GuidedModeWP.Lat != 0)
+ {
+ addpolygonmarker("Guided Mode", MainV2.cs.GuidedModeWP.Lng, MainV2.cs.GuidedModeWP.Lat, (int)MainV2.cs.GuidedModeWP.Alt, Color.Red, routes);
+ }
+
+
}
catch { }
}
+ private void addpolygonmarker(string tag, double lng, double lat, int alt, Color? color, GMapOverlay overlay)
+ {
+ try
+ {
+ PointLatLng point = new PointLatLng(lat, lng);
+ GMapMarkerGoogleGreen m = new GMapMarkerGoogleGreen(point);
+ m.ToolTipMode = MarkerTooltipMode.Always;
+ m.ToolTipText = tag;
+ m.Tag = tag;
+
+ GMapMarkerRect mBorders = new GMapMarkerRect(point);
+ {
+
+ mBorders.InnerMarker = m;
+ try
+ {
+ mBorders.wprad = (int)(float.Parse(ArdupilotMega.MainV2.config["TXT_WPRad"].ToString()) / MainV2.cs.multiplierdist);
+ }
+ catch { }
+ mBorders.MainMap = MainMap;
+ if (color.HasValue)
+ {
+ mBorders.Color = color.Value;
+ }
+ }
+
+ overlay.Markers.Add(m);
+ overlay.Markers.Add(mBorders);
+ }
+ catch (Exception) { }
+ }
+
private void GeoFenceuploadToolStripMenuItem_Click(object sender, EventArgs e)
{
polygongridmode = false;
@@ -3540,5 +3515,109 @@ namespace ArdupilotMega.GCSViews
catch (Exception ex) { CustomMessageBox.Show("Bad KML File :" + ex.ToString()); }
}
}
+
+ private void elevationGraphToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ writeKML();
+ double homealt;
+ double.TryParse(TXT_homealt.Text, out homealt);
+ Form temp = new ElevationProfile(pointlist, homealt);
+ ThemeManager.ApplyThemeTo(temp);
+ temp.ShowDialog();
+ }
+
+ private void cameraToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ Camera form = new Camera();
+ ThemeManager.ApplyThemeTo(form);
+ form.Show();
+ }
+
+ private void rTLToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ selectedrow = Commands.Rows.Add();
+
+ Commands.Rows[selectedrow].Cells[Command.Index].Value = MAVLink.MAV_CMD.RETURN_TO_LAUNCH.ToString();
+
+ //Commands.Rows[selectedrow].Cells[Param1.Index].Value = time;
+
+ ChangeColumnHeader(MAVLink.MAV_CMD.RETURN_TO_LAUNCH.ToString());
+
+ writeKML();
+ }
+
+ private void landToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ selectedrow = Commands.Rows.Add();
+
+ Commands.Rows[selectedrow].Cells[Command.Index].Value = MAVLink.MAV_CMD.LAND.ToString();
+
+ //Commands.Rows[selectedrow].Cells[Param1.Index].Value = time;
+
+ ChangeColumnHeader(MAVLink.MAV_CMD.LAND.ToString());
+
+ setfromGE(end.Lat, end.Lng, 1);
+
+ writeKML();
+ }
+
+ private void takeoffToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ // altitude
+ string alt = "10";
+
+ Common.InputBox("Altitude", "Please enter your takeoff altitude", ref alt);
+
+ int alti = -1;
+
+ if (!int.TryParse(alt, out alti))
+ {
+ MessageBox.Show("Bad Alt");
+ return;
+ }
+
+ // take off pitch
+ int topi = 0;
+
+ if (MainV2.cs.firmware == MainV2.Firmwares.ArduPlane)
+ {
+ string top = "15";
+
+ Common.InputBox("Takeoff Pitch", "Please enter your takeoff pitch", ref alt);
+
+ if (!int.TryParse(top, out topi))
+ {
+ MessageBox.Show("Bad Takeoff pitch");
+ return;
+ }
+ }
+
+ selectedrow = Commands.Rows.Add();
+
+ Commands.Rows[selectedrow].Cells[Command.Index].Value = MAVLink.MAV_CMD.TAKEOFF.ToString();
+
+ Commands.Rows[selectedrow].Cells[Param1.Index].Value = topi;
+
+ Commands.Rows[selectedrow].Cells[Alt.Index].Value = alti;
+
+ ChangeColumnHeader(MAVLink.MAV_CMD.TAKEOFF.ToString());
+
+ writeKML();
+ }
+
+ private void loadWPFileToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ BUT_loadwpfile_Click(null, null);
+ }
+
+ private void saveWPFileToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ SaveFile_Click(null, null);
+ }
+
+ private void trackerHomeToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ MainV2.cs.TrackerLocation = new PointLatLngAlt(end) { Alt = MainV2.cs.HomeAlt };
+ }
}
}
\ No newline at end of file
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.resx b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.resx
index aa13161700..2f93baea0b 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.resx
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.resx
@@ -148,7 +148,7 @@
panelWaypoints
- 1
+ 0
True
@@ -178,7 +178,7 @@
panelWaypoints
- 6
+ 4
Top, Bottom, Left, Right
@@ -319,13 +319,13 @@
40
- 10, 55
+ 3, 55
35
- 601, 89
+ 610, 79
6
@@ -340,7 +340,7 @@
panelWaypoints
- 8
+ 6
True
@@ -370,7 +370,7 @@
panelWaypoints
- 10
+ 8
23, 36
@@ -394,7 +394,7 @@
panelWaypoints
- 11
+ 9
154, 36
@@ -418,7 +418,7 @@
panelWaypoints
- 9
+ 7
True
@@ -448,7 +448,7 @@
panelWaypoints
- 2
+ 1
True
@@ -478,7 +478,7 @@
panelWaypoints
- 7
+ 5
89, 36
@@ -502,7 +502,7 @@
panelWaypoints
- 5
+ 3
True
@@ -532,7 +532,7 @@
panelWaypoints
- 4
+ 2
Bottom, Right
@@ -541,7 +541,7 @@
NoControl
- 7, 86
+ 7, 32
107, 23
@@ -556,7 +556,7 @@
BUT_write
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.35137, Culture=neutral, PublicKeyToken=null
panel5
@@ -568,7 +568,7 @@
NoControl
- 6, 58
+ 6, 4
107, 23
@@ -583,7 +583,7 @@
BUT_read
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.35137, Culture=neutral, PublicKeyToken=null
panel5
@@ -591,65 +591,11 @@
1
-
- NoControl
-
-
- 6, 30
-
-
- 107, 23
-
-
- 4
-
-
- Save WP File
-
-
- SaveFile
-
-
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
-
-
- panel5
-
-
- 2
-
-
- NoControl
-
-
- 6, 3
-
-
- 107, 23
-
-
- 39
-
-
- Load WP File
-
-
- BUT_loadwpfile
-
-
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
-
-
- panel5
-
-
- 3
-
- 8, 250
+ 8, 301
- 117, 114
+ 117, 63
29
@@ -1096,7 +1042,7 @@
6
- 8, 130
+ 8, 177
114, 79
@@ -1116,36 +1062,6 @@
2
-
- Bottom, Right
-
-
- 8, 211
-
-
- 111, 21
-
-
- 42
-
-
- 172, 17
-
-
- Change the current map type
-
-
- comboBoxMapType
-
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- panelAction
-
-
- 3
-
Bottom, Right
@@ -1156,7 +1072,7 @@
NoControl
- 9, 235
+ 9, 282
37, 13
@@ -1186,7 +1102,7 @@
NoControl
- 0, 310
+ 0, 324
617, 3
@@ -1206,69 +1122,6 @@
0
-
- True
-
-
- NoControl
-
-
- 562, 26
-
-
- 48, 23
-
-
- 52
-
-
- Camera
-
-
- Get Camera settings for overlap
-
-
- BUT_Camera
-
-
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
-
-
- panelWaypoints
-
-
- 0
-
-
- NoControl
-
-
- 479, 26
-
-
- 77, 23
-
-
- 48
-
-
- Elevation Graph
-
-
- Plot the current mission vs google earth data
-
-
- button1
-
-
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
-
-
- panelWaypoints
-
-
- 3
-
NoControl
@@ -1284,6 +1137,9 @@
Add Below
+
+ 172, 17
+
Add a line to the grid bellow
@@ -1291,22 +1147,22 @@
BUT_Add
- ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.35137, Culture=neutral, PublicKeyToken=null
panelWaypoints
- 12
+ 10
Bottom
- 0, 313
+ 0, 327
- 617, 148
+ 617, 134
49
@@ -1326,6 +1182,33 @@
2
+
+ Bottom, Right
+
+
+ 8, 258
+
+
+ 111, 21
+
+
+ 42
+
+
+ Change the current map type
+
+
+ comboBoxMapType
+
+
+ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ panelAction
+
+
+ 3
+
Right
@@ -1450,17 +1333,11 @@
17, 17
- 148, 22
+ 152, 22
Delete WP
-
- 148, 22
-
-
- Set ROI
-
113, 22
@@ -1480,7 +1357,7 @@
Circles
- 148, 22
+ 152, 22
Loiter
@@ -1498,19 +1375,43 @@
WP #
- 148, 22
+ 152, 22
Jump
+
+ 152, 22
+
+
+ RTL
+
+
+ 152, 22
+
+
+ Land
+
+
+ 152, 22
+
+
+ Takeoff
+
+
+ 152, 22
+
+
+ Set ROI
+
- 148, 22
+ 152, 22
Clear Mission
- 145, 6
+ 149, 6
174, 22
@@ -1525,7 +1426,7 @@
Clear Polygon
- 148, 22
+ 152, 22
Draw Polygon
@@ -1570,7 +1471,7 @@
Save to File
- 148, 22
+ 152, 22
Geo-Fence
@@ -1588,7 +1489,7 @@
Grid
- 148, 22
+ 152, 22
Auto WP
@@ -1623,14 +1524,59 @@
KML Overlay
+
+ 167, 22
+
+
+ Elevation Graph
+
+
+ 167, 22
+
+
+ Camera
+
- 148, 22
+ 152, 22
Map Tool
+
+ 142, 22
+
+
+ Load WP File
+
+
+ 142, 22
+
+
+ Save WP File
+
+
+ 152, 22
+
+
+ File Load/Save
+
+
+ 152, 22
+
+
+ Tracker Home
+
+
+ 152, 22
+
+
+ Fly To Here
+
+
+ False
+
- 149, 208
+ 153, 362
contextMenuStrip1
@@ -1642,7 +1588,7 @@
0, 0
- 577, 306
+ 577, 320
@@ -1796,7 +1742,7 @@
MainMap
- ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4611.35137, Culture=neutral, PublicKeyToken=null
panelMap
@@ -1817,7 +1763,7 @@
Vertical
- 45, 286
+ 45, 300
46
@@ -1826,7 +1772,7 @@
trackBar1
- ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
+ ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4611.35137, Culture=neutral, PublicKeyToken=null
panelMap
@@ -1874,7 +1820,7 @@
0, 0
- 617, 313
+ 617, 327
51
@@ -2017,12 +1963,6 @@
System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- setROIToolStripMenuItem
-
-
- System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
loiterToolStripMenuItem
@@ -2065,6 +2005,30 @@
System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ rTLToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ landToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ takeoffToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ setROIToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
clearMissionToolStripMenuItem
@@ -2197,6 +2161,48 @@
System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ elevationGraphToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ cameraToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ fileLoadSaveToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ loadWPFileToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ saveWPFileToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ trackerHomeToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ flyToHereToolStripMenuItem
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
toolTip1
@@ -2213,6 +2219,6 @@
FlightPlanner
- System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4606.25609, Culture=neutral, PublicKeyToken=null
+ System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4611.35137, Culture=neutral, PublicKeyToken=null
\ No newline at end of file
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs b/Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs
index 7754e1bb72..1db74ef493 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs
@@ -805,8 +805,8 @@ namespace ArdupilotMega.GCSViews
sitldata.yAccel = DATA[4][6] * 9.8;
sitldata.zAccel = (0 - DATA[4][4]) * 9.8;
- Console.WriteLine(accel_body.ToString());
- Console.WriteLine(" {0} {1} {2}",sitldata.xAccel, sitldata.yAccel, sitldata.zAccel);
+ // Console.WriteLine(accel_body.ToString());
+ // Console.WriteLine(" {0} {1} {2}",sitldata.xAccel, sitldata.yAccel, sitldata.zAccel);
}
else if (receviedbytes == 0x64) // FG binary udp
diff --git a/Tools/ArdupilotMegaPlanner/MainV2.cs b/Tools/ArdupilotMegaPlanner/MainV2.cs
index 2bed4467ac..f1338cabf5 100644
--- a/Tools/ArdupilotMegaPlanner/MainV2.cs
+++ b/Tools/ArdupilotMegaPlanner/MainV2.cs
@@ -184,6 +184,9 @@ namespace ArdupilotMega
speechEngine = new Speech();
+ // proxy loader - dll load now instead of on config form load
+ new Transition(new TransitionType_EaseInEaseOut(2000));
+
MyRenderer.currentpressed = MenuFlightData;
MainMenu.Renderer = new MyRenderer();
diff --git a/Tools/ArdupilotMegaPlanner/Mavlink/MAVLink.cs b/Tools/ArdupilotMegaPlanner/Mavlink/MAVLink.cs
index c7b14873b1..b1bd912668 100644
--- a/Tools/ArdupilotMegaPlanner/Mavlink/MAVLink.cs
+++ b/Tools/ArdupilotMegaPlanner/Mavlink/MAVLink.cs
@@ -156,7 +156,6 @@ namespace ArdupilotMega
this._bytesSentSubj = new Subject();
this.WhenPacketLost = new Subject();
this.WhenPacketReceived = new Subject();
- this.objlock = new object();
this.readlock = new object();
this.logwritelock = new object();
this.lastvalidpacket = DateTime.Now;
@@ -242,6 +241,8 @@ namespace ArdupilotMega
param = new Hashtable();
packets.Initialize();
+ bool hbseen = false;
+
try
{
BaseStream.ReadBufferSize = 4 * 1024;
@@ -305,9 +306,18 @@ namespace ArdupilotMega
{
//if (Progress != null)
// Progress(-1, "No Heatbeat Packets");
+ countDown.Stop();
this.Close();
- progressWorkerEventArgs.ErrorMessage = "No Heatbeat Packets Received";
- throw new Exception("No Mavlink Heartbeat Packets where read from this port - Verify Baud Rate and setup\nAPM Planner waits for 2 valid heartbeat packets before connecting");
+ if (hbseen)
+ {
+ progressWorkerEventArgs.ErrorMessage = "Only 1 Heatbeat Received";
+ throw new Exception("Only 1 Mavlink Heartbeat Packets was read from this port - Verify your hardware is setup correctly\nAPM Planner waits for 2 valid heartbeat packets before connecting");
+ }
+ else
+ {
+ progressWorkerEventArgs.ErrorMessage = "No Heatbeat Packets Received";
+ throw new Exception("No Mavlink Heartbeat Packets where read from this port - Verify Baud Rate and setup\nAPM Planner waits for 2 valid heartbeat packets before connecting");
+ }
}
System.Threading.Thread.Sleep(1);
@@ -328,11 +338,9 @@ namespace ArdupilotMega
if (buffer1.Length == 0)
buffer1 = getHeartBeat();
- try
- {
- log.Debug("MAv Data: len " + buffer.Length + " btr " + BaseStream.BytesToRead);
- }
- catch { }
+
+ if (buffer.Length > 0 || buffer1.Length > 0)
+ hbseen = true;
count++;
@@ -356,8 +364,6 @@ namespace ArdupilotMega
countDown.Stop();
- // if (Progress != null)
- // Progress(-1, "Getting Params.. (sysid " + sysid + " compid " + compid + ") ");
frmProgressReporter.UpdateProgressAndStatus(0, "Getting Params.. (sysid " + sysid + " compid " + compid + ") ");
if (getparams)
@@ -379,8 +385,6 @@ namespace ArdupilotMega
}
catch { }
MainV2.giveComport = false;
- // if (Progress != null)
- // Progress(-1, "Connect Failed\n" + e.Message);
if (string.IsNullOrEmpty(progressWorkerEventArgs.ErrorMessage))
progressWorkerEventArgs.ErrorMessage = "Connect Failed";
throw e;
@@ -497,7 +501,7 @@ namespace ArdupilotMega
{
lock (objlock)
{
- BaseStream.Write(packet, 0, i);
+ BaseStream.Write(packet, 0, i);
}
_bytesSentSubj.OnNext(i);
}
@@ -690,7 +694,7 @@ namespace ArdupilotMega
int retrys = 6;
int param_count = 0;
- int param_total = 5;
+ int param_total = 1;
goagain:
@@ -706,6 +710,7 @@ namespace ArdupilotMega
DateTime lastmessage = DateTime.MinValue;
//hires.Stopwatch stopwatch = new hires.Stopwatch();
+ int packets = 0;
do
{
@@ -730,7 +735,16 @@ namespace ArdupilotMega
continue;
}
MainV2.giveComport = false;
- throw new Exception("Timeout on read - getParamList " + got.Count + " " + param_total + "\n\nYour serial link isn't fast enough\n");
+ if (packets > 0 && param_total == 1)
+ {
+ throw new Exception("Timeout on read - getParamList\n"+packets+" Packets where received, but no paramater packets where received\n");
+ }
+ if (packets == 0)
+ {
+ throw new Exception("Timeout on read - getParamList\nNo Packets where received\n");
+ }
+
+ throw new Exception("Timeout on read - getParamList\nReceived: " + got.Count + " of " + param_total + " after 6 retrys\n\nPlease Check\n1. Link Speed\n2. Link Quality\n3. Hardware hasn't hung");
}
//Console.WriteLine(DateTime.Now.Millisecond + " gp0 ");
@@ -739,6 +753,7 @@ namespace ArdupilotMega
//Console.WriteLine(DateTime.Now.Millisecond + " gp1 ");
if (buffer.Length > 5)
{
+ packets++;
// stopwatch.Start();
if (buffer[5] == MAVLINK_MSG_ID_PARAM_VALUE)
{
diff --git a/Tools/ArdupilotMegaPlanner/Msi/installer.wxs b/Tools/ArdupilotMegaPlanner/Msi/installer.wxs
index 3f19f1ed97..89aaeaaa0e 100644
--- a/Tools/ArdupilotMegaPlanner/Msi/installer.wxs
+++ b/Tools/ArdupilotMegaPlanner/Msi/installer.wxs
@@ -2,14 +2,14 @@
-
+
-
-
+
+
@@ -31,7 +31,7 @@
-
+
@@ -113,11 +113,11 @@
-
+
-
+
@@ -128,20 +128,20 @@
-
+
-
+
-
+
@@ -155,7 +155,7 @@
-
+
@@ -167,13 +167,13 @@
-
+
-
+
@@ -184,7 +184,7 @@
-
+
@@ -195,33 +195,33 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -230,28 +230,28 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs
index 2440a0bf00..9207ab89ed 100644
--- a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs
+++ b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs
@@ -34,5 +34,5 @@ using System.Resources;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.*")]
-[assembly: AssemblyFileVersion("1.2.5")]
+[assembly: AssemblyFileVersion("1.2.6")]
[assembly: NeutralResourcesLanguageAttribute("")]
diff --git a/Tools/ArdupilotMegaPlanner/SerialOutput2.Designer.cs b/Tools/ArdupilotMegaPlanner/SerialOutput2.Designer.cs
new file mode 100644
index 0000000000..5aa2297ef1
--- /dev/null
+++ b/Tools/ArdupilotMegaPlanner/SerialOutput2.Designer.cs
@@ -0,0 +1,96 @@
+namespace ArdupilotMega
+{
+ partial class SerialOutput2
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SerialOutput));
+ this.CMB_serialport = new System.Windows.Forms.ComboBox();
+ this.BUT_connect = new ArdupilotMega.Controls.MyButton();
+ this.CMB_baudrate = new System.Windows.Forms.ComboBox();
+ this.SuspendLayout();
+ //
+ // CMB_serialport
+ //
+ this.CMB_serialport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.CMB_serialport.FormattingEnabled = true;
+ this.CMB_serialport.Location = new System.Drawing.Point(13, 13);
+ this.CMB_serialport.Name = "CMB_serialport";
+ this.CMB_serialport.Size = new System.Drawing.Size(121, 21);
+ this.CMB_serialport.TabIndex = 0;
+ //
+ // BUT_connect
+ //
+ this.BUT_connect.Location = new System.Drawing.Point(140, 13);
+ this.BUT_connect.Name = "BUT_connect";
+ this.BUT_connect.Size = new System.Drawing.Size(75, 23);
+ this.BUT_connect.TabIndex = 1;
+ this.BUT_connect.Text = "Connect";
+ this.BUT_connect.UseVisualStyleBackColor = true;
+ this.BUT_connect.Click += new System.EventHandler(this.BUT_connect_Click);
+ //
+ // CMB_baudrate
+ //
+ this.CMB_baudrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.CMB_baudrate.FormattingEnabled = true;
+ this.CMB_baudrate.Items.AddRange(new object[] {
+ "4800",
+ "9600",
+ "14400",
+ "19200",
+ "28800",
+ "38400",
+ "57600",
+ "115200"});
+ this.CMB_baudrate.Location = new System.Drawing.Point(13, 40);
+ this.CMB_baudrate.Name = "CMB_baudrate";
+ this.CMB_baudrate.Size = new System.Drawing.Size(121, 21);
+ this.CMB_baudrate.TabIndex = 2;
+ //
+ // SerialOutput
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(228, 75);
+ this.Controls.Add(this.CMB_baudrate);
+ this.Controls.Add(this.BUT_connect);
+ this.Controls.Add(this.CMB_serialport);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Name = "SerialOutput";
+ this.Text = "SerialOutput";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SerialOutput_FormClosing);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ComboBox CMB_serialport;
+ private ArdupilotMega.Controls.MyButton BUT_connect;
+ private System.Windows.Forms.ComboBox CMB_baudrate;
+ }
+}
\ No newline at end of file
diff --git a/Tools/ArdupilotMegaPlanner/SerialOutput2.cs b/Tools/ArdupilotMegaPlanner/SerialOutput2.cs
new file mode 100644
index 0000000000..47f31b44fa
--- /dev/null
+++ b/Tools/ArdupilotMegaPlanner/SerialOutput2.cs
@@ -0,0 +1,227 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO.Ports;
+
+namespace ArdupilotMega
+{
+ public partial class SerialOutput2 : Form
+ {
+ System.Threading.Thread t12;
+ static bool threadrun = false;
+ static internal SerialPort comPort = new SerialPort();
+ static internal PointLatLngAlt HomeLoc = new PointLatLngAlt(0,0,0,"Home");
+
+ public SerialOutput2()
+ {
+ InitializeComponent();
+
+ CMB_serialport.DataSource = SerialPort.GetPortNames();
+
+ if (threadrun)
+ {
+ BUT_connect.Text = "Stop";
+ }
+ }
+
+ private void BUT_connect_Click(object sender, EventArgs e)
+ {
+ if (comPort.IsOpen)
+ {
+ threadrun = false;
+ comPort.Close();
+ BUT_connect.Text = "Connect";
+ }
+ else
+ {
+ try
+ {
+ comPort.PortName = CMB_serialport.Text;
+ }
+ catch { CustomMessageBox.Show("Invalid PortName"); return; }
+ try {
+ comPort.BaudRate = int.Parse(CMB_baudrate.Text);
+ } catch {CustomMessageBox.Show("Invalid BaudRate"); return;}
+ try {
+ comPort.Open();
+ } catch {CustomMessageBox.Show("Error Connecting\nif using com0com please rename the ports to COM??"); return;}
+
+ t12 = new System.Threading.Thread(new System.Threading.ThreadStart(mainloop))
+ {
+ IsBackground = true,
+ Name = "Nmea output"
+ };
+ t12.Start();
+ }
+ }
+
+ const float rad2deg = (float)(180 / Math.PI);
+ const float deg2rad = (float)(1.0 / rad2deg);
+
+ void mainloop()
+ {
+ threadrun = true;
+ int counter = 0;
+ while (threadrun)
+ {
+ try
+ {
+ //http://www.microdrones.com/wiki/index.php/Downlink_Protocol
+
+ /*
+...
+#1,27,48,1,1,1,1,0,25343,8192,85
+#2,1,0,0,0,-100,-100,0,-100,-100,50,0,0,0,100,167
+#3,0,0,0,0,13
+#4,9,111731750,1595,0,197
+#5,398843292,55871844,492974923,2.240,9,5
+#6,0.15,-0.06,0.21,1.0,197
+#7,-0.042,-0.022,2.474,182
+#8,0.000,-418.438,2158,159
+#9,-139,-139,431,199
+#10,1.496,-1.628,0.842,161
+#11,0,0,0,58
+#12,,33
+#1,27,48,1,1,1,1,0,25343,8192,85
+#2,1,0,0,0,-100,-100,0,-100,-100,50,0,0,0,100,167
+#3,0,0,0,0,13
+#4,9,111732000,1595,0,208
+#5,398843288,55871840,492974925,2.240,9,2
+#6,0.07,-0.02,0.16,0.9,188
+#7,-0.042,-0.019,2.475,175
+#8,0.000,-418.233,2158,166
+#9,-139,-139,431,199
+#10,1.354,-1.549,0.972,162
+#11,0,0,0,58
+#12,,33
+...
+
+ */
+
+ writeline("#1,28,07,2,1,1,1,2,16000,0,2,");
+
+ // writeline("#2,100,99,98,97,96,95,94,93,92,");
+
+ // writeline("#3,100,120,140,160,");
+
+ int week, seconds;
+ GetGPSTime(out week, out seconds);
+
+ writeline(string.Format("#4,{0},{1},{2},{3},", counter / 10, seconds, week, 25));
+
+ // writeline("#4,counter/2,111732000,1595,0,");
+
+ double x,y,z;
+
+ GetGeo(out x, out y, out z, MainV2.cs.lat, MainV2.cs.lng, MainV2.cs.alt);
+
+ writeline(string.Format("#5,{0},{1},{2},{3},{4},", x * 100, y * 100, z*100, MainV2.cs.gpshdop + 0.01, MainV2.cs.satcount));
+
+ writeline(string.Format("#6,{0},{1},{2},{3},", MainV2.cs.groundspeed * Math.Sin(MainV2.cs.groundcourse * deg2rad),
+ MainV2.cs.groundspeed * Math.Cos(MainV2.cs.groundcourse * deg2rad),
+ MainV2.cs.verticalspeed,2));
+
+ writeline(string.Format("#7,{0},{1},{2},", MainV2.cs.roll * deg2rad, MainV2.cs.pitch * deg2rad, MainV2.cs.yaw * deg2rad));
+
+ writeline(string.Format("#8,{0},{1},{2},", MainV2.cs.alt , MainV2.cs.alt , MainV2.cs.press_temp));
+
+ writeline(string.Format("#9,{0},{1},{2},", MainV2.cs.mx, MainV2.cs.my, MainV2.cs.mz));
+
+ // writeline(string.Format("#10,{0},{1},{2},", 1.354,-1.549,0.972));
+
+ System.Threading.Thread.Sleep(100);
+ counter++;
+ }
+ catch { }
+ }
+ }
+
+ DateTime GetFromGps(int weeknumber, int seconds)
+ {
+ DateTime datum = new DateTime(1980, 1, 6, 0, 0, 0, DateTimeKind.Utc);
+ DateTime week = datum.AddDays(weeknumber * 7);
+ DateTime time = week.AddSeconds(seconds);
+ return time;
+ }
+
+ void GetGPSTime(out int weeknumber, out int seconds)
+ {
+ DateTime datum = new DateTime(1980, 1, 6, 0, 0, 0,DateTimeKind.Utc);
+
+ TimeSpan ts = DateTime.Now - datum;
+
+ weeknumber = ((int)ts.TotalDays / 7);
+
+ ts = DateTime.Now - GetFromGps(weeknumber, 0);
+
+ seconds = (int)ts.TotalSeconds;
+ }
+
+
+ void GetDegrees(double x, double y, double z, out double latitude, out double longitude)
+ {
+ double deg = 0.01745329252;
+ double r = Math.Sqrt(x * x + y * y);
+ longitude = Math.Asin(y / r) / deg;
+ if (longitude > 180d)
+ longitude = 180d - longitude;
+
+ latitude = Math.Atan(z / r) / deg;
+ }
+
+ void GetGeo(out double x, out double y, out double z, double latitude, double longitude, double alt)
+ {
+ double wgs84a = 6378137;
+ double wgs84f = 1.0 / 298.257223563;
+ double wgs84b = wgs84a * (1.0 - wgs84f);
+
+ double clat = Math.Cos(deg2rad * latitude);
+ double slat = Math.Sin(deg2rad * latitude);
+ double clon = Math.Cos(deg2rad * longitude);
+ double slon = Math.Sin(deg2rad * longitude);
+
+ var ecc = Math.Sqrt(2 * wgs84f - Math.Pow(wgs84f, 2));
+ var esq = ecc * ecc;
+
+ alt = alt * 0.0001;
+
+ // var rrnrm = radcur (flat);
+ var rn = wgs84a;/// (Math.Sqrt(1-esq)*(slat*slat));// rrnrm[1];
+ var re = wgs84a;// rrnrm[0];
+
+ x = (rn + alt) * clat * clon;
+ y = (rn + alt) * clat * slon;
+ z = ((1 - esq) * rn + (alt)) * slat;
+
+ }
+
+ void writeline(string line)
+ {
+ comPort.Write(line + checksum(line) + "\r\n");
+ }
+
+ byte checksum(string line)
+ {
+ byte ans = 0;
+ foreach (char ch in line.ToCharArray())
+ {
+ ans += (byte)ch;
+ }
+ ans = (byte)(ans ^ 0xff);
+
+ return ans;
+ }
+
+ private void SerialOutput_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ }
+
+
+
+ }
+}
diff --git a/Tools/ArdupilotMegaPlanner/SerialOutput2.resx b/Tools/ArdupilotMegaPlanner/SerialOutput2.resx
new file mode 100644
index 0000000000..222a74addf
--- /dev/null
+++ b/Tools/ArdupilotMegaPlanner/SerialOutput2.resx
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABILAAASCwAAAAAAAAAA
+ AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADOxkjAtnoOAKpJ4vyiK
+ c+8nh3D/J4Zv/yeHcP8oi3PvKpJ4vy6fg4AzsZIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADjGo2AyspPfLZ+D/yiQ
+ d/8hlXj/G6F9/xeqg/8XqYL/GKqD/xuhfv8ilnn/KZB3/y2fhP8yspPfN8ajYAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADvRrDA1vpzfL6uN/yel
+ hP8XvJD/DMyY/wfQl/8FzJP/A8qS/wPJkf8EypL/BsyU/wnRmP8PzZn/Gb2R/yemhP8tqoz/Mb2a3zbQ
+ qkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAA4y6ZgMbWV/yin
+ iP8WwZP/Btqf/wDPlf8AyI7/A8aP/yfNnv9T2LP/UNax/03XsP8506b/G8ya/wHKkf8F0Zf/CNuf/xLB
+ kv8fpYT/J7KQ/y7IomAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAAAAAAAAAAAAAAAAAAAAAANcajny+w
+ kf8hqoj/CNSd/wDRlf8Axor/Hcyd/3Lhwf+p7Nj/o+vV/57m0/+X5dD/k+TN/4/jzf+K5Mz/fuHH/0PW
+ rf8HzJT/ANCT/wDRlv8OpX//HayI/yrFn58AAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAADDC
+ nmAtro7/H62J/wPWmv8Ay47/AMaO/3XhxP+e6tT/mObP/5Pjy/+Q4sr/jODJ/4ffx/+C3MT/f9vC/3nb
+ wf9y2r7/adq7/2DauP8ZzZv/Fdae/8T/9/9WxKj/HKuI/y7IomAAAAAAAAAAAAAAAAD///8AAAAAAAAA
+ AAAiuZMwKKyM/x6ohf8C1Zr/AMmL/wHGjv+49OL///////////9+3ML/f9zD/4Dcwv9+28L/e9rA/3bZ
+ vv9w1rr/Z9S4/17Rs/9Qz63/Qcyn/3LewP////////////n///8MpH7/JbKP/zXQqUAAAAAAAAAAAP//
+ /wAAAAAAAAAAABymhN8dnn//BNGa/wDKjP8AxY3/sfHf/////////////////2nXt/9w1rv/c9e8/3TX
+ vP9x17z/a9W5/2TTtf9Y0K//SMyp/zXFoP9i07X/////////////////f/LR/wDQlf8epYT/Mb2a3wAA
+ AAAAAAAA////AAAAAAADlnJgFZR1/wq4iv8AzpH/AMCD/4rmzf//////////////////////WdGv/2PU
+ tf9p1rf/atS4/2nUtv9i0rT/Vc+u/0fKpv8zxZz/Ws+w//////////////////////8GyJL/ANCS/xLB
+ kv8tq4z/OMajYAAAAAD///8AAAAAAACHZt8NkW//ANKV/wDChP9i27r//////////////////////9Dx
+ 6P9MzKn/Vc+v/17Rsv9g0rP/XNCx/1XNrv9Fyaf/McSd/1fPr///////////////////////QM2m/ynK
+ oP8JzJX/C9yh/ymmhf80spPfAAAAAP///wAAcUwwAHtc/wCrfP8AyIv/AMKK////////////////////
+ /////////////5Dgyv9Gyqb/TMyq/07Nq/9MzKn/Qcmj/y/Fnf9Wzq3//////////////////////57k
+ 0v8av5T/Lceg/yzOo/8M05v/Hr6T/zCghf80spIw////AABoRYAAclT/AL2H/wDBhf9R1rL/////////
+ ////////4vfw//////////////////H8+P9KzKn/Ocah/zTFnv8qwpj/Us2t////////////////////
+ ////////DLqM/yDBlv8wxp//OM6m/xPPm/8Xz53/LZF5/y+fg4////8AAGNAvwB7Wf8Aw4j/ALyC/4bj
+ yP+g5tL/g93E/2HSsv9Pzqz/Us6s//////////////////////9Yzq//Gr2S/0jLp///////////////
+ /////////////yrDm/8SvI//JMGY/zDHn/81zKT/Is2e/xTUnf8nl3v/LJJ5v////wAAXz3vAIlg/wDA
+ hf8AuoD/quzZ/5Hjyv9628D/ada2/1jRsP9Jy6f/a9a4//////////////////////+Y4s7/////////
+ //////////////////+c4tD/AbaH/xW8kf8jwZj/LcWd/y/Jn/8kzJ3/E9Ca/yGjgf8ri3Tv////AABd
+ PP8Ak2b/AL6D/w/Ekv+m6tf/j+HJ/3vawP9p1rf/W9Gx/0rNqf85yJ//Nsaf////////////////////
+ /////////////////////////////wCwe/8AtoT/ELqP/xu+k/8jwZj/KMeb/yHKm/8QzZf/HqyG/ymI
+ cf////8AAF07/wCSZP8AvYL/GMWU/6Dn1P+K38f/ddi+/27Wuf+E3MX/leHN/6fm1f+l5tX/neLQ////
+ ////////////////////////////////////////j9/J/27Vuv9Tzq7/JsKY/xa/kv8aw5T/FcaW/wvL
+ lf8aqoT/J4dw/////wAAXTv/AJFk/wC9gP8GwY3/mObQ/5rkz/+26dv/y/Hl/8Dt3/+06tz/pebV/5bg
+ zP+g5NL//////////////v///f7+//7+/v//////7fn2////////////tOnb/6Ll0v+v6Nj/jeDI/zXK
+ o/8IxJD/BMqS/xaqgv8lh2//////AABeO+8AgVf/AL1//wDBif/R9uv/1PPq/8Tv5P+36t3/rujY/6Lk
+ 0v+U4cv/jt7J//j8+///////+/38//f8+//2+/r/+Pz7//3+/v/m9/P/9Pv6//D6+P9/28L/jd7J/5jj
+ z/+h5dL/qOvX/4Hmyf8f1J//E596/yOJcO////8AAGA8vwB3U/8p06P/hufM/8Ty5f/D7+T/s+vb/6bm
+ 1P+c4c//j9/K/4vcyP/t+fb///7///j8/P/0+/r/8vr5//P7+f/1+/r/+/39///////i9fL/ZNO1/3HW
+ vP992sH/htzG/4vhyv+S5dD/mO7W/6X74v80noT/Io90v////wAAZkCAAHla/33ny/945cb/nunV/7Xr
+ 3v+l5tT/luDN/4ndxv992cL/1vLq//v9/P/1+/n/8vv4//L69//z+/j/9Pv5/7Xo2//x+vn/////////
+ //+y59n/aNS3/3LWvP932r//fNzD/4Ljyf+J7ND/l/bd/yORdf8knH6A////AABuRzAAdlT/Xc6x/23o
+ xv9s4MH/qurZ/5jiz/+I3cb/edjA/8ju5f/3/Pv/8vv4//H6+P/y+/j/6/f0/7np3v/7/fz//v7+/6fk
+ 1f+56tz///////////9h0bT/aNW4/23Wu/9v3L//dOLG/37w0f9m1rn/Hpt8/ymujTD///8AAAAAAACD
+ X98po4X/Z+7K/1vgvP+A4sf/jOHK/3rZwv+r59f/9Pv6/+/69//v+vf/8vr4/9fy6/9n0rf/VM6t/6Di
+ 0v/N7+f/adO4/1PMrf9t1Lr/i9zI/1/Rs/9h0rX/ZNe4/2bbvf9s5sb/ePfV/z2ylf8lrozfAAAAAP//
+ /wAAAAAAAJNsYAWQbf9U1rP/Vee//0rYsf993sb/pebV//P7+v/s+Pb/6/f1/+749v+s5tj/Vc2u/1jP
+ r/9ZzrD/btW5/1bOr/9Wza//Vs6v/1fOr/9Z0LD/WdCy/1vTtP9d1rX/Xt+8/2btyP9k4L//IaaF/y7D
+ nmAAAAAA////AAAAAAAAAAAAD6J9zyCjgv9S68L/P9+0/2Pevv/5////7/v6/+v59//j9/L/gtvF/1PN
+ r/9Wz7D/Wc+x/1nQsf9Zz7H/WM6w/1fPsP9UzrD/VM+w/1TPrv9U0a//U9Oy/1Tatv9Z5sD/Y/LL/zSx
+ lP8qupbPAAAAAAAAAAD///8AAAAAAAAAAAAYto4wGaeE/y23lP8+5rn/6/////j////w//3/ve/i/2bV
+ uP9Tzq7/Vc+v/1jPsP9Z0LL/WM+w/1fOsf9Wz7D/Us2w/1HOrf9Qzq3/T9Cu/0zSr/9M2LP/TeC5/1bt
+ xP9HxaX/KLKQ/zTPqDAAAAAAAAAAAP///wAAAAAAAAAAAAAAAAAkvpdgG6iF/y++m//e/////P///3rl
+ yf9G0K3/VdKy/1bPsf9Wz7H/Vs6w/1bPsP9Sza//Ucyu/0/Nrf9NzKz/S82s/0fOrP9G0a7/QdWv/0Le
+ tP9I6L7/Q8Ok/yitjP8yyKJgAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAmwJlgG6iF/yK3
+ kP8k3q7/H9el/x7Pn/8tzKT/Q9Cs/1HQsP9Q0K7/TM6u/0nMrf9Hzaz/RMyp/0LNqf8+zqn/ONGo/zTV
+ qf833rD/O+S4/zvCof8orIv/MMSfYAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAkvpdgG6iE/xukgv8gy53/HNql/xzRn/8czJz/HcmZ/yXJnP8qyp7/Lcqg/yzLn/8nypz/JMqc/yTO
+ n/8l1KT/KN2r/y3Tpv8nq4n/JaqJ/yzAm2AAAAAAAAAAAAAAAAAAAAAAAAAAAP///wAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAato8wFKN/zxCScv8RnHn/DbqM/wjIlP8GyZT/BsaS/wbFkf8GxZH/B8WR/wfH
+ k/8IypX/DMmV/xG3jP8WoX3/Fph2/xqkgs8ft5EwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJVvYACGZM8Aelr/AHlZ/wCFX/8AiWL/AJlr/wCb
+ bP8AlGf/AI5k/wB/W/8AeFj/AHtb/wCHZd8ClXBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwSzAAaESAAGI/vwBf
+ Pd8AXTz/AF08/wBdPP8AXz3fAGJAvwBoRIAAcUswAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
+ /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
+ /wD///8A////AP///wD///8A/+AD//+AAP/+AAA//AAAH/gAAA/wAAAH4AAAA+AAAAPAAAABwAAAAYAA
+ AACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAwAAAAcAAAAHgAAAD4AAAA/AA
+ AAf4AAAP/AAAH/4AAD//gAD//+AD//////8=
+
+
+
\ No newline at end of file
diff --git a/Tools/ArdupilotMegaPlanner/mavcmd.xml b/Tools/ArdupilotMegaPlanner/mavcmd.xml
index 6a8b0f2827..a8636feda6 100644
--- a/Tools/ArdupilotMegaPlanner/mavcmd.xml
+++ b/Tools/ArdupilotMegaPlanner/mavcmd.xml
@@ -45,7 +45,7 @@
- Alt
+
@@ -281,9 +281,9 @@
- Lat
- Long
- Alt
+
+
+
diff --git a/Tools/ArdupilotMegaPlanner/temp.Designer.cs b/Tools/ArdupilotMegaPlanner/temp.Designer.cs
index 1adfa2a45b..903c1d4f5c 100644
--- a/Tools/ArdupilotMegaPlanner/temp.Designer.cs
+++ b/Tools/ArdupilotMegaPlanner/temp.Designer.cs
@@ -47,6 +47,7 @@
this.BUT_flashdl = new ArdupilotMega.Controls.MyButton();
this.BUT_wipeeeprom = new ArdupilotMega.Controls.MyButton();
this.button1 = new ArdupilotMega.Controls.MyButton();
+ this.myButton1 = new ArdupilotMega.Controls.MyButton();
this.SuspendLayout();
//
// label1
@@ -234,11 +235,22 @@
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
+ // myButton1
+ //
+ this.myButton1.Location = new System.Drawing.Point(542, 127);
+ this.myButton1.Name = "myButton1";
+ this.myButton1.Size = new System.Drawing.Size(75, 23);
+ this.myButton1.TabIndex = 21;
+ this.myButton1.Text = "MD";
+ this.myButton1.UseVisualStyleBackColor = true;
+ this.myButton1.Click += new System.EventHandler(this.myButton1_Click);
+ //
// temp
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(685, 285);
+ this.Controls.Add(this.myButton1);
this.Controls.Add(this.BUT_paramgen);
this.Controls.Add(this.BUT_follow_me);
this.Controls.Add(this.BUT_georefimage);
@@ -287,5 +299,6 @@
private ArdupilotMega.Controls.MyButton BUT_georefimage;
private ArdupilotMega.Controls.MyButton BUT_follow_me;
private Controls.MyButton BUT_paramgen;
+ private Controls.MyButton myButton1;
}
}
\ No newline at end of file
diff --git a/Tools/ArdupilotMegaPlanner/temp.cs b/Tools/ArdupilotMegaPlanner/temp.cs
index a7f750f1cf..8df60453fb 100644
--- a/Tools/ArdupilotMegaPlanner/temp.cs
+++ b/Tools/ArdupilotMegaPlanner/temp.cs
@@ -900,6 +900,11 @@ namespace ArdupilotMega
ParameterMetaDataParser.GetParameterInformation();
}
+ private void myButton1_Click(object sender, EventArgs e)
+ {
+ new SerialOutput2().Show();
+ }
+
}
}