APM Planner 1.1.23

firmware setup mod
+ extra cygwin dll zipped
This commit is contained in:
Michael Oborne 2012-01-20 12:07:23 +08:00
parent c8e5fb0546
commit 0c7bd8885e
7 changed files with 372 additions and 47 deletions

View File

@ -247,6 +247,12 @@
<Compile Include="Controls\ImageLabel.Designer.cs">
<DependentUpon>ImageLabel.cs</DependentUpon>
</Compile>
<Compile Include="Controls\XorPlus.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\XorPlus.Designer.cs">
<DependentUpon>XorPlus.cs</DependentUpon>
</Compile>
<Compile Include="HIL\Utils.cs" />
<Compile Include="ResEdit.cs">
<SubType>Form</SubType>
@ -420,6 +426,9 @@
<EmbeddedResource Include="Controls\ImageLabel.resx">
<DependentUpon>ImageLabel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\XorPlus.resx">
<DependentUpon>XorPlus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.fr.resx">
<DependentUpon>Configuration.cs</DependentUpon>
</EmbeddedResource>

View File

@ -0,0 +1,112 @@
namespace ArdupilotMega
{
partial class XorPlus
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label16 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.pictureBoxQuadX = new System.Windows.Forms.PictureBox();
this.pictureBoxQuad = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuadX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuad)).BeginInit();
this.SuspendLayout();
//
// label16
//
this.label16.AutoSize = true;
this.label16.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.label16.Location = new System.Drawing.Point(108, 211);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(192, 26);
this.label16.TabIndex = 11;
this.label16.Text = "NOTE: images are for presentation only\r\nwill work with hexa\'s etc";
//
// label15
//
this.label15.AutoSize = true;
this.label15.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.label15.Location = new System.Drawing.Point(151, 2);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(102, 13);
this.label15.TabIndex = 10;
this.label15.Text = "Frame Setup (+ or x)";
//
// pictureBoxQuadX
//
this.pictureBoxQuadX.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxQuadX.Image = global::ArdupilotMega.Properties.Resources.quadx;
this.pictureBoxQuadX.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.pictureBoxQuadX.Location = new System.Drawing.Point(210, 18);
this.pictureBoxQuadX.Name = "pictureBoxQuadX";
this.pictureBoxQuadX.Size = new System.Drawing.Size(190, 190);
this.pictureBoxQuadX.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBoxQuadX.TabIndex = 9;
this.pictureBoxQuadX.TabStop = false;
this.pictureBoxQuadX.Click += new System.EventHandler(this.pictureBoxQuadX_Click);
//
// pictureBoxQuad
//
this.pictureBoxQuad.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxQuad.Image = global::ArdupilotMega.Properties.Resources.quad;
this.pictureBoxQuad.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.pictureBoxQuad.Location = new System.Drawing.Point(3, 18);
this.pictureBoxQuad.Name = "pictureBoxQuad";
this.pictureBoxQuad.Size = new System.Drawing.Size(190, 190);
this.pictureBoxQuad.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBoxQuad.TabIndex = 8;
this.pictureBoxQuad.TabStop = false;
this.pictureBoxQuad.Click += new System.EventHandler(this.pictureBoxQuad_Click);
//
// XorPlus
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(404, 242);
this.Controls.Add(this.label16);
this.Controls.Add(this.label15);
this.Controls.Add(this.pictureBoxQuadX);
this.Controls.Add(this.pictureBoxQuad);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "XorPlus";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Frame Type";
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuadX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuad)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.PictureBox pictureBoxQuadX;
private System.Windows.Forms.PictureBox pictureBoxQuad;
}
}

View File

@ -0,0 +1,48 @@
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;
namespace ArdupilotMega
{
public partial class XorPlus : Form
{
public new event EventHandler Click;
/// <summary>
/// either X or +
/// </summary>
public string frame = "";
public XorPlus()
{
InitializeComponent();
}
private void pictureBoxQuad_Click(object sender, EventArgs e)
{
frame = "+";
if (Click != null)
{
Click(sender, new EventArgs());
}
this.Close();
}
private void pictureBoxQuadX_Click(object sender, EventArgs e)
{
frame = "X";
if (Click != null)
{
Click(sender, new EventArgs());
}
this.Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -410,7 +410,8 @@ namespace ArdupilotMega.GCSViews
void findfirmware(string findwhat)
{
List<software> items = new List<software>();
// build list
foreach (software temp in softwares)
{
if (temp.url.ToLower().Contains(findwhat.ToLower()))
@ -419,12 +420,13 @@ namespace ArdupilotMega.GCSViews
}
}
// none found
if (items.Count == 0)
{
MessageBox.Show("The requested firmware was not found.");
return;
}
else if (items.Count == 1)
else if (items.Count == 1) // 1 found so accept it
{
DialogResult dr = MessageBox.Show("Are you sure you want to upload " + items[0].name + "?", "Continue", MessageBoxButtons.YesNo);
if (dr == System.Windows.Forms.DialogResult.Yes)
@ -433,18 +435,47 @@ namespace ArdupilotMega.GCSViews
}
return;
}
else if (items.Count >= 2)
else if (items.Count == 2)
{
XorPlus select = new XorPlus();
MainV2.fixtheme(select);
select.ShowDialog();
int a = 0;
if (select.frame == "")
{
return;
}
foreach (software temp in items)
{
DialogResult dr = MessageBox.Show("Are you sure you want to upload " + items[0].name + "?", "Continue", MessageBoxButtons.YesNo);
if (dr == System.Windows.Forms.DialogResult.Yes)
if (select.frame == "+" && temp.name.Contains("Plus"))
{
update(items[0]);
return;
DialogResult dr = MessageBox.Show("Are you sure you want to upload " + items[a].name + "?", "Continue", MessageBoxButtons.YesNo);
if (dr == System.Windows.Forms.DialogResult.Yes)
{
update(items[a]);
return;
}
}
else if (select.frame == "X" && temp.name.Contains("X"))
{
DialogResult dr = MessageBox.Show("Are you sure you want to upload " + items[a].name + "?", "Continue", MessageBoxButtons.YesNo);
if (dr == System.Windows.Forms.DialogResult.Yes)
{
update(items[a]);
return;
}
}
a++;
}
}
else
{
MessageBox.Show("Something has gone wrong, to many firmware choices");
return;
}
}
private void pictureBoxAPM_Click(object sender, EventArgs e)

View File

@ -475,7 +475,7 @@ namespace ArdupilotMega.GCSViews
// map center
center = new GMapMarkerCross(MainMap.Position);
//top.Markers.Add(center);
top.Markers.Add(center);
MainMap.Zoom = 3;
@ -939,9 +939,11 @@ namespace ArdupilotMega.GCSViews
/// </summary>
private void writeKML()
{
// quickadd is for when loading wps from eeprom or file, to prevent slow, loading times
if (quickadd)
return;
// this is to share the current mission with the data tab
pointlist = new List<PointLatLngAlt>();
System.Diagnostics.Debug.WriteLine(DateTime.Now);
@ -952,6 +954,7 @@ namespace ArdupilotMega.GCSViews
objects.Markers.Clear();
}
// process and add home to the list
string home;
if (TXT_homealt.Text != "" && TXT_homelat.Text != "" && TXT_homelng.Text != "")
{
@ -967,6 +970,7 @@ namespace ArdupilotMega.GCSViews
home = "";
}
// setup for centerpoint calc etc.
double avglat = 0;
double avglong = 0;
double maxlat = -180;
@ -986,6 +990,7 @@ namespace ArdupilotMega.GCSViews
int usable = 0;
// number rows
System.Threading.Thread t1 = new System.Threading.Thread(delegate()
{
// thread for updateing row numbers

View File

@ -256,7 +256,7 @@
<value>3</value>
</data>
<data name="groupBoxElevons.Location" type="System.Drawing.Point, System.Drawing">
<value>21, 340</value>
<value>21, 349</value>
</data>
<data name="groupBoxElevons.Size" type="System.Drawing.Size, System.Drawing">
<value>409, 42</value>
@ -286,7 +286,7 @@
<value>NoControl</value>
</data>
<data name="CHK_revch3.Location" type="System.Drawing.Point, System.Drawing">
<value>287, 158</value>
<value>287, 154</value>
</data>
<data name="CHK_revch3.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 17</value>
@ -316,7 +316,7 @@
<value>NoControl</value>
</data>
<data name="CHK_revch4.Location" type="System.Drawing.Point, System.Drawing">
<value>315, 310</value>
<value>315, 306</value>
</data>
<data name="CHK_revch4.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 17</value>
@ -346,7 +346,7 @@
<value>NoControl</value>
</data>
<data name="CHK_revch2.Location" type="System.Drawing.Point, System.Drawing">
<value>71, 158</value>
<value>71, 154</value>
</data>
<data name="CHK_revch2.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 17</value>
@ -514,7 +514,7 @@
<value>9</value>
</data>
<data name="BARpitch.Location" type="System.Drawing.Point, System.Drawing">
<value>143, 61</value>
<value>143, 57</value>
</data>
<data name="BARpitch.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 211</value>
@ -535,7 +535,7 @@
<value>10</value>
</data>
<data name="BARthrottle.Location" type="System.Drawing.Point, System.Drawing">
<value>359, 61</value>
<value>359, 57</value>
</data>
<data name="BARthrottle.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 211</value>
@ -556,7 +556,7 @@
<value>11</value>
</data>
<data name="BARyaw.Location" type="System.Drawing.Point, System.Drawing">
<value>21, 304</value>
<value>21, 300</value>
</data>
<data name="BARyaw.Size" type="System.Drawing.Size, System.Drawing">
<value>288, 23</value>
@ -1563,33 +1563,6 @@
<data name="&gt;&gt;CHK_enableoptflow.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="pictureBox2.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="pictureBox2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="pictureBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>78, 271</value>
</data>
<data name="pictureBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 75</value>
</data>
<data name="pictureBox2.TabIndex" type="System.Int32, mscorlib">
<value>29</value>
</data>
<data name="&gt;&gt;pictureBox2.Name" xml:space="preserve">
<value>pictureBox2</value>
</data>
<data name="&gt;&gt;pictureBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox2.Parent" xml:space="preserve">
<value>tabHardware</value>
</data>
<data name="&gt;&gt;pictureBox2.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="linkLabelmagdec.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -1618,7 +1591,7 @@
<value>tabHardware</value>
</data>
<data name="&gt;&gt;linkLabelmagdec.ZOrder" xml:space="preserve">
<value>4</value>
<value>3</value>
</data>
<data name="label100.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@ -1645,7 +1618,7 @@
<value>tabHardware</value>
</data>
<data name="&gt;&gt;label100.ZOrder" xml:space="preserve">
<value>5</value>
<value>4</value>
</data>
<data name="TXT_declination.Location" type="System.Drawing.Point, System.Drawing">
<value>383, 57</value>
@ -1669,7 +1642,7 @@
<value>tabHardware</value>
</data>
<data name="&gt;&gt;TXT_declination.ZOrder" xml:space="preserve">
<value>6</value>
<value>5</value>
</data>
<data name="CHK_enableairspeed.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@ -1696,7 +1669,7 @@
<value>tabHardware</value>
</data>
<data name="&gt;&gt;CHK_enableairspeed.ZOrder" xml:space="preserve">
<value>7</value>
<value>6</value>
</data>
<data name="CHK_enablesonar.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@ -1723,7 +1696,7 @@
<value>tabHardware</value>
</data>
<data name="&gt;&gt;CHK_enablesonar.ZOrder" xml:space="preserve">
<value>8</value>
<value>7</value>
</data>
<data name="CHK_enablecompass.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@ -1750,6 +1723,33 @@
<value>tabHardware</value>
</data>
<data name="&gt;&gt;CHK_enablecompass.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="pictureBox2.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="pictureBox2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="pictureBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>78, 271</value>
</data>
<data name="pictureBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 75</value>
</data>
<data name="pictureBox2.TabIndex" type="System.Int32, mscorlib">
<value>29</value>
</data>
<data name="&gt;&gt;pictureBox2.Name" xml:space="preserve">
<value>pictureBox2</value>
</data>
<data name="&gt;&gt;pictureBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox2.Parent" xml:space="preserve">
<value>tabHardware</value>
</data>
<data name="&gt;&gt;pictureBox2.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="pictureBox4.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">