APM Planner 1.1.38

add ap param support
fix dtr
fix firmware screen on mono
misc mono fix's
mods from mandrolic - partial.
Add spanish - issue 515
new sitl images for attitude hil - issue 513
This commit is contained in:
Michael Oborne 2012-02-20 19:30:47 +08:00
parent 0aa5304dab
commit ce4437578a
53 changed files with 5645 additions and 1701 deletions

View File

@ -6,7 +6,7 @@ using System.IO;
namespace ArdupilotMega
{
public delegate void ProgressEventHandler(int progress);
public delegate void ProgressEventHandler(int progress,string status);
/// <summary>
/// Arduino STK interface

View File

@ -196,6 +196,47 @@ namespace ArdupilotMega
return "";
}
public enum ap_var_type
{
AP_PARAM_NONE = 0,
AP_PARAM_INT8,
AP_PARAM_INT16,
AP_PARAM_INT32,
AP_PARAM_FLOAT,
AP_PARAM_VECTOR3F,
AP_PARAM_VECTOR6F,
AP_PARAM_MATRIX3F,
AP_PARAM_GROUP
};
static string[] type_names = new string[] {
"NONE", "INT8", "INT16", "INT32", "FLOAT", "VECTOR3F", "VECTOR6F","MATRIX6F", "GROUP"
};
static byte type_size(ap_var_type type)
{
switch (type) {
case ap_var_type.AP_PARAM_NONE:
case ap_var_type.AP_PARAM_GROUP:
return 0;
case ap_var_type.AP_PARAM_INT8:
return 1;
case ap_var_type.AP_PARAM_INT16:
return 2;
case ap_var_type.AP_PARAM_INT32:
return 4;
case ap_var_type.AP_PARAM_FLOAT:
return 4;
case ap_var_type.AP_PARAM_VECTOR3F:
return 3*4;
case ap_var_type.AP_PARAM_VECTOR6F:
return 6*4;
case ap_var_type.AP_PARAM_MATRIX3F:
return 3*3*4;
}
return 0;
}
/// <summary>
/// return the software id from eeprom
/// </summary>
@ -223,7 +264,7 @@ namespace ArdupilotMega
byte[] buffer = port.download(1024 * 4);
port.Close();
if (buffer[0] != 'A' || buffer[1] != 'P') // this is the apvar header
if (buffer[0] != 'A' && buffer[0] != 'P' || buffer[1] != 'P' && buffer[1] != 'A') // this is the apvar header
{
return -1;
}
@ -263,6 +304,46 @@ namespace ArdupilotMega
Console.WriteLine();
}
}
if (buffer[0] == 'P' && buffer[1] == 'A' && buffer[2] == 5) // ap param
{
int pos = 4;
byte key = 0;
while (pos < (1024 * 4))
{
key = buffer[pos];
pos++;
int group = buffer[pos];
pos++;
int type = buffer[pos];
pos++;
int size = type_size((ap_var_type)Enum.Parse(typeof(ap_var_type), type.ToString()));
Console.Write("{0:X4}: type {1} ({2}) key {3} group {4} size {5}\n ", pos - 2, type, type_names[type], key, group, size);
if (key == 0xff)
{
Console.WriteLine("end sentinal at {0}", pos - 2);
break;
}
if (key == 0)
{
//Array.Reverse(buffer, pos, 2);
return BitConverter.ToUInt16(buffer, pos);
}
for (int i = 0; i < size; i++)
{
Console.Write(" {0:X2}", buffer[pos]);
pos++;
}
Console.WriteLine();
}
}
}
return -1;
}

View File

@ -219,7 +219,7 @@ namespace ArdupilotMega
if (Progress != null)
Progress((int)(((float)startaddress / (float)length) * 100));
Progress((int)(((float)startaddress / (float)length) * 100),"");
if (!sync())
{

View File

@ -262,7 +262,7 @@ namespace ArdupilotMega
if (Progress != null)
Progress((int)(((float)startaddress / (float)length) * 100));
Progress((int)(((float)startaddress / (float)length) * 100),"");
if (command[1] != 0)
{
@ -354,7 +354,7 @@ namespace ArdupilotMega
if (Progress != null)
Progress((int)(((float)startaddress / (float)length) * 100));
Progress((int)(((float)startaddress / (float)length) * 100),"");
if (command[1] != 0)
{

View File

@ -22,7 +22,7 @@
<UpdateMode>Background</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdatePeriodically>true</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>false</MapFileExtensions>
<TargetCulture>en-US</TargetCulture>
@ -242,7 +242,7 @@
<Compile Include="CommsTCPSerial.cs" />
<Compile Include="CommsUdpSerial.cs" />
<Compile Include="Controls\ImageLabel.cs">
<SubType>Component</SubType>
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ImageLabel.Designer.cs">
<DependentUpon>ImageLabel.cs</DependentUpon>
@ -250,12 +250,20 @@
<Compile Include="Controls\myGMAP.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ProgressReporter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\ProgressReporter.designer.cs">
<DependentUpon>ProgressReporter.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="Mavlink\MavlinkCRC.cs" />
<Compile Include="Mavlink\MavlinkUtil.cs" />
<Compile Include="SerialInput.cs">
<SubType>Form</SubType>
</Compile>
@ -301,7 +309,6 @@
<DependentUpon>JoystickSetup.cs</DependentUpon>
</Compile>
<Compile Include="MAVLinkTypes.cs" />
<Compile Include="MAVLinkTypesenum.cs" />
<Compile Include="Controls\MyButton.cs">
<SubType>Component</SubType>
</Compile>
@ -312,7 +319,7 @@
<Compile Include="Controls\MyLabel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="MyUserControl.cs">
<Compile Include="Controls\MyUserControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ArduinoSTKv2.cs">
@ -438,9 +445,54 @@
<EmbeddedResource Include="Controls\ImageLabel.resx">
<DependentUpon>ImageLabel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ProgressReporter.resx">
<DependentUpon>ProgressReporter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\XorPlus.resx">
<DependentUpon>XorPlus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Configuration.es-ES.resx">
<DependentUpon>Configuration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Firmware.es-ES.resx">
<DependentUpon>Firmware.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\FlightData.es-ES.resx">
<DependentUpon>FlightData.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\FlightPlanner.es-ES.resx">
<DependentUpon>FlightPlanner.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Help.es-ES.resx">
<DependentUpon>Help.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Simulation.es-ES.resx">
<DependentUpon>Simulation.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\Terminal.es-ES.resx">
<DependentUpon>Terminal.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="JoystickSetup.es-ES.resx">
<DependentUpon>JoystickSetup.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Log.es-ES.resx">
<DependentUpon>Log.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LogBrowse.es-ES.resx">
<DependentUpon>LogBrowse.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MavlinkLog.es-ES.resx">
<DependentUpon>MavlinkLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="RAW_Sensor.es-ES.resx">
<DependentUpon>RAW_Sensor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SerialInput.es-ES.resx">
<DependentUpon>SerialInput.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SerialInput.pl.resx">
<DependentUpon>SerialInput.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SerialInput.resx">
<DependentUpon>SerialInput.cs</DependentUpon>
</EmbeddedResource>
@ -713,6 +765,9 @@
<EmbeddedResource Include="SerialOutput.resx">
<DependentUpon>SerialOutput.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Setup\Setup.es-ES.resx">
<DependentUpon>Setup.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Setup\Setup.fr.resx">
<DependentUpon>Setup.cs</DependentUpon>
</EmbeddedResource>

View File

@ -12,9 +12,15 @@ namespace ArdupilotMega
public void toggleDTR()
{
DtrEnable = false;
System.Threading.Thread.Sleep(100);
DtrEnable = true;
base.DtrEnable = false;
base.RtsEnable = false;
System.Threading.Thread.Sleep(50);
base.DtrEnable = true;
base.RtsEnable = true;
System.Threading.Thread.Sleep(50);
}
}
}

View File

@ -81,11 +81,11 @@ namespace System.IO.Ports
string host = "127.0.0.1";
if (Windows.Forms.DialogResult.Cancel == ArdupilotMega.Common.InputBox("remote host", "Enter host name/ip (ensure remote end is already started)", ref host))
{
return;
throw new Exception("Canceled by request");
}
if (Windows.Forms.DialogResult.Cancel == ArdupilotMega.Common.InputBox("remote Port", "Enter remote port", ref dest))
{
return;
throw new Exception("Canceled by request");
}
Port = dest;
@ -94,6 +94,8 @@ namespace System.IO.Ports
client.NoDelay = true;
client.Client.NoDelay = true;
VerifyConnected();
return;
}

View File

@ -9,7 +9,7 @@ using System.Windows.Forms;
namespace ArdupilotMega
{
public partial class ImageLabel : ContainerControl
public partial class ImageLabel : UserControl //ContainerControl
{
public new event EventHandler Click;
@ -18,6 +18,9 @@ namespace ArdupilotMega
public ImageLabel()
{
text = "";
picture = new Bitmap(640,480);
InitializeComponent();
}

View File

@ -17,56 +17,97 @@ namespace ArdupilotMega
bool mouseover = false;
bool mousedown = false;
bool inOnPaint = false;
protected override void OnPaint(PaintEventArgs pevent)
{
//base.OnPaint(pevent);
Graphics gr = pevent.Graphics;
if (inOnPaint)
return;
Rectangle outside = new Rectangle(0,0,this.Width,this.Height);
inOnPaint = true;
LinearGradientBrush linear = new LinearGradientBrush(outside,Color.FromArgb(0x94,0xc1,0x1f),Color.FromArgb(0xcd,0xe2,0x96),LinearGradientMode.Vertical);
Pen mypen = new Pen(Color.FromArgb(0x79,0x94,0x29),2);
gr.FillRectangle(linear,outside);
gr.DrawRectangle(mypen,outside);
SolidBrush mybrush = new SolidBrush(Color.FromArgb(0x40,0x57,0x04));
if (mouseover)
try
{
SolidBrush brush = new SolidBrush(Color.FromArgb(73, 0x2b, 0x3a, 0x03));
Graphics gr = pevent.Graphics;
gr.FillRectangle(brush, 0, 0, this.Width, this.Height);
}
if (mousedown)
{
SolidBrush brush = new SolidBrush(Color.FromArgb(73, 0x2b, 0x3a, 0x03));
// gr.SmoothingMode = SmoothingMode.AntiAlias;
gr.FillRectangle(brush, 0, 0, this.Width, this.Height);
}
Rectangle outside = new Rectangle(0, 0, this.Width, this.Height);
if (!this.Enabled)
{
SolidBrush brush = new SolidBrush(Color.FromArgb(150, 0x2b, 0x3a, 0x03));
LinearGradientBrush linear = new LinearGradientBrush(outside, Color.FromArgb(0x94, 0xc1, 0x1f), Color.FromArgb(0xcd, 0xe2, 0x96), LinearGradientMode.Vertical);
gr.FillRectangle(brush, 0, 0, this.Width, this.Height);
Pen mypen = new Pen(Color.FromArgb(0x79, 0x94, 0x29), 2);
/*
gr.FillRectangle(new SolidBrush(Color.FromArgb(0x26, 0x27, 0x28)), outside);
GraphicsPath outline = new GraphicsPath();
float wid = this.Height / 5f;
float widright = wid + 1;
// tl
outline.AddArc(0, 0, wid, wid, 180, 90);
// top line
outline.AddLine(wid, 0, this.Width - widright, 0);
// tr
outline.AddArc(this.Width - widright, 0, wid, wid, 270, 90);
// br
outline.AddArc(this.Width - widright, this.Height - widright, wid, wid, 0, 90);
// bottom line
outline.AddLine(wid, this.Height - 1, this.Width - widright, this.Height - 1);
// bl
outline.AddArc(0, this.Height - widright, wid, wid, 90, 90);
gr.FillPath(linear, outline);
gr.DrawPath(mypen, outline);
*/
gr.FillRectangle(linear, outside);
gr.DrawRectangle(mypen, outside);
SolidBrush mybrush = new SolidBrush(Color.FromArgb(0x40, 0x57, 0x04));
if (mouseover)
{
SolidBrush brush = new SolidBrush(Color.FromArgb(73, 0x2b, 0x3a, 0x03));
gr.FillRectangle(brush, 0, 0, this.Width, this.Height);
}
if (mousedown)
{
SolidBrush brush = new SolidBrush(Color.FromArgb(73, 0x2b, 0x3a, 0x03));
gr.FillRectangle(brush, 0, 0, this.Width, this.Height);
}
if (!this.Enabled)
{
SolidBrush brush = new SolidBrush(Color.FromArgb(150, 0x2b, 0x3a, 0x03));
gr.FillRectangle(brush, 0, 0, this.Width, this.Height);
}
StringFormat stringFormat = new StringFormat();
stringFormat.Alignment = StringAlignment.Center;
stringFormat.LineAlignment = StringAlignment.Center;
string display = this.Text;
int amppos = display.IndexOf('&');
if (amppos != -1)
display = display.Remove(amppos, 1);
gr.DrawString(display, this.Font, mybrush, outside, stringFormat);
}
StringFormat stringFormat = new StringFormat();
stringFormat.Alignment = StringAlignment.Center;
stringFormat.LineAlignment = StringAlignment.Center;
string display = this.Text;
int amppos = display.IndexOf('&');
if (amppos != -1)
display = display.Remove(amppos,1);
gr.DrawString(display, this.Font, mybrush, outside, stringFormat);
catch { }
inOnPaint = false;
}
protected override void OnClick(EventArgs e)

View File

@ -1,19 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace System.Windows.Forms
{
public class MyUserControl : System.Windows.Forms.UserControl
{
protected override void WndProc(ref Message m)
{
try
{
base.WndProc(ref m);
}
catch { }
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace System.Windows.Forms
{
public class MyUserControl : System.Windows.Forms.UserControl
{
protected override void WndProc(ref Message m)
{
try
{
base.WndProc(ref m);
}
catch { }
}
}
}

View File

@ -0,0 +1,64 @@
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;
namespace ArdupilotMega
{
public partial class ProgressReporter : Form
{
bool cancel = false;
public ProgressReporter()
{
InitializeComponent();
cancel = false;
}
private void btnCancel_Click(object sender, EventArgs e)
{
cancel = true;
this.Close();
}
public void updateProgressAndStatus(int progress, string status)
{
//Console.WriteLine(progress + " " + status);
if (cancel)
{
throw new Exception("User Canceled");
}
if (this.IsDisposed)
{
return;
}
try
{
this.Invoke((MethodInvoker)delegate
{
lblProgressMessage.Text = status;
if (progress == -1)
{
this.progressBar1.Style = ProgressBarStyle.Marquee;
}
else
{
this.progressBar1.Style = ProgressBarStyle.Continuous;
this.progressBar1.Value = progress;
}
});
}
catch { }
System.Windows.Forms.Application.DoEvents();
}
}
}

View File

@ -0,0 +1,94 @@
using System.Windows.Forms;
namespace ArdupilotMega
{
partial class ProgressReporter
{
/// <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 Windows Form 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.progressBar1 = new System.Windows.Forms.ProgressBar();
this.lblProgressMessage = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressBar1.Location = new System.Drawing.Point(12, 82);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(277, 13);
this.progressBar1.TabIndex = 0;
//
// lblProgressMessage
//
this.lblProgressMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblProgressMessage.Location = new System.Drawing.Point(13, 13);
this.lblProgressMessage.Name = "lblProgressMessage";
this.lblProgressMessage.Size = new System.Drawing.Size(276, 66);
this.lblProgressMessage.TabIndex = 1;
this.lblProgressMessage.Text = "label1";
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(213, 109);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 2;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// ProgressReporter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(306, 144);
this.ControlBox = false;
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.lblProgressMessage);
this.Controls.Add(this.progressBar1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ProgressReporter";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Progress";
this.ResumeLayout(false);
}
#endregion
private ProgressBar progressBar1;
private System.Windows.Forms.Label lblProgressMessage;
private Button btnCancel;
}
}

View File

@ -1,120 +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>
<?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

@ -7,15 +7,19 @@ namespace ArdupilotMega
{
class myGMAP : GMap.NET.WindowsForms.GMapControl
{
public bool inOnPaint = false;
public bool inOnPaint = false;
string otherthread = "";
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
if (inOnPaint)
{
Console.WriteLine("Was in onpaint Gmap th:" + System.Threading.Thread.CurrentThread.Name);
Console.WriteLine("Was in onpaint Gmap th:" + System.Threading.Thread.CurrentThread.Name + " in " + otherthread);
return;
}
otherthread = System.Threading.Thread.CurrentThread.Name;
inOnPaint = true;
try

View File

@ -2,10 +2,11 @@
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using ArdupilotMega.Mavlink;
namespace ArdupilotMega
{
public class CurrentState: ICloneable
public class CurrentState : ICloneable
{
// multipliers
public float multiplierdist = 1;
@ -61,13 +62,13 @@ namespace ArdupilotMega
public float altd100 { get { return (alt / 100) % 10; } }
// accel
public float ax { get; set; }
public float ay { get; set; }
public float az { get; set; }
public float ax { get; set; }
public float ay { get; set; }
public float az { get; set; }
// gyro
public float gx { get; set; }
public float gy { get; set; }
public float gz { get; set; }
public float gx { get; set; }
public float gy { get; set; }
public float gz { get; set; }
// mag
public float mx { get; set; }
public float my { get; set; }
@ -77,14 +78,14 @@ namespace ArdupilotMega
public float turnrate { get { if (groundspeed <= 1) return 0; return (roll * 9.8f) / groundspeed; } }
//radio
public float ch1in { get; set; }
public float ch2in { get; set; }
public float ch3in { get; set; }
public float ch4in { get; set; }
public float ch5in { get; set; }
public float ch6in { get; set; }
public float ch7in { get; set; }
public float ch8in { get; set; }
public float ch1in { get; set; }
public float ch2in { get; set; }
public float ch3in { get; set; }
public float ch4in { get; set; }
public float ch5in { get; set; }
public float ch6in { get; set; }
public float ch7in { get; set; }
public float ch8in { get; set; }
// motors
public float ch1out { get; set; }
@ -95,8 +96,10 @@ namespace ArdupilotMega
public float ch6out { get; set; }
public float ch7out { get; set; }
public float ch8out { get; set; }
public float ch3percent {
get {
public float ch3percent
{
get
{
try
{
if (MainV2.comPort.param.ContainsKey("RC3_MIN"))
@ -108,10 +111,11 @@ namespace ArdupilotMega
return 0;
}
}
catch {
catch
{
return 0;
}
}
}
}
//nav state
@ -121,7 +125,7 @@ namespace ArdupilotMega
public float target_bearing { get; set; }
public float wp_dist { get { return (_wpdist * multiplierdist); } set { _wpdist = value; } }
public float alt_error { get { return _alt_error * multiplierdist; } set { _alt_error = value; } }
public float ber_error { get { return (target_bearing - yaw); } set { } }
public float ber_error { get { return (target_bearing - yaw); } set { } }
public float aspd_error { get { return _aspd_error * multiplierspeed; } set { _aspd_error = value; } }
public float xtrack_error { get; set; }
public float wpno { get; set; }
@ -132,10 +136,10 @@ namespace ArdupilotMega
float _alt_error;
public float targetaltd100 { get { return ((alt + alt_error) / 100) % 10; } }
public float targetalt { get { return (float)Math.Round(alt + alt_error,0); } }
public float targetalt { get { return (float)Math.Round(alt + alt_error, 0); } }
//airspeed_error = (airspeed_error - airspeed);
public float targetairspeed { get { return (float)Math.Round(airspeed + aspd_error / 100,0); } }
public float targetairspeed { get { return (float)Math.Round(airspeed + aspd_error / 100, 0); } }
//message
@ -187,7 +191,6 @@ namespace ArdupilotMega
public ushort rcoverridech8 { get; set; }
internal PointLatLngAlt HomeLocation = new PointLatLngAlt();
public float DistToMAV
{
get
@ -238,7 +241,6 @@ namespace ArdupilotMega
return (float)bearing;
}
}
// current firmware
public MainV2.Firmwares firmware = MainV2.Firmwares.ArduPlane;
public float freemem { get; set; }
@ -259,6 +261,7 @@ namespace ArdupilotMega
// reference
public DateTime datetime { get; set; }
public CurrentState()
{
mode = "";
@ -277,7 +280,7 @@ namespace ArdupilotMega
private DateTime lastupdate = DateTime.Now;
private DateTime lastwindcalc = DateTime.Now;
public void UpdateCurrentSettings(System.Windows.Forms.BindingSource bs)
{
UpdateCurrentSettings(bs, false, MainV2.comPort);
@ -311,28 +314,22 @@ namespace ArdupilotMega
try
{
while (messages.Count > 5)
{
messages.RemoveAt(0);
}
while (messages.Count > 5)
{
messages.RemoveAt(0);
}
messages.Add(logdata + "\n");
}
catch { }
mavinterface.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT] = null;
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_SCALED] != null) // hil
byte[] bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_SCALED];
if (bytearray != null) // hil
{
var hil = new ArdupilotMega.MAVLink.__mavlink_rc_channels_scaled_t();
object temp = hil;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_SCALED], ref temp, 6);
hil = (MAVLink.__mavlink_rc_channels_scaled_t)(temp);
var hil = bytearray.ByteArrayToStructure<MAVLink.__mavlink_rc_channels_scaled_t>(6);
hilch1 = hil.chan1_scaled;
hilch2 = hil.chan2_scaled;
@ -346,15 +343,11 @@ namespace ArdupilotMega
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_SCALED] = null;
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT];
if (bytearray != null)
{
MAVLink.__mavlink_nav_controller_output_t nav = new MAVLink.__mavlink_nav_controller_output_t();
object temp = nav;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT], ref temp, 6);
nav = (MAVLink.__mavlink_nav_controller_output_t)(temp);
var nav = bytearray.ByteArrayToStructure<MAVLink.__mavlink_nav_controller_output_t>(6);
nav_roll = nav.nav_roll;
nav_pitch = nav.nav_pitch;
@ -368,15 +361,12 @@ namespace ArdupilotMega
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT] = null;
}
#if MAVLINK10
if (mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_HEARTBEAT] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_HEARTBEAT];
if (bytearray != null)
{
ArdupilotMega.MAVLink.__mavlink_heartbeat_t hb = new ArdupilotMega.MAVLink.__mavlink_heartbeat_t();
object temp = hb;
MAVLink.ByteArrayToStructure(mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_HEARTBEAT], ref temp, 6);
hb = (ArdupilotMega.MAVLink.__mavlink_heartbeat_t)(temp);
var hb = bytearray.ByteArrayToStructure<MAVLink.__mavlink_heartbeat_t>(6);
string oldmode = mode;
@ -465,15 +455,10 @@ namespace ArdupilotMega
}
if (mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS] != null)
bytearray = mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS];
if (bytearray != null)
{
ArdupilotMega.MAVLink.__mavlink_sys_status_t sysstatus = new ArdupilotMega.MAVLink.__mavlink_sys_status_t();
object temp = sysstatus;
MAVLink.ByteArrayToStructure(mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS], ref temp, 6);
sysstatus = (ArdupilotMega.MAVLink.__mavlink_sys_status_t)(temp);
var sysstatus = bytearray.ByteArrayToStructure<MAVLink.__mavlink_sys_status_t>(6);
battery_voltage = sysstatus.voltage_battery;
battery_remaining = sysstatus.battery_remaining;
@ -484,15 +469,11 @@ namespace ArdupilotMega
}
#else
if (mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SYS_STATUS];
if (bytearray != null)
{
ArdupilotMega.MAVLink.__mavlink_sys_status_t sysstatus = new ArdupilotMega.MAVLink.__mavlink_sys_status_t();
object temp = sysstatus;
MAVLink.ByteArrayToStructure(mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS], ref temp, 6);
sysstatus = (ArdupilotMega.MAVLink.__mavlink_sys_status_t)(temp);
var sysstatus = bytearray.ByteArrayToStructure<MAVLink.__mavlink_sys_status_t>(6);
armed = sysstatus.status;
@ -603,34 +584,21 @@ namespace ArdupilotMega
}
//MAVLink.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS] = null;
}
}
#endif
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SCALED_PRESSURE] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SCALED_PRESSURE];
if (bytearray != null)
{
var pres = new ArdupilotMega.MAVLink.__mavlink_scaled_pressure_t();
object temp = pres;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SCALED_PRESSURE], ref temp, 6);
pres = (MAVLink.__mavlink_scaled_pressure_t)(temp);
var pres = bytearray.ByteArrayToStructure<MAVLink.__mavlink_scaled_pressure_t>(6);
press_abs = pres.press_abs;
press_temp = pres.temperature;
press_temp = pres.temperature;
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SENSOR_OFFSETS] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SENSOR_OFFSETS];
if (bytearray != null)
{
var sensofs = new ArdupilotMega.MAVLink.__mavlink_sensor_offsets_t();
object temp = sensofs;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SENSOR_OFFSETS], ref temp, 6);
sensofs = (MAVLink.__mavlink_sensor_offsets_t)(temp);
var sensofs = bytearray.ByteArrayToStructure<MAVLink.__mavlink_sensor_offsets_t>(6);
mag_ofs_x = sensofs.mag_ofs_x;
mag_ofs_y = sensofs.mag_ofs_y;
@ -650,15 +618,11 @@ namespace ArdupilotMega
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_ATTITUDE] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_ATTITUDE];
if (bytearray != null)
{
var att = new ArdupilotMega.MAVLink.__mavlink_attitude_t();
object temp = att;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_ATTITUDE], ref temp, 6);
att = (MAVLink.__mavlink_attitude_t)(temp);
var att = bytearray.ByteArrayToStructure<MAVLink.__mavlink_attitude_t>(6);
roll = att.roll * rad2deg;
pitch = att.pitch * rad2deg;
@ -669,15 +633,10 @@ namespace ArdupilotMega
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_ATTITUDE] = null;
}
#if MAVLINK10
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW_INT] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW_INT];
if (bytearray != null)
{
var gps = new MAVLink.__mavlink_gps_raw_int_t();
object temp = gps;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW_INT], ref temp, 6);
gps = (MAVLink.__mavlink_gps_raw_int_t)(temp);
var gps = bytearray.ByteArrayToStructure<MAVLink.__mavlink_gps_raw_int_t>(6);
lat = gps.lat * 1.0e-7f;
lng = gps.lon * 1.0e-7f;
@ -693,17 +652,12 @@ namespace ArdupilotMega
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW] = null;
}
#else
#else
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW];
if (bytearray != null)
{
var gps = new MAVLink.__mavlink_gps_raw_t();
object temp = gps;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW], ref temp, 6);
gps = (MAVLink.__mavlink_gps_raw_t)(temp);
var gps = bytearray.ByteArrayToStructure<MAVLink.__mavlink_gps_raw_t>(6);
lat = gps.lat;
lng = gps.lon;
@ -717,48 +671,33 @@ namespace ArdupilotMega
groundspeed = gps.v;
groundcourse = gps.hdg;
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW] = null;
}
}
#endif
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_STATUS] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_STATUS];
if (bytearray != null)
{
var gps = new MAVLink.__mavlink_gps_status_t();
object temp = gps;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_STATUS], ref temp, 6);
gps = (MAVLink.__mavlink_gps_status_t)(temp);
var gps = bytearray.ByteArrayToStructure<MAVLink.__mavlink_gps_status_t>(6);
satcount = gps.satellites_visible;
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT] != null)
byte[] bytes = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT];
if (bytes != null)
{
var loc = new MAVLink.__mavlink_global_position_int_t();
object temp = loc;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT], ref temp, 6);
loc = (MAVLink.__mavlink_global_position_int_t)(temp);
var loc = bytearray.ByteArrayToStructure<MAVLink.__mavlink_global_position_int_t>(6);
//alt = loc.alt / 1000.0f;
lat = loc.lat / 10000000.0f;
lng = loc.lon / 10000000.0f;
}
#if MAVLINK10
if (mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_MISSION_CURRENT] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_MISSION_CURRENT];
if (bytearray != null)
{
ArdupilotMega.MAVLink.__mavlink_mission_current_t wpcur = new ArdupilotMega.MAVLink.__mavlink_mission_current_t();
object temp = wpcur;
MAVLink.ByteArrayToStructure(mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_MISSION_CURRENT], ref temp, 6);
wpcur = (ArdupilotMega.MAVLink.__mavlink_mission_current_t)(temp);
var wpcur = bytearray.ByteArrayToStructure<MAVLink.__mavlink_mission_current_t>(6);
int oldwp = (int)wpno;
wpno = wpcur.seq;
@ -770,31 +709,21 @@ namespace ArdupilotMega
//MAVLink.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT] = null;
}
#else
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION] != null)
#else
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION];
if (bytearray != null)
{
var loc = new MAVLink.__mavlink_global_position_t();
object temp = loc;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION], ref temp, 6);
loc = (MAVLink.__mavlink_global_position_t)(temp);
var loc = bytearray.ByteArrayToStructure<MAVLink.__mavlink_global_position_t>(6);
alt = loc.alt;
lat = loc.lat;
lng = loc.lon;
}
if (mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT];
if (bytearray != null)
{
ArdupilotMega.MAVLink.__mavlink_waypoint_current_t wpcur = new ArdupilotMega.MAVLink.__mavlink_waypoint_current_t();
object temp = wpcur;
MAVLink.ByteArrayToStructure(mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT], ref temp, 6);
wpcur = (ArdupilotMega.MAVLink.__mavlink_waypoint_current_t)(temp);
var wpcur = bytearray.ByteArrayToStructure<MAVLink.__mavlink_waypoint_current_t>(6);
int oldwp = (int)wpno;
@ -806,18 +735,13 @@ namespace ArdupilotMega
}
//MAVLink.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT] = null;
}
}
#endif
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_RAW] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_RAW];
if (bytearray != null)
{
var rcin = new MAVLink.__mavlink_rc_channels_raw_t();
object temp = rcin;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_RAW], ref temp, 6);
rcin = (MAVLink.__mavlink_rc_channels_raw_t)(temp);
var rcin = bytearray.ByteArrayToStructure<MAVLink.__mavlink_rc_channels_raw_t>(6);
ch1in = rcin.chan1_raw;
ch2in = rcin.chan2_raw;
@ -831,15 +755,10 @@ namespace ArdupilotMega
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_RAW] = null;
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SERVO_OUTPUT_RAW] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SERVO_OUTPUT_RAW];
if (bytearray != null)
{
var servoout = new MAVLink.__mavlink_servo_output_raw_t();
object temp = servoout;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SERVO_OUTPUT_RAW], ref temp, 6);
servoout = (MAVLink.__mavlink_servo_output_raw_t)(temp);
var servoout = bytearray.ByteArrayToStructure<MAVLink.__mavlink_servo_output_raw_t>(6);
ch1out = servoout.servo1_raw;
ch2out = servoout.servo2_raw;
@ -853,15 +772,11 @@ namespace ArdupilotMega
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_SERVO_OUTPUT_RAW] = null;
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU];
if (bytearray != null)
{
var imu = new MAVLink.__mavlink_raw_imu_t();
object temp = imu;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU], ref temp, 6);
imu = (MAVLink.__mavlink_raw_imu_t)(temp);
var imu = bytearray.ByteArrayToStructure<MAVLink.__mavlink_raw_imu_t>(6);
gx = imu.xgyro;
gy = imu.ygyro;
@ -878,15 +793,10 @@ namespace ArdupilotMega
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU] = null;
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SCALED_IMU] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SCALED_IMU];
if (bytearray != null)
{
var imu = new MAVLink.__mavlink_scaled_imu_t();
object temp = imu;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SCALED_IMU], ref temp, 6);
imu = (MAVLink.__mavlink_scaled_imu_t)(temp);
var imu = bytearray.ByteArrayToStructure<MAVLink.__mavlink_scaled_imu_t>(6);
gx = imu.xgyro;
gy = imu.ygyro;
@ -899,30 +809,17 @@ namespace ArdupilotMega
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU] = null;
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_VFR_HUD] != null)
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_VFR_HUD];
if (bytearray != null)
{
MAVLink.__mavlink_vfr_hud_t vfr = new MAVLink.__mavlink_vfr_hud_t();
object temp = vfr;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_VFR_HUD], ref temp, 6);
vfr = (MAVLink.__mavlink_vfr_hud_t)(temp);
var vfr = bytearray.ByteArrayToStructure<MAVLink.__mavlink_vfr_hud_t>(6);
groundspeed = vfr.groundspeed;
airspeed = vfr.airspeed;
alt = vfr.alt; // this might include baro
/*
if (vfr.throttle > 150 || vfr.throttle < 0)
{
Console.WriteLine(0);
}
else
{
Console.WriteLine(vfr.throttle);
}
*/
//climbrate = vfr.climb;
if ((DateTime.Now - lastalt).TotalSeconds >= 0.1 && oldalt != alt)
@ -938,22 +835,15 @@ namespace ArdupilotMega
//MAVLink.packets[MAVLink.MAVLINK_MSG_ID_VFR_HUD] = null;
}
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_MEMINFO] != null) // hil
bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_MEMINFO];
if (bytearray != null)
{
var mem = new ArdupilotMega.MAVLink.__mavlink_meminfo_t();
object temp = mem;
MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_MEMINFO], ref temp, 6);
mem = (MAVLink.__mavlink_meminfo_t)(temp);
var mem = bytearray.ByteArrayToStructure<MAVLink.__mavlink_meminfo_t>(6);
freemem = mem.freemem;
brklevel = mem.brkval;
}
}
//Console.WriteLine(DateTime.Now.Millisecond + " start ");
// update form
try
@ -994,7 +884,7 @@ namespace ArdupilotMega
We_fgo = We_fgo + Kw * We_error;
double wind_dir = (Math.Atan2(We_fgo, Wn_fgo) * (180 / Math.PI));
double wind_vel = (Math.Sqrt(Math.Pow(We_fgo,2) + Math.Pow(Wn_fgo,2)));
double wind_vel = (Math.Sqrt(Math.Pow(We_fgo, 2) + Math.Pow(Wn_fgo, 2)));
wind_dir = (wind_dir + 360) % 360;

View File

@ -1137,7 +1137,8 @@
resources.GetString("TUNE.Items16"),
resources.GetString("TUNE.Items17"),
resources.GetString("TUNE.Items18"),
resources.GetString("TUNE.Items19")});
resources.GetString("TUNE.Items19"),
resources.GetString("TUNE.Items20")});
resources.ApplyResources(this.TUNE, "TUNE");
this.TUNE.Name = "TUNE";
//

View File

@ -67,26 +67,30 @@ namespace ArdupilotMega.GCSViews
// fix for dup name
//XTRK_ANGLE_CD1.Name = "XTRK_ANGLE_CD";
XTRK_GAIN_SC1.Name = "XTRK_GAIN_SC";
// enable disable relevbant hardware tabs
if (MainV2.APMFirmware == MainV2.Firmwares.ArduPlane)
{
this.ConfigTabs.SuspendLayout();
ConfigTabs.SelectedIndex = 0;
TabAP.Enabled = true;
TabAC.Enabled = false;
this.ConfigTabs.ResumeLayout();
}
else
{
this.ConfigTabs.SuspendLayout();
ConfigTabs.SelectedIndex = 1;
TabAP.Enabled = false;
TabAC.Enabled = true;
this.ConfigTabs.ResumeLayout();
}
}
private void Configuration_Load(object sender, EventArgs e)
{
startup = true;
// enable disable relevbant hardware tabs
if (MainV2.APMFirmware == MainV2.Firmwares.ArduPlane)
{
ConfigTabs.SelectedIndex = 0;
TabAP.Enabled = true;
TabAC.Enabled = false;
}
else
{
ConfigTabs.SelectedIndex = 1;
TabAP.Enabled = false;
TabAC.Enabled = true;
}
// read tooltips
if (tooltips.Count == 0)
readToolTips();
@ -167,7 +171,7 @@ namespace ArdupilotMega.GCSViews
// setup language selection
CultureInfo ci = null;
foreach (string name in new string[] { "en-US", "zh-Hans", "zh-TW", "ru-RU", "Fr", "Pl", "it-IT" })
foreach (string name in new string[] { "en-US", "zh-Hans", "zh-TW", "ru-RU", "Fr", "Pl", "it-IT", "es-ES" })
{
ci = MainV2.getcultureinfo(name);
if (ci != null)
@ -931,10 +935,16 @@ namespace ArdupilotMega.GCSViews
((MyButton)sender).Enabled = false;
try
{
MainV2.comPort.getParamList();
}
catch { MessageBox.Show("Error: getting param list"); }
((MyButton)sender).Enabled = true;
startup = true;
Configuration_Load(null, null);

View File

@ -0,0 +1,600 @@
<?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>
<data name="CHK_speechaltwarning.Text" xml:space="preserve">
<value>Advertencia Altitud</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>HUD</value>
</data>
<data name="BUT_videostop.Text" xml:space="preserve">
<value>Parar</value>
</data>
<data name="label49.Text" xml:space="preserve">
<value>INT_MAX</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="CHK_speechbattery.Text" xml:space="preserve">
<value>Advertencia Batería</value>
</data>
<data name="CHK_enablespeech.Text" xml:space="preserve">
<value>Permitir Habla</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="label88.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>Ganancia</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="label82.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label83.Text" xml:space="preserve">
<value>P a T</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label80.Text" xml:space="preserve">
<value>Ganancia (cm)</value>
</data>
<data name="Value.HeaderText" xml:space="preserve">
<value>Valor</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label81.Text" xml:space="preserve">
<value>Compensación de Cabeceo</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label86.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>Longitud de Pista</value>
</data>
<data name="label87.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label56.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>Waypoints</value>
</data>
<data name="label84.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="CHK_speechcustom.Text" xml:space="preserve">
<value>Intervalo de Tiempo</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>FBW max</value>
</data>
<data name="label25.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="myLabel2.Text" xml:space="preserve">
<value>Ch6 Opt</value>
</data>
<data name="label54.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>FBW min</value>
</data>
<data name="label26.Text" xml:space="preserve">
<value>Formato Video</value>
</data>
<data name="label103.Text" xml:space="preserve">
<value>Posición</value>
</data>
<data name="groupBox8.Text" xml:space="preserve">
<value>Pid Servo Alabeo</value>
</data>
<data name="label57.Text" xml:space="preserve">
<value>INT_MAX</value>
</data>
<data name="label27.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="label102.Text" xml:space="preserve">
<value>Actitud</value>
</data>
<data name="groupBox9.Text" xml:space="preserve">
<value>Pid Servo Cabeceo</value>
</data>
<data name="label52.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Proporción</value>
</data>
<data name="label28.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="label101.Text" xml:space="preserve">
<value>Rates de Telemetría</value>
</data>
<data name="groupBox6.Text" xml:space="preserve">
<value>Cruce de corrección de la pista</value>
</data>
<data name="myLabel1.Text" xml:space="preserve">
<value>Ch7 Opt</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Max</value>
</data>
<data name="label55.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label29.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="groupBox7.Text" xml:space="preserve">
<value>Mantener Altitud</value>
</data>
<data name="label50.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Min</value>
</data>
<data name="label107.Text" xml:space="preserve">
<value>RC</value>
</data>
<data name="groupBox4.Text" xml:space="preserve">
<value>Nav WP</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Crucero</value>
</data>
<data name="label53.Text" xml:space="preserve">
<value>INT_MAX</value>
</data>
<data name="groupBox5.Text" xml:space="preserve">
<value>Rate de Acelerador</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>FS Valor</value>
</data>
<data name="CHK_GDIPlus.ToolTip" xml:space="preserve">
<value>OpenGL = DesactivadoGDI + = Activado</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Angulos de Navegación</value>
</data>
<data name="label51.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label104.Text" xml:space="preserve">
<value>Modo/Estado</value>
</data>
<data name="CHK_hudshow.Text" xml:space="preserve">
<value>Activar HUD superposición</value>
</data>
<data name="groupBox3.Text" xml:space="preserve">
<value>Acelerador 0-100%</value>
</data>
<data name="BUT_load.Text" xml:space="preserve">
<value>Cargar</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Crucero</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Velocidad Aire m/s</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>m/s</value>
</data>
<data name="Command.HeaderText" xml:space="preserve">
<value>Comando</value>
</data>
<data name="label108.Text" xml:space="preserve">
<value>Reiniciar APM</value>
</data>
<data name="label58.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="CHK_loadwponconnect.Text" xml:space="preserve">
<value>Cargar waypoints en la conexión?</value>
</data>
<data name="label64.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label65.Text" xml:space="preserve">
<value>INT_MAX</value>
</data>
<data name="BUT_rerequestparams.ToolTip" xml:space="preserve">
<value>Actualizar parametros del dispositivo</value>
</data>
<data name="label59.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label66.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="label67.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label60.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label61.Text" xml:space="preserve">
<value>INT_MAX</value>
</data>
<data name="label98.Text" xml:space="preserve">
<value>Unidad Velocidad</value>
</data>
<data name="label62.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="CHK_speechwaypoint.Text" xml:space="preserve">
<value>Waypoint</value>
</data>
<data name="label63.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="BUT_load.ToolTip" xml:space="preserve">
<value>Parámetros de carga de archivo</value>
</data>
<data name="groupBox16.Text" xml:space="preserve">
<value>Otras Mezclas</value>
</data>
<data name="groupBox19.Text" xml:space="preserve">
<value>Perder el Tiempo</value>
</data>
<data name="label99.Text" xml:space="preserve">
<value>NOTA: La pestaña de configuración no se muestran estas unidades, ya que son valores brutos.</value>
</data>
<data name="groupBox14.Text" xml:space="preserve">
<value>Energía / Alt Pid</value>
</data>
<data name="groupBox12.Text" xml:space="preserve">
<value>Cabeceo de navegación como PID</value>
</data>
<data name="label92.Text" xml:space="preserve">
<value>Dispositivo de Video</value>
</data>
<data name="label68.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="TabSetup.Text" xml:space="preserve">
<value>Ajustes</value>
</data>
<data name="Default.HeaderText" xml:space="preserve">
<value>Defecto</value>
</data>
<data name="groupBox15.Text" xml:space="preserve">
<value>Xtrack Pids</value>
</data>
<data name="label69.Text" xml:space="preserve">
<value>INT_MAX</value>
</data>
<data name="label30.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="groupBox10.Text" xml:space="preserve">
<value>Pid Servo Guiñada</value>
</data>
<data name="label90.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="groupBox13.Text" xml:space="preserve">
<value>Alt Nav Pid Cabeceo</value>
</data>
<data name="label93.Text" xml:space="preserve">
<value>Idioma de interfaz de usuario</value>
</data>
<data name="label32.Text" xml:space="preserve">
<value>IMAX </value>
</data>
<data name="label96.Text" xml:space="preserve">
<value>Joystick</value>
</data>
<data name="CHK_GDIPlus.Text" xml:space="preserve">
<value>GDI+ (tipo antiguo)</value>
</data>
<data name="label31.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="groupBox11.Text" xml:space="preserve">
<value>Alabeo Pid Nav</value>
</data>
<data name="label91.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label34.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label94.Text" xml:space="preserve">
<value>Color OSD</value>
</data>
<data name="label97.Text" xml:space="preserve">
<value>Unidad Distancia</value>
</data>
<data name="label36.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="label35.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label95.Text" xml:space="preserve">
<value>Habla</value>
</data>
<data name="label38.Text" xml:space="preserve">
<value>Cabeceo Max</value>
</data>
<data name="label37.Text" xml:space="preserve">
<value>Banco Max</value>
</data>
<data name="groupBox24.Text" xml:space="preserve">
<value>Rate Cabeceo</value>
</data>
<data name="BUT_Joystick.Text" xml:space="preserve">
<value>Joystick Setup</value>
</data>
<data name="groupBox25.Text" xml:space="preserve">
<value>Rate Alabeo</value>
</data>
<data name="label39.Text" xml:space="preserve">
<value>Cabeceo Min</value>
</data>
<data name="CHK_mavdebug.Text" xml:space="preserve">
<value>Mavlink mensaje depuración</value>
</data>
<data name="groupBox20.Text" xml:space="preserve">
<value>Estabilizar Guiñada</value>
</data>
<data name="groupBox21.Text" xml:space="preserve">
<value>Estabilizar Cabeceo</value>
</data>
<data name="groupBox22.Text" xml:space="preserve">
<value>Estabilizar Alabeo</value>
</data>
<data name="groupBox23.Text" xml:space="preserve">
<value>Rate Guiñada</value>
</data>
<data name="label74.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="label76.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="BUT_save.Text" xml:space="preserve">
<value>Guardar</value>
</data>
<data name="BUT_writePIDS.ToolTip" xml:space="preserve">
<value>Escribir parametros cambiados en el dispositivo</value>
</data>
<data name="label75.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label70.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="lblSTAB_D.Text" xml:space="preserve">
<value>Estabilizar D</value>
</data>
<data name="label77.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label72.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="CHK_lockrollpitch.Text" xml:space="preserve">
<value>Bloquear los valores de cabeceo y Alabeo</value>
</data>
<data name="label71.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label73.Text" xml:space="preserve">
<value>INT_MAX</value>
</data>
<data name="TabPlanner.Text" xml:space="preserve">
<value>Planificador</value>
</data>
<data name="BUT_writePIDS.Text" xml:space="preserve">
<value>Escribir Parámetros</value>
</data>
<data name="TabAP.Text" xml:space="preserve">
<value>ArduPlane</value>
</data>
<data name="label78.Text" xml:space="preserve">
<value>Mezcla de Timón</value>
</data>
<data name="NUM_tracklength.ToolTip" xml:space="preserve">
<value>En la ficha de datos de vuelo</value>
</data>
<data name="label79.Text" xml:space="preserve">
<value>Angulo de Entrada</value>
</data>
<data name="CHK_resetapmonconnect.Text" xml:space="preserve">
<value>Reiniciar APM al Conectar al USB</value>
</data>
<data name="mavScale.HeaderText" xml:space="preserve">
<value>mavScale</value>
</data>
<data name="TabAC.Text" xml:space="preserve">
<value>ArduCopter</value>
</data>
<data name="CHK_speechmode.Text" xml:space="preserve">
<value>Modo</value>
</data>
<data name="RawValue.HeaderText" xml:space="preserve">
<value>Valores Raw</value>
</data>
<data name="BUT_compare.Text" xml:space="preserve">
<value>Comparar Parametros</value>
</data>
<data name="BUT_save.ToolTip" xml:space="preserve">
<value>Guardar parametros a archivo</value>
</data>
<data name="label46.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label47.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="label45.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="label42.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="label43.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="label41.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="BUT_rerequestparams.Text" xml:space="preserve">
<value>Actualizar Parametros</value>
</data>
<data name="BUT_videostart.Text" xml:space="preserve">
<value>Iniciar</value>
</data>
</root>

View File

@ -2703,6 +2703,9 @@
<data name="TUNE.Items19" xml:space="preserve">
<value>CH6_OPTFLOW_KD</value>
</data>
<data name="TUNE.Items20" xml:space="preserve">
<value>CH6_NAV_I</value>
</data>
<data name="TUNE.Location" type="System.Drawing.Point, System.Drawing">
<value>417, 336</value>
</data>

View File

@ -580,7 +580,7 @@ namespace ArdupilotMega.GCSViews
MainV2.givecomport = false;
}
void port_Progress(int progress)
void port_Progress(int progress,string status)
{
Console.WriteLine("Progress {0} ", progress);
this.progress.Value = progress;

View File

@ -0,0 +1,132 @@
<?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>
<data name="label2.Text" xml:space="preserve">
<value>Images by Max Levine</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Por favor, haga clic en las imágenes de arriba para "versiones de vuelo"</value>
</data>
<data name="lbl_status.Text" xml:space="preserve">
<value>Estado</value>
</data>
<data name="BUT_setup.Text" xml:space="preserve">
<value>APM programa de instalación (plano y quad</value>
</data>
</root>

View File

@ -302,14 +302,7 @@ namespace ArdupilotMega.GCSViews
{
if (threadrun == 0) { return; }
this.BeginInvoke((System.Windows.Forms.MethodInvoker)delegate()
{
try
{
BUT_playlog.Text = "Pause";
}
catch { }
});
updatePlayPauseButton(true);
if (comPort.BaseStream.IsOpen)
MainV2.comPort.logreadmode = false;
@ -355,17 +348,11 @@ namespace ArdupilotMega.GCSViews
}
else
{
if (threadrun == 0) { return; }
try
{
this.Invoke((System.Windows.Forms.MethodInvoker)delegate()
{
BUT_playlog.Text = "Play";
});
}
catch { }
updatePlayPauseButton(false);
}
try
{
//Console.WriteLine(DateTime.Now.Millisecond);
@ -406,7 +393,7 @@ namespace ArdupilotMega.GCSViews
{
System.Threading.Thread.Sleep(1);
}
if (trackPoints.Count > int.Parse(MainV2.config["NUM_tracklength"].ToString()))
{
trackPoints.RemoveRange(0, trackPoints.Count - int.Parse(MainV2.config["NUM_tracklength"].ToString()));
@ -426,10 +413,13 @@ namespace ArdupilotMega.GCSViews
FlightPlanner.pointlist.AddRange(MainV2.comPort.wps);
}
routes.Markers.Clear();
routes.Routes.Clear();
while (gMapControl1.inOnPaint == true)
{
System.Threading.Thread.Sleep(1);
}
updateClearRoutes();
route = new GMapRoute(trackPoints, "track");
//track.Stroke = Pens.Red;
@ -493,8 +483,6 @@ namespace ArdupilotMega.GCSViews
gMapControl1.HoldInvalidation = false;
gMapControl1.Invalidate();
Application.DoEvents();
}
tracklast = DateTime.Now;
@ -505,9 +493,47 @@ namespace ArdupilotMega.GCSViews
Console.WriteLine("FD Main loop exit");
}
// to prevent cross thread calls while in a draw and exception
private void updateClearRoutes()
{
// not async
this.Invoke((System.Windows.Forms.MethodInvoker)delegate()
{
routes.Markers.Clear();
routes.Routes.Clear();
});
}
private void updatePlayPauseButton(bool playing)
{
if (playing)
{
this.BeginInvoke((System.Windows.Forms.MethodInvoker)delegate()
{
try
{
BUT_playlog.Text = "Pause";
}
catch { }
});
}
else
{
this.BeginInvoke((System.Windows.Forms.MethodInvoker)delegate()
{
try
{
BUT_playlog.Text = "Play";
}
catch { }
});
}
}
private void updateBindingSource()
{
this.Invoke((System.Windows.Forms.MethodInvoker)delegate()
this.BeginInvoke((System.Windows.Forms.MethodInvoker)delegate()
{
MainV2.cs.UpdateCurrentSettings(bindingSource1);
});

View File

@ -0,0 +1,276 @@
<?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>
<data name="pointCameraHereToolStripMenuItem.Text" xml:space="preserve">
<value>Punto de Cámara Aquí</value>
</data>
<data name="BUT_setmode.ToolTip" xml:space="preserve">
<value>Los cambios en el modo de la izquierda</value>
</data>
<data name="BUT_quickmanual.Text" xml:space="preserve">
<value>&amp;Manual</value>
</data>
<data name="BUT_playlog.Text" xml:space="preserve">
<value>Play/Pause</value>
</data>
<data name="BUT_setwp.ToolTip" xml:space="preserve">
<value>Cambia el waypoint de destino actual</value>
</data>
<data name="BUT_quickauto.ToolTip" xml:space="preserve">
<value>Cambiar modo a Auto</value>
</data>
<data name="goHereToolStripMenuItem.Text" xml:space="preserve">
<value>Volar a Aquí</value>
</data>
<data name="lbl_windvel.ToolTip" xml:space="preserve">
<value>Velocidad estimada del Viento</value>
</data>
<data name="BUT_RAWSensor.Text" xml:space="preserve">
<value>Ver Sensor Raw</value>
</data>
<data name="BUTrestartmission.ToolTip" xml:space="preserve">
<value>Reinicia la misión desde el principio</value>
</data>
<data name="TXT_alt.Text" xml:space="preserve">
<value>0</value>
</data>
<data name="BUT_clear_track.ToolTip" xml:space="preserve">
<value>Despeje el trayecto registrada en el mapa</value>
</data>
<data name="lbl_winddir.ToolTip" xml:space="preserve">
<value>Dirección estimada del Viento</value>
</data>
<data name="lbl_windvel.Text" xml:space="preserve">
<value>Vel: 0</value>
</data>
<data name="CB_tuning.ToolTip" xml:space="preserve">
<value>Mostrar el gráfico de la afinación, mostrando actitudes de destino vs real</value>
</data>
<data name="TXT_long.Text" xml:space="preserve">
<value>0</value>
</data>
<data name="BUT_log2kml.Text" xml:space="preserve">
<value>Log &gt; KML</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Zoom</value>
</data>
<data name="BUT_clear_track.Text" xml:space="preserve">
<value>Limpiar Ruta</value>
</data>
<data name="dataGridViewImageColumn1.HeaderText" xml:space="preserve">
<value>Up</value>
</data>
<data name="CHK_autopan.ToolTip" xml:space="preserve">
<value>Hace que el autopan mapa basado en la ubicación actual</value>
</data>
<data name="BUT_script.Text" xml:space="preserve">
<value>Script</value>
</data>
<data name="BUT_quickrtl.ToolTip" xml:space="preserve">
<value>Cambiar modo a RTL</value>
</data>
<data name="tabGauges.Text" xml:space="preserve">
<value>Indicadores</value>
</data>
<data name="CHK_autopan.Text" xml:space="preserve">
<value>Auto Pan</value>
</data>
<data name="BUT_joystick.Text" xml:space="preserve">
<value>Joystick</value>
</data>
<data name="Zoomlevel.ToolTip" xml:space="preserve">
<value>Cambiar nivel de Zoom</value>
</data>
<data name="CB_tuning.Text" xml:space="preserve">
<value>Tuning</value>
</data>
<data name="dataGridViewImageColumn2.HeaderText" xml:space="preserve">
<value>Abajo</value>
</data>
<data name="BUTactiondo.Text" xml:space="preserve">
<value>Hacer Acción</value>
</data>
<data name="BUTrestartmission.Text" xml:space="preserve">
<value>Reiniciar Misión</value>
</data>
<data name="BUT_quickmanual.ToolTip" xml:space="preserve">
<value>Cambiar Modo a Manual/Estabilizado</value>
</data>
<data name="BUT_RAWSensor.ToolTip" xml:space="preserve">
<value>Ver Gyro primas y los valores de Accel y complementos primas de Radio y salidas</value>
</data>
<data name="Gspeed.ToolTip" xml:space="preserve">
<value>Haga doble clic aquí para cambiar Max</value>
</data>
<data name="TXT_lat.Text" xml:space="preserve">
<value>0</value>
</data>
<data name="tabActions.Text" xml:space="preserve">
<value>Acciones</value>
</data>
<data name="BUTactiondo.ToolTip" xml:space="preserve">
<value>Realizar la acción hacia la izquierda</value>
</data>
<data name="BUT_Homealt.Text" xml:space="preserve">
<value>Establecer Altutid Casa</value>
</data>
<data name="lbl_winddir.Text" xml:space="preserve">
<value>Dir: 0</value>
</data>
<data name="BUT_loadtelem.Text" xml:space="preserve">
<value>Cargar Log</value>
</data>
<data name="BUT_joystick.ToolTip" xml:space="preserve">
<value>Configurar y habilitar el joystick</value>
</data>
<data name="BUT_Homealt.ToolTip" xml:space="preserve">
<value>Ajuste el alt de pantalla actual como 0, es decir, casa alt sea igual a 0</value>
</data>
<data name="recordHudToAVIToolStripMenuItem.Text" xml:space="preserve">
<value>Grabar HUD en AVI</value>
</data>
<data name="tabStatus.Text" xml:space="preserve">
<value>Estado</value>
</data>
<data name="BUT_quickauto.Text" xml:space="preserve">
<value>&amp;Auto</value>
</data>
<data name="BUT_setwp.Text" xml:space="preserve">
<value>Establecer WP</value>
</data>
<data name="tabTLogs.Text" xml:space="preserve">
<value>Logs Telemetría</value>
</data>
<data name="lbl_logpercent.Text" xml:space="preserve">
<value>0.00 %</value>
</data>
<data name="BUT_setmode.Text" xml:space="preserve">
<value>Configurar el modo</value>
</data>
<data name="NUM_playbackspeed.ToolTip" xml:space="preserve">
<value>Velocidad de Reproducción</value>
</data>
<data name="stopRecordToolStripMenuItem.Text" xml:space="preserve">
<value>Parar Grabación</value>
</data>
<data name="BUT_quickrtl.Text" xml:space="preserve">
<value>&amp;RTL</value>
</data>
</root>

View File

@ -0,0 +1,366 @@
<?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>
<data name="BUT_Camera.ToolTip" xml:space="preserve">
<value>Obtener ajustes de la cámara de solapamiento</value>
</data>
<data name="CHK_geheight.Text" xml:space="preserve">
<value>Verifique la altura</value>
</data>
<data name="lbl_homedist.Text" xml:space="preserve">
<value>Casa</value>
</data>
<data name="BUT_grid.Text" xml:space="preserve">
<value>Cuadrícula</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Lat</value>
</data>
<data name="GeoFencedownloadToolStripMenuItem.Text" xml:space="preserve">
<value>Descargar</value>
</data>
<data name="lbl_prevdist.Text" xml:space="preserve">
<value>Prev</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Zoom</value>
</data>
<data name="TXT_loiterrad.Text" xml:space="preserve">
<value>45</value>
</data>
<data name="comboBoxMapType.ToolTip" xml:space="preserve">
<value>Cambiar el tipo de mapa actual</value>
</data>
<data name="Param4.HeaderText" xml:space="preserve">
<value>P4</value>
</data>
<data name="loitertimeToolStripMenuItem.Text" xml:space="preserve">
<value>Tiempo</value>
</data>
<data name="CHK_altmode.Text" xml:space="preserve">
<value>Alt Absoluta</value>
</data>
<data name="BUT_loadkml.ToolTip" xml:space="preserve">
<value>Obtener ajustes de la cámara de solapamiento</value>
</data>
<data name="LBL_defalutalt.Text" xml:space="preserve">
<value>Altitud por Defecto</value>
</data>
<data name="Param2.HeaderText" xml:space="preserve">
<value>P2</value>
</data>
<data name="rotateMapToolStripMenuItem.Text" xml:space="preserve">
<value>Rotar Mapa</value>
</data>
<data name="Lat.HeaderText" xml:space="preserve">
<value>Lat</value>
</data>
<data name="textBox1.Text" xml:space="preserve">
<value>1. Connect2. Lea WP si es necesario.3. Asegúrese de que su posición de casa y ALT se ajusta4. Haga clic en el mapa para empezar a añadir WP</value>
</data>
<data name="SaveFile.Text" xml:space="preserve">
<value>Guardar WP en Archivo</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Long</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Alt (abs)</value>
</data>
<data name="loiterForeverToolStripMenuItem.Text" xml:space="preserve">
<value>Para Siempre</value>
</data>
<data name="Alt.HeaderText" xml:space="preserve">
<value>Alt</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Ubicación del Ratón</value>
</data>
<data name="dataGridViewImageColumn1.HeaderText" xml:space="preserve">
<value>Arriba</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Localización de Casa</value>
</data>
<data name="BUT_loadwpfile.Text" xml:space="preserve">
<value>Cargar Archivo WP</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Radio Perder Tiempo</value>
</data>
<data name="jumpstartToolStripMenuItem.Text" xml:space="preserve">
<value>Iniciar</value>
</data>
<data name="BUT_read.Text" xml:space="preserve">
<value>Leer WPs</value>
</data>
<data name="GeoFenceuploadToolStripMenuItem.Text" xml:space="preserve">
<value>Subir</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Alt</value>
</data>
<data name="LBL_WPRad.Text" xml:space="preserve">
<value>Radio WP</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Long</value>
</data>
<data name="Command.HeaderText" xml:space="preserve">
<value>Comandos</value>
</data>
<data name="Label1.Text" xml:space="preserve">
<value>Lat</value>
</data>
<data name="lbl_status.Text" xml:space="preserve">
<value>Estado</value>
</data>
<data name="setReturnLocationToolStripMenuItem.Text" xml:space="preserve">
<value>Ajustar Localización de Retorno</value>
</data>
<data name="panelMap.Text" xml:space="preserve">
<value>panel6</value>
</data>
<data name="clearPolygonToolStripMenuItem.Text" xml:space="preserve">
<value>Limpiar Poligono</value>
</data>
<data name="panelAction.Text" xml:space="preserve">
<value>Acción</value>
</data>
<data name="Param1.HeaderText" xml:space="preserve">
<value>P1</value>
</data>
<data name="button1.ToolTip" xml:space="preserve">
<value>Representar la actual misión contra los datos de Google Earth</value>
</data>
<data name="BUT_Prefetch.ToolTip" xml:space="preserve">
<value>Pre Almacena en caché una parte del mapa sobre la base de una caja de dibujar</value>
</data>
<data name="Delete.ToolTipText" xml:space="preserve">
<value>Elimina la Fila</value>
</data>
<data name="BUT_zoomto.ToolTip" xml:space="preserve">
<value>Obtener ajustes de la cámara de solapamiento</value>
</data>
<data name="addPolygonPointToolStripMenuItem.Text" xml:space="preserve">
<value>Añadir punto Polígono</value>
</data>
<data name="loiterToolStripMenuItem.Text" xml:space="preserve">
<value>Perder el Tiempo</value>
</data>
<data name="Command.ToolTipText" xml:space="preserve">
<value>Comando APM</value>
</data>
<data name="BUT_Add.Text" xml:space="preserve">
<value>Agregar Abajo</value>
</data>
<data name="lbl_distance.Text" xml:space="preserve">
<value>Distancia</value>
</data>
<data name="Down.ToolTipText" xml:space="preserve">
<value>Mueve la fila de abajo</value>
</data>
<data name="BUT_write.Text" xml:space="preserve">
<value>Escribir WPs</value>
</data>
<data name="BUT_loadkml.Text" xml:space="preserve">
<value>Superponer KML</value>
</data>
<data name="dataGridViewImageColumn2.HeaderText" xml:space="preserve">
<value>Abajo</value>
</data>
<data name="Lon.HeaderText" xml:space="preserve">
<value>Lon</value>
</data>
<data name="polygonToolStripMenuItem.Text" xml:space="preserve">
<value>Dibujar Polígono</value>
</data>
<data name="jumpToolStripMenuItem.Text" xml:space="preserve">
<value>Saltar</value>
</data>
<data name="TXT_DefaultAlt.Text" xml:space="preserve">
<value>100</value>
</data>
<data name="geoFenceToolStripMenuItem.Text" xml:space="preserve">
<value>Geo-Valla</value>
</data>
<data name="saveToFileToolStripMenuItem.Text" xml:space="preserve">
<value>Guardar a Archivo</value>
</data>
<data name="TXT_WPRad.Text" xml:space="preserve">
<value>30</value>
</data>
<data name="Up.ToolTipText" xml:space="preserve">
<value>Mueve la fila de arriba</value>
</data>
<data name="Up.HeaderText" xml:space="preserve">
<value>Arriba</value>
</data>
<data name="Delete.HeaderText" xml:space="preserve">
<value>Borrar</value>
</data>
<data name="loitercirclesToolStripMenuItem.Text" xml:space="preserve">
<value>Circulos</value>
</data>
<data name="jumpwPToolStripMenuItem.Text" xml:space="preserve">
<value>WP #</value>
</data>
<data name="deleteWPToolStripMenuItem.Text" xml:space="preserve">
<value>Borrar WP</value>
</data>
<data name="panelWaypoints.Text" xml:space="preserve">
<value>Waypoints</value>
</data>
<data name="BUT_grid.ToolTip" xml:space="preserve">
<value>Dibuja una rejilla sobre un área predefinida con un espacio determinado</value>
</data>
<data name="BUT_zoomto.Text" xml:space="preserve">
<value>Zoom a</value>
</data>
<data name="loadFromFileToolStripMenuItem.Text" xml:space="preserve">
<value>Cargar desde archivo</value>
</data>
<data name="CHK_holdalt.Text" xml:space="preserve">
<value>Mantener Altitud por defecto</value>
</data>
<data name="button1.Text" xml:space="preserve">
<value>Grafico de Elevación</value>
</data>
<data name="clearMissionToolStripMenuItem.Text" xml:space="preserve">
<value>Limpiar Misión</value>
</data>
<data name="BUT_Add.ToolTip" xml:space="preserve">
<value>Agregar una línea a la red de abajo</value>
</data>
<data name="Param3.HeaderText" xml:space="preserve">
<value>P3</value>
</data>
<data name="BUT_Prefetch.Text" xml:space="preserve">
<value>Prefetch</value>
</data>
<data name="ContextMeasure.Text" xml:space="preserve">
<value>Medida de Distancia</value>
</data>
<data name="BUT_Camera.Text" xml:space="preserve">
<value>Camara</value>
</data>
<data name="Down.HeaderText" xml:space="preserve">
<value>Abajo</value>
</data>
</root>

View File

@ -0,0 +1,129 @@
<?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>
<data name="richTextBox1.Text" xml:space="preserve">
<value />
</data>
<data name="CHK_showconsole.Text" xml:space="preserve">
<value>Mostrar Consola (reiniciar)</value>
</data>
<data name="BUT_updatecheck.Text" xml:space="preserve">
<value>Comprobar Actualizaciones</value>
</data>
</root>

View File

@ -11,6 +11,7 @@ using System.Xml; // config file
using System.Runtime.InteropServices; // dll imports
using ZedGraph; // Graphs
using ArdupilotMega;
using ArdupilotMega.Mavlink;
using System.Reflection;
using System.Drawing.Drawing2D;
@ -636,7 +637,7 @@ namespace ArdupilotMega.GCSViews
if (hzcounttime.Second != DateTime.Now.Second)
{
Console.WriteLine("SIM hz {0}", hzcount);
//Console.WriteLine("SIM hz {0}", hzcount);
hzcount = 0;
hzcounttime = DateTime.Now;
}
@ -873,15 +874,7 @@ namespace ArdupilotMega.GCSViews
{
//FlightGear
object imudata = new fgIMUData();
MAVLink.ByteArrayToStructureEndian(data, ref imudata, 0);
imudata = (fgIMUData)(imudata);
fgIMUData imudata2 = (fgIMUData)imudata;
fgIMUData imudata2 = data.ByteArrayToStructureBigEndian<fgIMUData>(0);
if (imudata2.magic != 0x4c56414d)
return;
@ -931,13 +924,7 @@ namespace ArdupilotMega.GCSViews
}
else if (receviedbytes == 658)
{
aeroin = new TDataFromAeroSimRC();
object temp = aeroin;
MAVLink.ByteArrayToStructure(data, ref temp, 0);
aeroin = (TDataFromAeroSimRC)(temp);
aeroin = data.ByteArrayToStructure<TDataFromAeroSimRC>(0);
att.pitch = (aeroin.Model_fPitch);
att.roll = (aeroin.Model_fRoll * -1);
@ -1005,13 +992,7 @@ namespace ArdupilotMega.GCSViews
else if (receviedbytes == 408)
{
FGNetFDM fdm = new FGNetFDM();
object temp = fdm;
MAVLink.ByteArrayToStructureEndian(data, ref temp, 0);
fdm = (FGNetFDM)(temp);
FGNetFDM fdm = data.ByteArrayToStructureBigEndian<FGNetFDM>(0);
lastfdmdata = fdm;

View File

@ -0,0 +1,303 @@
<?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>
<data name="label12.Text" xml:space="preserve">
<value>Alabeo</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Error Altitud</value>
</data>
<data name="CHKREV_roll.Text" xml:space="preserve">
<value>Invertir Alabeo</value>
</data>
<data name="CHK_heli.Text" xml:space="preserve">
<value>Heli</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Cabeceo</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>Salida Ardupilot</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Plane IMU</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>Guiñada</value>
</data>
<data name="RAD_JSBSim.ToolTip" xml:space="preserve">
<value>Puede hacer Plane/Heli/Quads</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>Frecuencia Actualización GPS</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Acelerador</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>Estado Piloto Automatico</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>WP</value>
</data>
<data name="CHKgraphroll.Text" xml:space="preserve">
<value>Mostrar Alabeo</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>Modo</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>Simulador de Autoridad - Para aviones diff</value>
</data>
<data name="BUT_startfgquad.Text" xml:space="preserve">
<value>Iniciar FG Quad</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>Banancia Alabeo</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>Ganancia Cabeceo</value>
</data>
<data name="CHK_quad.Text" xml:space="preserve">
<value>Quad</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>Ganancia Timón</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Longitud</value>
</data>
<data name="label25.Text" xml:space="preserve">
<value>Ganancia Acelerador</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Altitud</value>
</data>
<data name="label26.Text" xml:space="preserve">
<value>Estos</value>
</data>
<data name="label27.Text" xml:space="preserve">
<value>son</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Latitud</value>
</data>
<data name="label28.Text" xml:space="preserve">
<value>Solo SIM</value>
</data>
<data name="but_advsettings.Text" xml:space="preserve">
<value>Ajustes IP Avanzados</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Cabeceo</value>
</data>
<data name="label29.Text" xml:space="preserve">
<value>Nota:</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Título</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Plano GPS</value>
</data>
<data name="TXT_pitchgain.Text" xml:space="preserve">
<value>10000</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Alabeo</value>
</data>
<data name="ConnectComPort.Text" xml:space="preserve">
<value>Enlace Sim Inicio/Paro</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>WPDist</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Teniendo ERR</value>
</data>
<data name="CHKdisplayall.Text" xml:space="preserve">
<value>Mostrar Todo</value>
</data>
<data name="chkSensor.Text" xml:space="preserve">
<value>Sensor</value>
</data>
<data name="SaveSettings.Text" xml:space="preserve">
<value>Guardar Ajustes</value>
</data>
<data name="BUT_startfgplane.Text" xml:space="preserve">
<value>Inicio Plano FG</value>
</data>
<data name="CHKgraphrudder.Text" xml:space="preserve">
<value>Mostrar Timón</value>
</data>
<data name="label30.Text" xml:space="preserve">
<value>Guiñada</value>
</data>
<data name="CHKREV_rudder.Text" xml:space="preserve">
<value>Invertir Timón</value>
</data>
<data name="TXT_rollgain.Text" xml:space="preserve">
<value>10000</value>
</data>
<data name="RAD_softFlightGear.ToolTip" xml:space="preserve">
<value>Puede hacer con el modelo Avión y Quad</value>
</data>
<data name="CHKREV_pitch.Text" xml:space="preserve">
<value>Intertir Cabeceo</value>
</data>
<data name="CHKgraphthrottle.Text" xml:space="preserve">
<value>Mostrar Acelerador</value>
</data>
<data name="CHK_xplane10.Text" xml:space="preserve">
<value>Xplane 10</value>
</data>
<data name="RAD_aerosimrc.Text" xml:space="preserve">
<value>AeroSimRC</value>
</data>
<data name="CHKgraphpitch.Text" xml:space="preserve">
<value>Mostrar Cabeceo</value>
</data>
<data name="OutputLog.Text" xml:space="preserve">
<value />
</data>
<data name="RAD_softFlightGear.Text" xml:space="preserve">
<value>FlightGear</value>
</data>
<data name="TXT_throttlegain.Text" xml:space="preserve">
<value>10000</value>
</data>
<data name="RAD_softXplanes.Text" xml:space="preserve">
<value>X-plane</value>
</data>
<data name="RAD_JSBSim.Text" xml:space="preserve">
<value>JSBSim</value>
</data>
<data name="TXT_ruddergain.Text" xml:space="preserve">
<value>10000</value>
</data>
<data name="RAD_aerosimrc.ToolTip" xml:space="preserve">
<value>Puede hacer de avión / Heli o Quads</value>
</data>
<data name="BUT_startxplane.Text" xml:space="preserve">
<value>Iniciat Xplane</value>
</data>
<data name="RAD_softXplanes.ToolTip" xml:space="preserve">
<value>Puede hacer Plano / Quad con el plugin</value>
</data>
</root>

View File

@ -0,0 +1,138 @@
<?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>
<data name="BUTtests.Text" xml:space="preserve">
<value>Tests</value>
</data>
<data name="Logs.Text" xml:space="preserve">
<value>Descargar Log</value>
</data>
<data name="BUTradiosetup.Text" xml:space="preserve">
<value>Ajustar Radio</value>
</data>
<data name="TXT_terminal.Text" xml:space="preserve">
<value />
</data>
<data name="BUT_logbrowse.Text" xml:space="preserve">
<value>Buscar Log</value>
</data>
<data name="BUTsetupshow.Text" xml:space="preserve">
<value>Mostrar Ajustes</value>
</data>
</root>

View File

@ -1,152 +0,0 @@
namespace ArdupilotMega.GCSViews
{
partial class test
{
/// <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.panel3 = new BSE.Windows.Forms.Panel();
this.splitter1 = new BSE.Windows.Forms.Splitter();
this.panel1 = new BSE.Windows.Forms.Panel();
this.splitter2 = new BSE.Windows.Forms.Splitter();
this.SuspendLayout();
//
// panel3
//
this.panel3.AssociatedSplitter = this.splitter1;
this.panel3.BackColor = System.Drawing.Color.Transparent;
this.panel3.CaptionFont = new System.Drawing.Font("Segoe UI", 11.75F, System.Drawing.FontStyle.Bold);
this.panel3.CaptionHeight = 27;
this.panel3.CustomColors.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(184)))), ((int)(((byte)(184)))));
this.panel3.CustomColors.CaptionCloseIcon = System.Drawing.SystemColors.ControlText;
this.panel3.CustomColors.CaptionExpandIcon = System.Drawing.SystemColors.ControlText;
this.panel3.CustomColors.CaptionGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252)))));
this.panel3.CustomColors.CaptionGradientEnd = System.Drawing.SystemColors.ButtonFace;
this.panel3.CustomColors.CaptionGradientMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(248)))), ((int)(((byte)(248)))));
this.panel3.CustomColors.CaptionSelectedGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(224)))), ((int)(((byte)(255)))));
this.panel3.CustomColors.CaptionSelectedGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(224)))), ((int)(((byte)(255)))));
this.panel3.CustomColors.CaptionText = System.Drawing.SystemColors.ControlText;
this.panel3.CustomColors.CollapsedCaptionText = System.Drawing.SystemColors.ControlText;
this.panel3.CustomColors.ContentGradientBegin = System.Drawing.SystemColors.ButtonFace;
this.panel3.CustomColors.ContentGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252)))));
this.panel3.CustomColors.InnerBorderColor = System.Drawing.SystemColors.Window;
this.panel3.Dock = System.Windows.Forms.DockStyle.Left;
this.panel3.ForeColor = System.Drawing.SystemColors.ControlText;
this.panel3.Image = null;
this.panel3.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
this.panel3.Location = new System.Drawing.Point(0, 0);
this.panel3.MinimumSize = new System.Drawing.Size(27, 27);
this.panel3.Name = "panel3";
this.panel3.PanelStyle = BSE.Windows.Forms.PanelStyle.Default;
this.panel3.ShowExpandIcon = true;
this.panel3.Size = new System.Drawing.Size(194, 461);
this.panel3.TabIndex = 4;
this.panel3.Text = "panel3";
this.panel3.ToolTipTextCloseIcon = null;
this.panel3.ToolTipTextExpandIconPanelCollapsed = null;
this.panel3.ToolTipTextExpandIconPanelExpanded = null;
//
// splitter1
//
this.splitter1.BackColor = System.Drawing.Color.Transparent;
this.splitter1.Location = new System.Drawing.Point(194, 0);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(3, 461);
this.splitter1.TabIndex = 6;
this.splitter1.TabStop = false;
//
// panel1
//
this.panel1.AssociatedSplitter = this.splitter2;
this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.CaptionFont = new System.Drawing.Font("Segoe UI", 11.75F, System.Drawing.FontStyle.Bold);
this.panel1.CaptionHeight = 27;
this.panel1.CustomColors.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(184)))), ((int)(((byte)(184)))));
this.panel1.CustomColors.CaptionCloseIcon = System.Drawing.SystemColors.ControlText;
this.panel1.CustomColors.CaptionExpandIcon = System.Drawing.SystemColors.ControlText;
this.panel1.CustomColors.CaptionGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252)))));
this.panel1.CustomColors.CaptionGradientEnd = System.Drawing.SystemColors.ButtonFace;
this.panel1.CustomColors.CaptionGradientMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(248)))), ((int)(((byte)(248)))));
this.panel1.CustomColors.CaptionSelectedGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(224)))), ((int)(((byte)(255)))));
this.panel1.CustomColors.CaptionSelectedGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(224)))), ((int)(((byte)(255)))));
this.panel1.CustomColors.CaptionText = System.Drawing.SystemColors.ControlText;
this.panel1.CustomColors.CollapsedCaptionText = System.Drawing.SystemColors.ControlText;
this.panel1.CustomColors.ContentGradientBegin = System.Drawing.SystemColors.ButtonFace;
this.panel1.CustomColors.ContentGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252)))));
this.panel1.CustomColors.InnerBorderColor = System.Drawing.SystemColors.Window;
this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
this.panel1.ForeColor = System.Drawing.SystemColors.ControlText;
this.panel1.Image = null;
this.panel1.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
this.panel1.Location = new System.Drawing.Point(808, 0);
this.panel1.MinimumSize = new System.Drawing.Size(27, 27);
this.panel1.Name = "panel1";
this.panel1.PanelStyle = BSE.Windows.Forms.PanelStyle.Default;
this.panel1.ShowExpandIcon = true;
this.panel1.Size = new System.Drawing.Size(200, 461);
this.panel1.TabIndex = 7;
this.panel1.Text = "panel1";
this.panel1.ToolTipTextCloseIcon = null;
this.panel1.ToolTipTextExpandIconPanelCollapsed = null;
this.panel1.ToolTipTextExpandIconPanelExpanded = null;
//
// splitter2
//
this.splitter2.BackColor = System.Drawing.Color.Transparent;
this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
this.splitter2.Location = new System.Drawing.Point(805, 0);
this.splitter2.Name = "splitter2";
this.splitter2.Size = new System.Drawing.Size(3, 461);
this.splitter2.TabIndex = 8;
this.splitter2.TabStop = false;
//
// test
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.splitter2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.splitter1);
this.Controls.Add(this.panel3);
this.MinimumSize = new System.Drawing.Size(1008, 461);
this.Name = "test";
this.Size = new System.Drawing.Size(1008, 461);
this.Load += new System.EventHandler(this.test_Load);
this.ResumeLayout(false);
}
#endregion
private BSE.Windows.Forms.Panel panel3;
private BSE.Windows.Forms.Splitter splitter1;
private BSE.Windows.Forms.Panel panel1;
private BSE.Windows.Forms.Splitter splitter2;
}
}

View File

@ -1,27 +0,0 @@
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.GCSViews
{
public partial class test : UserControl
{
public test()
{
InitializeComponent();
}
private void test_Load(object sender, EventArgs e)
{
panel3.Expand = false;
panel1.Expand = false;
}
}
}

View File

@ -241,6 +241,7 @@ namespace hud
}
bool inOnPaint = false;
string otherthread = "";
protected override void OnPaint(PaintEventArgs e)
{
@ -265,10 +266,12 @@ namespace hud
if (inOnPaint)
{
Console.WriteLine("Was in onpaint Hud th:" + System.Threading.Thread.CurrentThread.Name);
Console.WriteLine("Was in onpaint Hud th:" + System.Threading.Thread.CurrentThread.Name + " in " + otherthread);
return;
}
otherthread = System.Threading.Thread.CurrentThread.Name;
inOnPaint = true;
starttime = DateTime.Now;

View File

@ -0,0 +1,219 @@
<?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>
<data name="label12.Text" xml:space="preserve">
<value>CH 7</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>CH 5</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>CH 8</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>CH 6</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Joystick</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Cabeceo</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Acelerador</value>
</data>
<data name="expo_ch3.Text" xml:space="preserve">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Alabeo</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Expo</value>
</data>
<data name="expo_ch1.Text" xml:space="preserve">
<value>30</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Salida</value>
</data>
<data name="expo_ch2.Text" xml:space="preserve">
<value>30</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Timón</value>
</data>
<data name="expo_ch7.Text" xml:space="preserve">
<value>0</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Joystick</value>
</data>
<data name="expo_ch5.Text" xml:space="preserve">
<value>0</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Controlador Ejes</value>
</data>
<data name="expo_ch6.Text" xml:space="preserve">
<value>0</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Invertir</value>
</data>
<data name="expo_ch4.Text" xml:space="preserve">
<value>30</value>
</data>
<data name="expo_ch8.Text" xml:space="preserve">
<value>0</value>
</data>
<data name="BUT_save.Text" xml:space="preserve">
<value>Guardar</value>
</data>
<data name="BUT_detch6.Text" xml:space="preserve">
<value>Auto Detectar</value>
</data>
<data name="CHK_elevons.Text" xml:space="preserve">
<value>Elevons</value>
</data>
<data name="BUT_detch7.Text" xml:space="preserve">
<value>Auto Detectar</value>
</data>
<data name="BUT_detch4.Text" xml:space="preserve">
<value>Auto Detectar</value>
</data>
<data name="BUT_detch5.Text" xml:space="preserve">
<value>Auto Detectar</value>
</data>
<data name="BUT_detch2.Text" xml:space="preserve">
<value>Auto Detectar</value>
</data>
<data name="BUT_detch3.Text" xml:space="preserve">
<value>Auto Detectar</value>
</data>
<data name="BUT_detch1.Text" xml:space="preserve">
<value>Auto Detectar</value>
</data>
<data name="BUT_detch8.Text" xml:space="preserve">
<value>Auto Detectar</value>
</data>
<data name="BUT_enable.Text" xml:space="preserve">
<value>Habilitar</value>
</data>
</root>

View File

@ -0,0 +1,138 @@
<?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>
<data name="$this.Text" xml:space="preserve">
<value>Log</value>
</data>
<data name="BUT_DLall.Text" xml:space="preserve">
<value>Descargar todos los Logs</value>
</data>
<data name="BUT_redokml.Text" xml:space="preserve">
<value>Recrear KML</value>
</data>
<data name="BUT_DLthese.Text" xml:space="preserve">
<value>Descargar este Log</value>
</data>
<data name="BUT_clearlogs.Text" xml:space="preserve">
<value>Limpiar Logs</value>
</data>
<data name="BUT_firstperson.Text" xml:space="preserve">
<value>KML Primera Persona</value>
</data>
</root>

View File

@ -0,0 +1,141 @@
<?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>
<data name="BUT_loadlog.Text" xml:space="preserve">
<value>Cargar un Log</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Mostrar Log</value>
</data>
<data name="Graphit.Text" xml:space="preserve">
<value>Gráfico de estos datos</value>
</data>
<data name="Graphit.ToolTip" xml:space="preserve">
<value>Gráficos de la celda actual puso de relieve</value>
</data>
<data name="BUT_loadlog.ToolTip" xml:space="preserve">
<value>Cargar un archivo diferente de Log</value>
</data>
<data name="BUT_cleargraph.ToolTip" xml:space="preserve">
<value>Borrar todos los datos del gráfico</value>
</data>
<data name="BUT_cleargraph.Text" xml:space="preserve">
<value>Limpiar Gráfico</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace ArdupilotMega
{
partial class MAVLink
{
}
}

View File

@ -760,19 +760,19 @@ namespace ArdupilotMega
byte[] buffer = port.download(20);
port.Close();
if (buffer[0] != 'A' || buffer[1] != 'P') // this is the apvar header
if ((buffer[0] == 'A' || buffer[0] == 'P') && (buffer[1] == 'A' || buffer[1] == 'P')) // this is the apvar header
{
Console.WriteLine("Valid eeprom contents");
}
else
{
MessageBox.Show("You dont appear to have uploaded a firmware yet,\n\nPlease goto the firmware page and upload one.");
return;
}
else
{
Console.WriteLine("Valid eeprom contents");
}
}
}
catch { }
MessageBox.Show("Can not establish a connection\n\n" + ex.ToString());
//MessageBox.Show("Can not establish a connection\n\n" + ex.ToString());
return;
}
}
@ -1632,9 +1632,9 @@ namespace ArdupilotMega
MainV2.instance.Invoke((MethodInvoker)delegate
{
loadinglabel.Text = text;
});
Application.DoEvents();
Application.DoEvents();
});
}
private static void checkForUpdate()
@ -1881,7 +1881,6 @@ namespace ArdupilotMega
while (dataStream.CanRead)
{
Application.DoEvents();
try
{
if (dt.Second != DateTime.Now.Second)

View File

@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ArdupilotMega.Mavlink
{
class MavlinkCRC
{
const int X25_INIT_CRC = 0xffff;
const int X25_VALIDATE_CRC = 0xf0b8;
public static ushort crc_accumulate(byte b, ushort crc)
{
unchecked
{
byte ch = (byte)(b ^ (byte)(crc & 0x00ff));
ch = (byte)(ch ^ (ch << 4));
return (ushort)((crc >> 8) ^ (ch << 8) ^ (ch << 3) ^ (ch >> 4));
}
}
public static ushort crc_calculate(byte[] pBuffer, int length)
{
if (length < 1)
{
return 0xffff;
}
// For a "message" of length bytes contained in the unsigned char array
// pointed to by pBuffer, calculate the CRC
// crcCalculate(unsigned char* pBuffer, int length, unsigned short* checkConst) < not needed
ushort crcTmp;
int i;
crcTmp = X25_INIT_CRC;
for (i = 1; i < length; i++) // skips header U
{
crcTmp = crc_accumulate(pBuffer[i], crcTmp);
//Console.WriteLine(crcTmp + " " + pBuffer[i] + " " + length);
}
return (crcTmp);
}
}
}

View File

@ -0,0 +1,246 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace ArdupilotMega.Mavlink
{
/// <summary>
/// Static methods and helpers for creation and manipulation of Mavlink packets
/// </summary>
public static class MavlinkUtil
{
/// <summary>
/// Create a new mavlink packet object from a byte array as recieved over mavlink
/// Endianess will be detetected using packet inspection
/// </summary>
/// <typeparam name="TMavlinkPacket">The type of mavlink packet to create</typeparam>
/// <param name="bytearray">The bytes of the mavlink packet</param>
/// <param name="startoffset">The position in the byte array where the packet starts</param>
/// <returns>The newly created mavlink packet</returns>
public static TMavlinkPacket ByteArrayToStructure<TMavlinkPacket>(this byte[] bytearray, int startoffset) where TMavlinkPacket : struct
{
object newPacket = new TMavlinkPacket();
ByteArrayToStructure(bytearray, ref newPacket, startoffset);
return (TMavlinkPacket)newPacket;
}
public static TMavlinkPacket ByteArrayToStructureBigEndian<TMavlinkPacket>(this byte[] bytearray, int startoffset) where TMavlinkPacket : struct
{
object newPacket = new TMavlinkPacket();
ByteArrayToStructureEndian(bytearray, ref newPacket, startoffset);
return (TMavlinkPacket)newPacket;
}
public static void ByteArrayToStructure(byte[] bytearray, ref object obj, int startoffset)
{
if (bytearray[0] == 'U')
{
ByteArrayToStructureEndian(bytearray, ref obj, startoffset);
}
else
{
int len = Marshal.SizeOf(obj);
IntPtr i = Marshal.AllocHGlobal(len);
// create structure from ptr
obj = Marshal.PtrToStructure(i, obj.GetType());
try
{
// copy byte array to ptr
Marshal.Copy(bytearray, startoffset, i, len);
}
catch (Exception ex)
{
Console.WriteLine("ByteArrayToStructure FAIL: error " + ex);
}
obj = Marshal.PtrToStructure(i, obj.GetType());
Marshal.FreeHGlobal(i);
}
}
public static void ByteArrayToStructureEndian(byte[] bytearray, ref object obj, int startoffset)
{
int len = Marshal.SizeOf(obj);
IntPtr i = Marshal.AllocHGlobal(len);
byte[] temparray = (byte[])bytearray.Clone();
// create structure from ptr
obj = Marshal.PtrToStructure(i, obj.GetType());
// do endian swap
object thisBoxed = obj;
Type test = thisBoxed.GetType();
int reversestartoffset = startoffset;
// Enumerate each structure field using reflection.
foreach (var field in test.GetFields())
{
// field.Name has the field's name.
object fieldValue = field.GetValue(thisBoxed); // Get value
// Get the TypeCode enumeration. Multiple types get mapped to a common typecode.
TypeCode typeCode = Type.GetTypeCode(fieldValue.GetType());
if (typeCode != TypeCode.Object)
{
Array.Reverse(temparray, reversestartoffset, Marshal.SizeOf(fieldValue));
reversestartoffset += Marshal.SizeOf(fieldValue);
}
else
{
reversestartoffset += ((byte[])fieldValue).Length;
}
}
try
{
// copy byte array to ptr
Marshal.Copy(temparray, startoffset, i, len);
}
catch (Exception ex) { Console.WriteLine("ByteArrayToStructure FAIL: error " + ex.ToString()); }
obj = Marshal.PtrToStructure(i, obj.GetType());
Marshal.FreeHGlobal(i);
}
/// <summary>
/// Convert a struct to an array of bytes, struct fields being reperesented in
/// little endian (LSB first)
/// </summary>
/// <remarks>Note - assumes little endian host order</remarks>
public static byte[] StructureToByteArray(object obj)
{
int len = Marshal.SizeOf(obj);
byte[] arr = new byte[len];
IntPtr ptr = Marshal.AllocHGlobal(len);
Marshal.StructureToPtr(obj, ptr, true);
Marshal.Copy(ptr, arr, 0, len);
Marshal.FreeHGlobal(ptr);
return arr;
}
/// <summary>
/// Convert a struct to an array of bytes, struct fields being reperesented in
/// big endian (MSB first)
/// </summary>
public static byte[] StructureToByteArrayBigEndian(params object[] list)
{
// The copy is made becuase SetValue won't work on a struct.
// Boxing was used because SetValue works on classes/objects.
// Unfortunately, it results in 2 copy operations.
object thisBoxed = list[0]; // Why make a copy?
Type test = thisBoxed.GetType();
int offset = 0;
byte[] data = new byte[Marshal.SizeOf(thisBoxed)];
object fieldValue;
TypeCode typeCode;
byte[] temp;
// Enumerate each structure field using reflection.
foreach (var field in test.GetFields())
{
// field.Name has the field's name.
fieldValue = field.GetValue(thisBoxed); // Get value
// Get the TypeCode enumeration. Multiple types get mapped to a common typecode.
typeCode = Type.GetTypeCode(fieldValue.GetType());
switch (typeCode)
{
case TypeCode.Single: // float
{
temp = BitConverter.GetBytes((Single)fieldValue);
Array.Reverse(temp);
Array.Copy(temp, 0, data, offset, sizeof(Single));
break;
}
case TypeCode.Int32:
{
temp = BitConverter.GetBytes((Int32)fieldValue);
Array.Reverse(temp);
Array.Copy(temp, 0, data, offset, sizeof(Int32));
break;
}
case TypeCode.UInt32:
{
temp = BitConverter.GetBytes((UInt32)fieldValue);
Array.Reverse(temp);
Array.Copy(temp, 0, data, offset, sizeof(UInt32));
break;
}
case TypeCode.Int16:
{
temp = BitConverter.GetBytes((Int16)fieldValue);
Array.Reverse(temp);
Array.Copy(temp, 0, data, offset, sizeof(Int16));
break;
}
case TypeCode.UInt16:
{
temp = BitConverter.GetBytes((UInt16)fieldValue);
Array.Reverse(temp);
Array.Copy(temp, 0, data, offset, sizeof(UInt16));
break;
}
case TypeCode.Int64:
{
temp = BitConverter.GetBytes((Int64)fieldValue);
Array.Reverse(temp);
Array.Copy(temp, 0, data, offset, sizeof(Int64));
break;
}
case TypeCode.UInt64:
{
temp = BitConverter.GetBytes((UInt64)fieldValue);
Array.Reverse(temp);
Array.Copy(temp, 0, data, offset, sizeof(UInt64));
break;
}
case TypeCode.Double:
{
temp = BitConverter.GetBytes((Double)fieldValue);
Array.Reverse(temp);
Array.Copy(temp, 0, data, offset, sizeof(Double));
break;
}
case TypeCode.Byte:
{
data[offset] = (Byte)fieldValue;
break;
}
default:
{
//System.Diagnostics.Debug.Fail("No conversion provided for this type : " + typeCode.ToString());
break;
}
}; // switch
if (typeCode == TypeCode.Object)
{
int length = ((byte[])fieldValue).Length;
Array.Copy(((byte[])fieldValue), 0, data, offset, length);
offset += length;
}
else
{
offset += Marshal.SizeOf(fieldValue);
}
} // foreach
return data;
} // Swap
}
}

View File

@ -0,0 +1,129 @@
<?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>
<data name="$this.Text" xml:space="preserve">
<value>Log</value>
</data>
<data name="BUT_redokml.Text" xml:space="preserve">
<value>Crear KML</value>
</data>
<data name="BUT_humanreadable.Text" xml:space="preserve">
<value>Convertir a Texto</value>
</data>
</root>

View File

@ -34,5 +34,5 @@ using System.Resources;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.1.37")]
[assembly: AssemblyFileVersion("1.1.38")]
[assembly: NeutralResourcesLanguageAttribute("")]

View File

@ -1,174 +1,165 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="glControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="glControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="glControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 225</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="glControl1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;glControl1.Name" xml:space="preserve">
<value>glControl1</value>
</data>
<data name="&gt;&gt;glControl1.Type" xml:space="preserve">
<value>OpenTK.GLControl, OpenTK.GLControl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4</value>
</data>
<data name="&gt;&gt;glControl1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;glControl1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 225</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>HUD</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c</value>
</data>
<data name="Bat" xml:space="preserve">
<value>Bat</value>
</data>
<data name="GPS: 2D Fix.Text" xml:space="preserve">
<value>GPS: 3D Fix</value>
</data>
<data name="GPS: 3D Fix.Text" xml:space="preserve">
<value>GPS: 3D Fix</value>
</data>
<data name="GPS: No Fix.Text" xml:space="preserve">
<value>GPS: No Fix</value>
</data>
<data name="GPS: No GPS.Text" xml:space="preserve">
<value>GPS: No GPS</value>
</data>
<?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>
<data name="tabRawSensor.Text" xml:space="preserve">
<value>Sensor Raw</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Sensor RAW</value>
</data>
<data name="CMB_rawupdaterate.Text" xml:space="preserve">
<value>Actualiza Velocidad</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Salida Servo/Motor</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Nota: Hay un retardo de cuando se ve a través de Xbee @ 50Hz</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Entrada Radio</value>
</data>
<data name="chkax.Text" xml:space="preserve">
<value>Accel X</value>
</data>
<data name="chkaz.Text" xml:space="preserve">
<value>Accel Z</value>
</data>
<data name="chkay.Text" xml:space="preserve">
<value>Accel Y</value>
</data>
<data name="tabRadio.Text" xml:space="preserve">
<value>Radio</value>
</data>
<data name="tabOrientation.Text" xml:space="preserve">
<value>Datos de Vuelo</value>
</data>
<data name="BUT_savecsv.Text" xml:space="preserve">
<value>Guardar CSV</value>
</data>
<data name="chkgz.Text" xml:space="preserve">
<value>Gyro Z</value>
</data>
<data name="chkgx.Text" xml:space="preserve">
<value>Gyro X</value>
</data>
<data name="chkgy.Text" xml:space="preserve">
<value>Gyro Y</value>
</data>
</root>

View File

@ -0,0 +1,123 @@
<?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>
<data name="textBox1.Text" xml:space="preserve">
<value>Lo que esto hace. 1. se las actuales coordenadas GPS de un GPS NMEA. 2. envía un WP modo guiado a la AP cada 2 segundos. Como Usar 1. conectar con la AP. 2. el despegue, el modo de prueba guiada está trabajando. 3. abrir este y escoja su puerto com, y la velocidad de su NMEA GPS. 4. ahora debe estar siguiéndote.</value>
</data>
</root>

View File

@ -0,0 +1,315 @@
<?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>
<data name="SV3_POS_.Text" xml:space="preserve">
<value>180</value>
</data>
<data name="BUT_HS4save.Text" xml:space="preserve">
<value>Manual</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>PWM 0 - 1230</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>PWM 1621 - 1749</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>Modo actual:</value>
</data>
<data name="CHK_enableoptflow.Text" xml:space="preserve">
<value>Habilitar el flujo óptico</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>NOTA: Las imágenes son sólo para su presentación</value>
</data>
<data name="CB_simple5.Text" xml:space="preserve">
<value>Modo Simple</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>PWM 1750 +</value>
</data>
<data name="CHK_elevonch1rev.Text" xml:space="preserve">
<value>Elevons CH1 Rev</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>PWM Actual:</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>APMSetup</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>Swash-Servo posición</value>
</data>
<data name="CHK_enablecompass.Text" xml:space="preserve">
<value>Activar Compas</value>
</data>
<data name="CB_simple4.Text" xml:space="preserve">
<value>Modo Simple</value>
</data>
<data name="tabArducopter.Text" xml:space="preserve">
<value>ArduCopter2</value>
</data>
<data name="CB_simple1.Text" xml:space="preserve">
<value>Modo Simple</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>Ajuste Chásis (+ or x)</value>
</data>
<data name="SV2_POS_.Text" xml:space="preserve">
<value>60</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>1</value>
</data>
<data name="CB_simple6.Text" xml:space="preserve">
<value>Modo Simple</value>
</data>
<data name="CB_simple3.Text" xml:space="preserve">
<value>Modo Simple</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>2</value>
</data>
<data name="tabModes.Text" xml:space="preserve">
<value>Modos</value>
</data>
<data name="CB_simple2.Text" xml:space="preserve">
<value>Modo Simple</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>3</value>
</data>
<data name="tabReset.Text" xml:space="preserve">
<value>Reset</value>
</data>
<data name="SV1_POS_.Text" xml:space="preserve">
<value>-60</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>Superior</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>Swash de Viaje</value>
</data>
<data name="lbl_currentmode.Text" xml:space="preserve">
<value>Manual</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>Timón de Viaje</value>
</data>
<data name="textBox3.Text" xml:space="preserve">
<value>Calibración del sensor de voltaje:Para calibrar el sensor, use un multímetro para medir la tensión que sale de la CES de la batería-la eliminación del circuito (se trata de cables negro y rojo en el cable de tres hilos que suministra energía a la placa APM).Luego reste 0,3 V de ese valor y entrar en él en el campo # 1 a la izquierda.</value>
</data>
<data name="BUT_Calibrateradio.Text" xml:space="preserve">
<value>Calibrar Radio</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>Max</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Modo de Vuelo 2</value>
</data>
<data name="label25.Text" xml:space="preserve">
<value>Alabeo Max</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Modo de Vuelo 3</value>
</data>
<data name="label26.Text" xml:space="preserve">
<value>Cabeceo Max</value>
</data>
<data name="label27.Text" xml:space="preserve">
<value>por ejemplo, en grados 2 ° 3 'W es -2,3</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Modo de Vuelo 1</value>
</data>
<data name="label28.Text" xml:space="preserve">
<value>Nivel tu quad para establecer las compensaciones por defecto acel</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Modo de Vuelo 6</value>
</data>
<data name="label29.Text" xml:space="preserve">
<value>Capacidad</value>
</data>
<data name="label100.Text" xml:space="preserve">
<value>Declinación</value>
</data>
<data name="CHK_enablesonar.Text" xml:space="preserve">
<value>Activar Sonar</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>PWM 1231 - 1360</value>
</data>
<data name="tabRadioIn.Text" xml:space="preserve">
<value>Entrada Radio</value>
</data>
<data name="groupBox4.Text" xml:space="preserve">
<value>Calibración</value>
</data>
<data name="HS4_MIN.Text" xml:space="preserve">
<value>1500</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Modo de Vuelo 4</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Modo de Vuelo 5</value>
</data>
<data name="groupBox3.Text" xml:space="preserve">
<value>Gyro</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>PWM 1361 - 1490</value>
</data>
<data name="tabHardware.Text" xml:space="preserve">
<value>Hardware</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>PWM 1491 - 1620</value>
</data>
<data name="linkLabelmagdec.Text" xml:space="preserve">
<value>Sitio Web Declinación</value>
</data>
<data name="HS4_MAX.Text" xml:space="preserve">
<value>1500</value>
</data>
<data name="tabBattery.Text" xml:space="preserve">
<value>Batería</value>
</data>
<data name="BUT_0collective.Text" xml:space="preserve">
<value>Cero</value>
</data>
<data name="CHK_enableairspeed.Text" xml:space="preserve">
<value>Activar Airspeed</value>
</data>
<data name="PIT_MAX_.Text" xml:space="preserve">
<value>4500</value>
</data>
<data name="BUT_reset.Text" xml:space="preserve">
<value>Restablecer los Ajustes de hardware APM</value>
</data>
<data name="GYR_GAIN_.Text" xml:space="preserve">
<value>1000</value>
</data>
<data name="label30.Text" xml:space="preserve">
<value>Monitor</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,88 @@
<?xml version="1.0"?>
<PropertyList>
<!--Airframe-->
<path>plus_quad2.ac</path>
<offsets>
<z-m>0.0</z-m>
<y-m>0</y-m>
<x-m>0.0</x-m>
<pitch-deg>0</pitch-deg>
<heading-deg>180</heading-deg>
</offsets>
<!--Propeller Right-->
<animation>
<type>noshadow</type>
<object-name>prop0</object-name>
</animation>
<animation>
<type>spin</type>
<object-name>prop0</object-name>
<property>/controls/engines/engine[0]/throttle</property>
<factor>12000</factor>
<axis>
<x1-m>0.000</x1-m>
<y1-m>-0.288</y1-m>
<z1-m>0.046</z1-m>
<x2-m>0.000</x2-m>
<y2-m>-0.288</y2-m>
<z2-m>0.012</z2-m>
</axis>
</animation>
<!--Propeller Left-->
<animation>
<type>noshadow</type>
<object-name>prop1</object-name>
</animation>
<animation>
<type>spin</type>
<object-name>prop1</object-name>
<property>/controls/engines/engine[1]/throttle</property>
<factor>12000</factor>
<axis>
<x1-m>0.000</x1-m>
<y1-m>0.288</y1-m>
<z1-m>0.046</z1-m>
<x2-m>0.000</x2-m>
<y2-m>0.288</y2-m>
<z2-m>0.012</z2-m>
</axis>
</animation>
<!--Propeller Front-->
<animation>
<type>noshadow</type>
<object-name>prop2</object-name>
</animation>
<animation>
<type>spin</type>
<object-name>prop2</object-name>
<property>/controls/engines/engine[2]/throttle</property>
<factor>12000</factor>
<axis>
<x1-m>0.288</x1-m>
<y1-m>0.000</y1-m>
<z1-m>0.046</z1-m>
<x2-m>0.288</x2-m>
<y2-m>0.000</y2-m>
<z2-m>0.012</z2-m>
</axis>
</animation>
<!--Propeller Back-->
<animation>
<type>noshadow</type>
<object-name>prop3</object-name>
</animation>
<animation>
<type>spin</type>
<object-name>prop3</object-name>
<property>/controls/engines/engine[3]/throttle</property>
<factor>12000</factor>
<axis>
<x1-m>-0.288</x1-m>
<y1-m>0.000</y1-m>
<z1-m>0.046</z1-m>
<x2-m>-0.288</x2-m>
<y2-m>0.000</y2-m>
<z2-m>0.012</z2-m>
</axis>
</animation>
</PropertyList>

View File

@ -0,0 +1,40 @@
round10 = func(v) {
if (v == nil) return 0;
return 0.1*int(v*10);
}
round100 = func(v) {
if (v == nil) return 0;
return 0.01*int(v*100);
}
var update_quad = func( ) {
asl_ft = getprop("/position/altitude-ft");
ground = getprop("/position/ground-elev-ft");
agl_m = (asl_ft - ground) * 0.3048;
setprop("/apm/altitude", round10(agl_m));
setprop("/apm/pitch", round10(getprop("/orientation/pitch-deg")));
setprop("/apm/roll", round10(getprop("/orientation/roll-deg")));
setprop("/apm/heading", round10(getprop("/orientation/heading-deg")));
# airspeed-kt is actually in feet per second (FDM NET bug)
setprop("/apm/airspeed", round10(0.3048*getprop("/velocities/airspeed-kt")));
setprop("/apm/motor_right", round10(getprop("/engines/engine[0]/rpm")/10.0));
setprop("/apm/motor_left", round10(getprop("/engines/engine[1]/rpm")/10.0));
setprop("/apm/motor_front", round10(getprop("/engines/engine[2]/rpm")/10.0));
setprop("/apm/motor_back", round10(getprop("/engines/engine[3]/rpm")/10.0));
}
var main_loop = func {
update_quad();
settimer(main_loop, 0);
}
setlistener("/sim/signals/fdm-initialized",
func {
main_loop();
});

View File

@ -1,346 +0,0 @@
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-
// Internal defines, don't edit and expect things to work
// -------------------------------------------------------
#define DEBUG 0
#define LOITER_RANGE 30 // for calculating power outside of loiter radius
// GPS baud rates
// --------------
#define NO_GPS 38400
#define NMEA_GPS 38400
#define EM406_GPS 57600
#define UBLOX_GPS 38400
#define ARDU_IMU 38400
#define MTK_GPS 38400
#define SIM_GPS 38400
// GPS type codes - use the names, not the numbers
#define GPS_PROTOCOL_NONE -1
#define GPS_PROTOCOL_NMEA 0
#define GPS_PROTOCOL_SIRF 1
#define GPS_PROTOCOL_UBLOX 2
#define GPS_PROTOCOL_IMU 3
#define GPS_PROTOCOL_MTK 4
// Radio channels
// Note channels are from 0!
//
// XXX these should be CH_n defines from RC.h at some point.
#define CH_ROLL 0
#define CH_PITCH 1
#define CH_THROTTLE 2
#define CH_RUDDER 3
#define CH_1 0
#define CH_2 1
#define CH_3 2
#define CH_4 3
#define CH_5 4
#define CH_6 5
#define CH_7 6
#define CH_8 7
#define WP_START_BYTE 0x130 // where in memory home WP is stored + all other WP
#define WP_SIZE 14
// GCS enumeration
#define GCS_PROTOCOL_STANDARD 0 // standard APM protocol
#define GCS_PROTOCOL_SPECIAL 1 // special test protocol (?)
#define GCS_PROTOCOL_LEGACY 2 // legacy ArduPilot protocol
#define GCS_PROTOCOL_XPLANE 3 // X-Plane HIL simulation
#define GCS_PROTOCOL_IMU 4 // ArdiPilot IMU output
#define GCS_PROTOCOL_JASON 5 // Jason's special secret GCS protocol
#define GCS_PROTOCOL_DEBUGTERMINAL 6 // Text-based interactive GCS
#define GCS_PROTOCOL_NONE -1 // No GCS output
// PID enumeration
// ---------------
#define CASE_SERVO_ROLL 0
#define CASE_SERVO_PITCH 1
#define CASE_SERVO_RUDDER 2
#define CASE_NAV_ROLL 3
#define CASE_NAV_PITCH_ASP 4
#define CASE_NAV_PITCH_ALT 5
#define CASE_TE_THROTTLE 6
#define CASE_ALT_THROTTLE 7
// Feedforward cases
// ----------------
#define CASE_PITCH_COMP 0
#define CASE_RUDDER_MIX 1
#define CASE_P_TO_T 2
#define CASE_T_TO_P 3
// Auto Pilot modes
// ----------------
#define MANUAL 0
#define CIRCLE 1 // When flying sans GPS, and we loose the radio, just circle
#define STABILIZE 2
#define FLY_BY_WIRE_A 5 // Fly By Wire A has left stick horizontal => desired roll angle, left stick vertical => desired pitch angle, right stick vertical = manual throttle
#define FLY_BY_WIRE_B 6 // Fly By Wire B has left stick horizontal => desired roll angle, left stick vertical => desired pitch angle, right stick vertical => desired airspeed
// Fly By Wire B = Fly By Wire A if you have AIRSPEED_SENSOR 0
#define AUTO 10
#define RTL 11
#define LOITER 12
#define TAKEOFF 13
#define LAND 14
// Command IDs - Must
#define CMD_BLANK 0x00 // there is no command stored in the mem location requested
#define CMD_WAYPOINT 0x10
#define CMD_LOITER 0x11
#define CMD_LOITER_N_TURNS 0x12
#define CMD_LOITER_TIME 0x13
#define CMD_RTL 0x14
#define CMD_LAND 0x15
#define CMD_TAKEOFF 0x16
// Command IDs - May
#define CMD_DELAY 0x20
#define CMD_CLIMB 0x21 // NOT IMPLEMENTED
#define CMD_LAND_OPTIONS 0x22 // pitch in deg, airspeed m/s, throttle %, track WP 1 or 0
// Command IDs - Now
//#define CMD_AP_MODE 0x30
#define CMD_RESET_INDEX 0x31
#define CMD_GOTO_INDEX 0x32 // NOT IMPLEMENTED
#define CMD_GETVAR_INDEX 0x33
#define CMD_SENDVAR_INDEX 0x34
#define CMD_TELEMETRY 0x35
#define CMD_THROTTLE_CRUISE 0x40
#define CMD_AIRSPEED_CRUISE 0x41
#define CMD_RESET_HOME 0x44
#define CMD_KP_GAIN 0x60
#define CMD_KI_GAIN 0x61
#define CMD_KD_GAIN 0x62
#define CMD_KI_MAX 0x63
#define CMD_KFF_GAIN 0x64
#define CMD_RADIO_TRIM 0x70
#define CMD_RADIO_MAX 0x71
#define CMD_RADIO_MIN 0x72
#define CMD_RADIO_MIN 0x72
#define CMD_ELEVON_TRIM 0x73
#define CMD_INDEX 0x75 // sets the current Must index
#define CMD_REPEAT 0x80
#define CMD_RELAY 0x81
#define CMD_SERVO 0x82 // move servo N to PWM value
//repeating events
#define NO_REPEAT 0
#define CH_4_TOGGLE 1
#define CH_5_TOGGLE 2
#define CH_6_TOGGLE 3
#define CH_7_TOGGLE 4
#define RELAY_TOGGLE 5
#define STOP_REPEAT 10
// GCS Message ID's
#define MSG_ACKNOWLEDGE 0x00
#define MSG_HEARTBEAT 0x01
#define MSG_ATTITUDE 0x02
#define MSG_LOCATION 0x03
#define MSG_PRESSURE 0x04
#define MSG_STATUS_TEXT 0x05
#define MSG_PERF_REPORT 0x06
#define MSG_COMMAND 0x22
#define MSG_VALUE 0x32
#define MSG_PID 0x42
#define MSG_TRIMS 0x50
#define MSG_MINS 0x51
#define MSG_MAXS 0x52
#define MSG_IMU_OUT 0x53
#define SEVERITY_LOW 1
#define SEVERITY_MEDIUM 2
#define SEVERITY_HIGH 3
#define SEVERITY_CRITICAL 4
// Logging parameters
#define LOG_ATTITUDE_MSG 0x01
#define LOG_GPS_MSG 0x02
#define LOG_MODE_MSG 0X03
#define LOG_CONTROL_TUNING_MSG 0X04
#define LOG_NAV_TUNING_MSG 0X05
#define LOG_PERFORMANCE_MSG 0X06
#define LOG_RAW_MSG 0x07
#define LOG_CMD_MSG 0x08
#define LOG_STARTUP_MSG 0x09
#define TYPE_AIRSTART_MSG 0x00
#define TYPE_GROUNDSTART_MSG 0x01
#define MASK_LOG_ATTITUDE_FAST 0
#define MASK_LOG_ATTITUDE_MED 2
#define MASK_LOG_GPS 4
#define MASK_LOG_PM 8
#define MASK_LOG_CTUN 16
#define MASK_LOG_NTUN 32
#define MASK_LOG_MODE 64
#define MASK_LOG_RAW 128
#define MASK_LOG_CMD 256
// Yaw modes
#define YAW_MODE_COORDINATE_TURNS 0
#define YAW_MODE_HOLD_HEADING 1
#define YAW_MODE_SLIP 2
// Waypoint Modes
// ----------------
#define ABS_WP 0
#define REL_WP 1
// Command Queues
// ---------------
#define COMMAND_MUST 0
#define COMMAND_MAY 1
#define COMMAND_NOW 2
// Events
// ------
#define EVENT_WILL_REACH_WAYPOINT 1
#define EVENT_SET_NEW_WAYPOINT_INDEX 2
#define EVENT_LOADED_WAYPOINT 3
#define EVENT_LOOP 4
//GPS_fix
#define VALID_GPS 0x00
#define BAD_GPS 0x01
#define FAILED_GPS 0x03
#define BATTERY_VOLTAGE(x) (x*(INPUT_VOLTAGE/1024.0))*VOLT_DIV_RATIO
#define AIRSPEED_CH 7 // The external ADC channel for the airspeed sensor
#define BATTERY_PIN1 0 // These are the pins for the voltage dividers
#define BATTERY_PIN2 1
#define BATTERY_PIN3 2
#define BATTERY_PIN4 3
#define RELAY_PIN 47
// Hardware Parameters
#define SLIDE_SWITCH_PIN 40
#define PUSHBUTTON_PIN 41
#define A_LED_PIN 37 //36 = B, 37 = A, 35 = C
#define B_LED_PIN 36
#define C_LED_PIN 35
#define HOLD_ALT_ABOVE_HOME 8 // bitmask value
// IMU Parameters
#define ADC_CONSTRAINT 900
#define TRUE 1
#define FALSE 0
#define ADC_WARM_CYCLES 200
#define SPEEDFILT 400 // centimeters/second
#define GYRO_TEMP_CH 3 // The ADC channel reading the gyro temperature
// ADC : Voltage reference 3.3v / 12bits(4096 steps) => 0.8mV/ADC step
// ADXL335 Sensitivity(from datasheet) => 330mV/g, 0.8mV/ADC step => 330/0.8 = 412
// Tested value : 418
#define GRAVITY 418 //this equivalent to 1G in the raw data coming from the accelerometer
#define Accel_Scale(x) x*(GRAVITY/9.81)//Scaling the raw data of the accel to actual acceleration in meters for seconds square
#define ToRad(x) (x*0.01745329252) // *pi/180
#define ToDeg(x) (x*57.2957795131) // *180/pi
// IDG500 Sensitivity (from datasheet) => 2.0mV/º/s, 0.8mV/ADC step => 0.8/3.33 = 0.4
// Tested values : 0.4026, ?, 0.4192
#define Gyro_Gain_X 0.4 //X axis Gyro gain
#define Gyro_Gain_Y 0.41 //Y axis Gyro gain
#define Gyro_Gain_Z 0.41 //Z axis Gyro gain
#define Gyro_Scaled_X(x) x*ToRad(Gyro_Gain_X) //Return the scaled ADC raw data of the gyro in radians for second
#define Gyro_Scaled_Y(x) x*ToRad(Gyro_Gain_Y) //Return the scaled ADC raw data of the gyro in radians for second
#define Gyro_Scaled_Z(x) x*ToRad(Gyro_Gain_Z) //Return the scaled ADC raw data of the gyro in radians for second
#define Kp_ROLLPITCH 0.0014 // Pitch&Roll Drift Correction Proportional Gain
#define Ki_ROLLPITCH 0.0000003 // Pitch&Roll Drift Correction Integrator Gain
#define Kp_YAW 0.8 // Yaw Drift Correction Porportional Gain
#define Ki_YAW 0.00004 // Yaw Drift CorrectionIntegrator Gain
/*For debugging purposes*/
#define OUTPUTMODE 1 //If value = 1 will print the corrected data, 0 will print uncorrected data of the gyros (with drift), 2 Accel only data
#define EEPROM_MAX_ADDR 4096
// Radio setup
#define EE_TRIM 0x00
#define EE_MIN 0x10
#define EE_MAX 0x20
#define EE_ELEVON1_TRIM 0x30
#define EE_ELEVON2_TRIM 0x32
// user gains
#define EE_XTRACK_GAIN 0x34
#define EE_XTRACK_ANGLE 0x36
#define EE_ALT_MIX 0x3B
#define EE_HEAD_MAX 0x38
#define EE_PITCH_MAX 0x39
#define EE_PITCH_MIN 0x3A
#define EE_KP 0x40
#define EE_KI 0x60
#define EE_KD 0x80
#define EE_IMAX 0xA0
#define EE_KFF 0xC0
#define EE_AN_OFFSET 0xE0
#define EE_PITCH_TARGET 0x127
//mission specific
#define EE_CONFIG 0X0F8
#define EE_WP_MODE 0x0F9
#define EE_YAW_MODE 0x0FA // not used
#define EE_WP_TOTAL 0x0FB
#define EE_WP_INDEX 0x0FC
#define EE_WP_RADIUS 0x0FD
#define EE_LOITER_RADIUS 0x0FE
#define EE_ALT_HOLD_HOME 0x0FF
// user configs
#define EE_AIRSPEED_CRUISE 0x103
#define EE_AIRSPEED_RATIO 0x104
#define EE_AIRSPEED_FBW_MIN 0x108
#define EE_AIRSPEED_FBW_MAX 0x109
#define EE_THROTTLE_MIN 0x10A
#define EE_THROTTLE_CRUISE 0x10B
#define EE_THROTTLE_MAX 0x10C
#define EE_THROTTLE_FAILSAFE 0x10D
#define EE_THROTTLE_FS_VALUE 0x10E
#define EE_THROTTLE_FAILSAFE_ACTION 0x110
#define EE_FLIGHT_MODE_CHANNEL 0x112
#define EE_AUTO_TRIM 0x113
#define EE_LOG_BITMASK 0x114
#define EE_REVERSE_SWITCH 0x120
#define EE_FLIGHT_MODES 0x121
// sensors
#define EE_ABS_PRESS_GND 0x116
#define EE_GND_TEMP 0x11A
#define EE_GND_ALT 0x11C
#define EE_AP_OFFSET 0x11E
// log
#define EE_LAST_LOG_PAGE 0xE00
#define EE_LAST_LOG_NUM 0xE02
#define EE_LOG_1_START 0xE04
// bits in log_bitmask
#define LOGBIT_ATTITUDE_FAST (1<<0)
#define LOGBIT_ATTITUDE_MED (1<<1)
#define LOGBIT_GPS (1<<2)
#define LOGBIT_PM (1<<3)
#define LOGBIT_CTUN (1<<4)
#define LOGBIT_NTUN (1<<5)
#define LOGBIT_MODE (1<<6)
#define LOGBIT_RAW (1<<7)
#define LOGBIT_CMD (1<<8)