apm planner 1.1.8

fix large firmware issue
change apm2 detect
add tot = time over target
modify firmware screen
override jsbsim ports.
remove crossthread calls
This commit is contained in:
Michael Oborne 2011-12-17 17:22:40 +08:00
parent 3af7c5dbe9
commit e704ab28ee
39 changed files with 3709 additions and 606 deletions

View File

@ -163,16 +163,11 @@ namespace ArdupilotMega
{
//Console.WriteLine("Dependant : " + obj2["Dependent"]);
// all apm 1-1.4 use a ftdi on the imu board.
if (obj2["Dependent"].ToString().Contains(@"USB\\VID_2341&PID_0010"))
{
if (DialogResult.Yes == MessageBox.Show("Is this a APM 2?", "APM 2", MessageBoxButtons.YesNo))
{
return "2560-2";
}
else
{
return "2560";
}
}
}

View File

@ -207,7 +207,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AGauge.cs">
<Compile Include="Controls\AGauge.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ArduinoDetect.cs" />
@ -225,6 +225,12 @@
</Compile>
<Compile Include="CommsTCPSerial.cs" />
<Compile Include="CommsUdpSerial.cs" />
<Compile Include="Controls\ImageLabel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ImageLabel.Designer.cs">
<DependentUpon>ImageLabel.cs</DependentUpon>
</Compile>
<Compile Include="ResEdit.cs">
<SubType>Form</SubType>
</Compile>
@ -267,14 +273,14 @@
</Compile>
<Compile Include="MAVLinkTypes.cs" />
<Compile Include="MAVLinkTypesenum.cs" />
<Compile Include="MyButton.cs">
<Compile Include="Controls\MyButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Common.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ArduinoComms.cs" />
<Compile Include="MyLabel.cs">
<Compile Include="Controls\MyLabel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="MyUserControl.cs">
@ -337,7 +343,7 @@
<Compile Include="GCSViews\Simulation.Designer.cs">
<DependentUpon>Simulation.cs</DependentUpon>
</Compile>
<Compile Include="MyTrackBar.cs">
<Compile Include="Controls\MyTrackBar.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CurrentState.cs" />
@ -392,13 +398,16 @@
<Compile Include="temp.Designer.cs">
<DependentUpon>temp.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="AGauge.resx">
<EmbeddedResource Include="Controls\AGauge.resx">
<DependentUpon>AGauge.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Camera.resx">
<DependentUpon>Camera.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ImageLabel.resx">
<DependentUpon>ImageLabel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="georefimage.resx">
<DependentUpon>georefimage.cs</DependentUpon>
</EmbeddedResource>
@ -590,6 +599,12 @@
<Content Include="mavcmd.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="Resources\new frames-13.png" />
<None Include="Resources\new frames-12.png" />
<None Include="Resources\new frames-11.png" />
<None Include="Resources\new frames-10.png" />
<None Include="Resources\new frames-06.png" />
<None Include="Resources\new frames-05.png" />
<None Include="Resources\BR-0016-01-3T.jpg" />
<Content Include="Resources\MAVCmd.zh-Hans.txt" />
<None Include="Resources\MAVParam.txt" />

View File

@ -102,7 +102,7 @@ namespace ArdupilotMega
const float rad2deg = (float)(180 / Math.PI);
const float deg2rad = (float)(1.0 / rad2deg);
static readonly System.Drawing.Size SizeSt = new System.Drawing.Size(global::ArdupilotMega.Properties.Resources.planetracker.Width, global::ArdupilotMega.Properties.Resources.planetracker.Height);
static readonly System.Drawing.Size SizeSt = new System.Drawing.Size(global::ArdupilotMega.Properties.Resources.planeicon.Width, global::ArdupilotMega.Properties.Resources.planeicon.Height);
float heading = 0;
float cog = -1;
float target = -1;
@ -131,7 +131,7 @@ namespace ArdupilotMega
g.DrawLine(new Pen(Color.Orange, 2), 0.0f, 0.0f, (float)Math.Cos((target - 90) * deg2rad) * length, (float)Math.Sin((target - 90) * deg2rad) * length);
g.RotateTransform(heading);
g.DrawImageUnscaled(global::ArdupilotMega.Properties.Resources.planetracker, global::ArdupilotMega.Properties.Resources.planetracker.Width / -2, global::ArdupilotMega.Properties.Resources.planetracker.Height / -2);
g.DrawImageUnscaled(global::ArdupilotMega.Properties.Resources.planeicon, global::ArdupilotMega.Properties.Resources.planeicon.Width / -2, global::ArdupilotMega.Properties.Resources.planeicon.Height / -2);
g.Transform = temp;
}
@ -143,7 +143,7 @@ namespace ArdupilotMega
const float rad2deg = (float)(180 / Math.PI);
const float deg2rad = (float)(1.0 / rad2deg);
static readonly System.Drawing.Size SizeSt = new System.Drawing.Size(global::ArdupilotMega.Properties.Resources.quad2.Width, global::ArdupilotMega.Properties.Resources.quad2.Height);
static readonly System.Drawing.Size SizeSt = new System.Drawing.Size(global::ArdupilotMega.Properties.Resources.quadicon.Width, global::ArdupilotMega.Properties.Resources.quadicon.Height);
float heading = 0;
float cog = -1;
float target = -1;
@ -171,7 +171,7 @@ namespace ArdupilotMega
g.RotateTransform(heading);
g.DrawImageUnscaled(global::ArdupilotMega.Properties.Resources.quad2, global::ArdupilotMega.Properties.Resources.quad2.Width / -2 + 2, global::ArdupilotMega.Properties.Resources.quad2.Height / -2);
g.DrawImageUnscaled(global::ArdupilotMega.Properties.Resources.quadicon, global::ArdupilotMega.Properties.Resources.quadicon.Width / -2 + 2, global::ArdupilotMega.Properties.Resources.quadicon.Height / -2);
g.Transform = temp;
}

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -0,0 +1,76 @@
namespace ArdupilotMega
{
partial class ImageLabel
{
/// <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.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.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.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(170, 155);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(0, 157);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(170, 13);
this.label1.TabIndex = 1;
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// ImageLabel
//
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.Name = "ImageLabel";
this.Size = new System.Drawing.Size(170, 170);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ArdupilotMega
{
public partial class ImageLabel : UserControl
{
public new event EventHandler Click;
private Image picture;
private string text;
public ImageLabel()
{
InitializeComponent();
}
public void setImageandText(Image image, string text)
{
pictureBox1.Image = image;
label1.Text = text;
}
[System.ComponentModel.Browsable(true)]
public Image Image {
get { return picture; }
set { picture = value; pictureBox1.Image = picture; }
}
[System.ComponentModel.Browsable(true)]
public override string Text
{
get { return text; }
set { text = value; label1.Text = text; }
}
private void pictureBox1_Click(object sender, EventArgs e)
{
if (Click != null)
{
Click(sender,new EventArgs());
}
}
}
}

View File

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

View File

@ -0,0 +1,106 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace ArdupilotMega
{
class MyButton : Button
{
bool mouseover = false;
bool mousedown = false;
protected override void OnPaint(PaintEventArgs pevent)
{
//base.OnPaint(pevent);
Graphics gr = pevent.Graphics;
Rectangle outside = new Rectangle(0,0,this.Width,this.Height);
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)
{
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);
}
protected override void OnClick(EventArgs e)
{
base.OnClick(e);
}
protected override void OnPaintBackground(PaintEventArgs pevent)
{
//base.OnPaintBackground(pevent);
}
protected override void OnMouseEnter(EventArgs e)
{
mouseover = true;
base.OnMouseEnter(e);
}
protected override void OnMouseLeave(EventArgs e)
{
mouseover = false;
base.OnMouseLeave(e);
}
protected override void OnMouseDown(MouseEventArgs mevent)
{
mousedown = true;
base.OnMouseDown(mevent);
}
protected override void OnMouseUp(MouseEventArgs mevent)
{
mousedown = false;
base.OnMouseUp(mevent);
}
}
}

View File

@ -0,0 +1,88 @@
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
{
/// <summary>
/// profiling showed that the built in Label function was using alot ot call time.
/// </summary>
public partial class MyLabel : Control //: Label
{
string label = "";
int noofchars = 0;
bool autosize = false;
[System.ComponentModel.Browsable(true)]
public bool resize { get { return autosize; } set { autosize = value; } }
public MyLabel()
{
}
public override string Text
{
get
{
return label;
}
set
{
if (value == null)
return;
if (label == value)
return;
label = value;
if (noofchars != label.Length && resize)
{
noofchars = label.Length;
Size textSize = TextRenderer.MeasureText(value, this.Font);
this.Width = textSize.Width;
}
this.Invalidate();
}
}
SolidBrush s = new SolidBrush(Color.White);
SolidBrush b = new SolidBrush(Color.Black);
StringFormat stringFormat = new StringFormat();
protected override void OnPaint(PaintEventArgs e)
{
stringFormat.Alignment = StringAlignment.Near;
stringFormat.LineAlignment = StringAlignment.Center;
s = new SolidBrush(ForeColor);
e.Graphics.DrawString(label, this.Font, s, new PointF(0, this.Height / 2.0f), stringFormat);
}
protected override void OnPaintBackground(PaintEventArgs pevent)
{
b = new SolidBrush(BackColor);
pevent.Graphics.FillRectangle(b, this.ClientRectangle);
base.OnPaintBackground(pevent);
}
protected override void WndProc(ref Message m) // seems to crash here on linux... so try ignore it
{
try
{
base.WndProc(ref m);
}
catch { }
}
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ArdupilotMega
{
class MyTrackBar : TrackBar
{
public new double Maximum { get { return base.Maximum / 100.0; } set { base.Maximum = (int)(value * 100); } }
public new double Minimum { get { return base.Minimum / 100.0; } set { base.Minimum = (int)(value * 100); } }
public new double Value { get { return base.Value / 100.0; } set { base.Value = (int)(value * 100); } }
}
}

View File

@ -20,6 +20,11 @@ namespace ArdupilotMega
public float groundcourse { get { return _groundcourse; } set { if (value < 0) { _groundcourse = value + 360; } else { _groundcourse = value; } } }
private float _groundcourse = 0;
/// <summary>
/// time over target in seconds
/// </summary>
public int tot { get { if (groundspeed <= 0) return 0; return (int)(wp_dist / groundspeed); } }
// speeds
public float airspeed { get { return _airspeed * multiplierspeed; } set { _airspeed = value; } }
public float groundspeed { get { return _groundspeed * multiplierspeed; } set { _groundspeed = value; } }

View File

@ -17,58 +17,46 @@ namespace ArdupilotMega.GCSViews
{
class Firmware : MyUserControl
{
private System.Windows.Forms.PictureBox pictureBoxAPM;
private System.Windows.Forms.PictureBox pictureBoxAPMHIL;
private System.Windows.Forms.PictureBox pictureBoxQuad;
private System.Windows.Forms.PictureBox pictureBoxHexa;
private System.Windows.Forms.PictureBox pictureBoxTri;
private System.Windows.Forms.PictureBox pictureBoxY6;
private ImageLabel pictureBoxAPM;
private ImageLabel pictureBoxQuad;
private ImageLabel pictureBoxHexa;
private ImageLabel pictureBoxTri;
private ImageLabel pictureBoxY6;
private System.Windows.Forms.Label lbl_status;
private System.Windows.Forms.ProgressBar progress;
private System.Windows.Forms.Label lbl_AP;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lbl_APHil;
private System.Windows.Forms.Label lbl_ACQuad;
private System.Windows.Forms.Label lbl_ACHexa;
private System.Windows.Forms.Label lbl_ACTri;
private Label lbl_Heli;
private PictureBox pictureBoxHeli;
private ImageLabel pictureBoxHeli;
private MyButton BUT_setup;
private Label lbl_ACHil;
private PictureBox pictureBoxQuadHil;
private System.Windows.Forms.Label lbl_ACY6;
private PictureBox pictureBoxHilimage;
private PictureBox pictureBoxAPHil;
private PictureBox pictureBoxACHil;
private PictureBox pictureBoxACHHil;
private ImageLabel pictureBoxOcta;
private ImageLabel pictureBoxOctav;
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Firmware));
this.pictureBoxAPM = new System.Windows.Forms.PictureBox();
this.pictureBoxAPMHIL = new System.Windows.Forms.PictureBox();
this.pictureBoxQuad = new System.Windows.Forms.PictureBox();
this.pictureBoxHexa = new System.Windows.Forms.PictureBox();
this.pictureBoxTri = new System.Windows.Forms.PictureBox();
this.pictureBoxY6 = new System.Windows.Forms.PictureBox();
this.pictureBoxAPM = new ArdupilotMega.ImageLabel();
this.pictureBoxQuad = new ArdupilotMega.ImageLabel();
this.pictureBoxHexa = new ArdupilotMega.ImageLabel();
this.pictureBoxTri = new ArdupilotMega.ImageLabel();
this.pictureBoxY6 = new ArdupilotMega.ImageLabel();
this.lbl_status = new System.Windows.Forms.Label();
this.progress = new System.Windows.Forms.ProgressBar();
this.lbl_AP = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.lbl_APHil = new System.Windows.Forms.Label();
this.lbl_ACQuad = new System.Windows.Forms.Label();
this.lbl_ACHexa = new System.Windows.Forms.Label();
this.lbl_ACTri = new System.Windows.Forms.Label();
this.lbl_ACY6 = new System.Windows.Forms.Label();
this.lbl_Heli = new System.Windows.Forms.Label();
this.pictureBoxHeli = new System.Windows.Forms.PictureBox();
this.lbl_ACHil = new System.Windows.Forms.Label();
this.pictureBoxQuadHil = new System.Windows.Forms.PictureBox();
this.pictureBoxHeli = new ArdupilotMega.ImageLabel();
this.BUT_setup = new ArdupilotMega.MyButton();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAPM)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAPMHIL)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuad)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxHexa)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxTri)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxY6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxHeli)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuadHil)).BeginInit();
this.pictureBoxHilimage = new System.Windows.Forms.PictureBox();
this.pictureBoxAPHil = new System.Windows.Forms.PictureBox();
this.pictureBoxACHil = new System.Windows.Forms.PictureBox();
this.pictureBoxACHHil = new System.Windows.Forms.PictureBox();
this.pictureBoxOcta = new ArdupilotMega.ImageLabel();
this.pictureBoxOctav = new ArdupilotMega.ImageLabel();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxHilimage)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAPHil)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxACHil)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxACHHil)).BeginInit();
this.SuspendLayout();
//
// pictureBoxAPM
@ -80,19 +68,10 @@ namespace ArdupilotMega.GCSViews
this.pictureBoxAPM.TabStop = false;
this.pictureBoxAPM.Click += new System.EventHandler(this.pictureBoxAPM_Click);
//
// pictureBoxAPMHIL
//
this.pictureBoxAPMHIL.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxAPMHIL.Image = global::ArdupilotMega.Properties.Resources.APM_airframes_002;
resources.ApplyResources(this.pictureBoxAPMHIL, "pictureBoxAPMHIL");
this.pictureBoxAPMHIL.Name = "pictureBoxAPMHIL";
this.pictureBoxAPMHIL.TabStop = false;
this.pictureBoxAPMHIL.Click += new System.EventHandler(this.pictureBoxAPMHIL_Click);
//
// pictureBoxQuad
//
this.pictureBoxQuad.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxQuad.Image = global::ArdupilotMega.Properties.Resources.frames_03;
this.pictureBoxQuad.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxQuad.Image")));
resources.ApplyResources(this.pictureBoxQuad, "pictureBoxQuad");
this.pictureBoxQuad.Name = "pictureBoxQuad";
this.pictureBoxQuad.TabStop = false;
@ -101,7 +80,7 @@ namespace ArdupilotMega.GCSViews
// pictureBoxHexa
//
this.pictureBoxHexa.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxHexa.Image = global::ArdupilotMega.Properties.Resources.frames_07;
this.pictureBoxHexa.Image = global::ArdupilotMega.Properties.Resources.hexa;
resources.ApplyResources(this.pictureBoxHexa, "pictureBoxHexa");
this.pictureBoxHexa.Name = "pictureBoxHexa";
this.pictureBoxHexa.TabStop = false;
@ -110,7 +89,7 @@ namespace ArdupilotMega.GCSViews
// pictureBoxTri
//
this.pictureBoxTri.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxTri.Image = global::ArdupilotMega.Properties.Resources.frames_05;
this.pictureBoxTri.Image = global::ArdupilotMega.Properties.Resources.tri;
resources.ApplyResources(this.pictureBoxTri, "pictureBoxTri");
this.pictureBoxTri.Name = "pictureBoxTri";
this.pictureBoxTri.TabStop = false;
@ -119,7 +98,7 @@ namespace ArdupilotMega.GCSViews
// pictureBoxY6
//
this.pictureBoxY6.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxY6.Image = global::ArdupilotMega.Properties.Resources.frames_08;
this.pictureBoxY6.Image = global::ArdupilotMega.Properties.Resources.y6;
resources.ApplyResources(this.pictureBoxY6, "pictureBoxY6");
this.pictureBoxY6.Name = "pictureBoxY6";
this.pictureBoxY6.TabStop = false;
@ -136,46 +115,11 @@ namespace ArdupilotMega.GCSViews
this.progress.Name = "progress";
this.progress.Step = 1;
//
// lbl_AP
//
resources.ApplyResources(this.lbl_AP, "lbl_AP");
this.lbl_AP.Name = "lbl_AP";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// lbl_APHil
//
resources.ApplyResources(this.lbl_APHil, "lbl_APHil");
this.lbl_APHil.Name = "lbl_APHil";
//
// lbl_ACQuad
//
resources.ApplyResources(this.lbl_ACQuad, "lbl_ACQuad");
this.lbl_ACQuad.Name = "lbl_ACQuad";
//
// lbl_ACHexa
//
resources.ApplyResources(this.lbl_ACHexa, "lbl_ACHexa");
this.lbl_ACHexa.Name = "lbl_ACHexa";
//
// lbl_ACTri
//
resources.ApplyResources(this.lbl_ACTri, "lbl_ACTri");
this.lbl_ACTri.Name = "lbl_ACTri";
//
// lbl_ACY6
//
resources.ApplyResources(this.lbl_ACY6, "lbl_ACY6");
this.lbl_ACY6.Name = "lbl_ACY6";
//
// lbl_Heli
//
resources.ApplyResources(this.lbl_Heli, "lbl_Heli");
this.lbl_Heli.Name = "lbl_Heli";
//
// pictureBoxHeli
//
this.pictureBoxHeli.Cursor = System.Windows.Forms.Cursors.Hand;
@ -185,20 +129,6 @@ namespace ArdupilotMega.GCSViews
this.pictureBoxHeli.TabStop = false;
this.pictureBoxHeli.Click += new System.EventHandler(this.pictureBoxHeli_Click);
//
// lbl_ACHil
//
resources.ApplyResources(this.lbl_ACHil, "lbl_ACHil");
this.lbl_ACHil.Name = "lbl_ACHil";
//
// pictureBoxQuadHil
//
this.pictureBoxQuadHil.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxQuadHil.Image = global::ArdupilotMega.Properties.Resources.new_frames_09;
resources.ApplyResources(this.pictureBoxQuadHil, "pictureBoxQuadHil");
this.pictureBoxQuadHil.Name = "pictureBoxQuadHil";
this.pictureBoxQuadHil.TabStop = false;
this.pictureBoxQuadHil.Click += new System.EventHandler(this.pictureBoxQuadHil_Click);
//
// BUT_setup
//
resources.ApplyResources(this.BUT_setup, "BUT_setup");
@ -206,41 +136,83 @@ namespace ArdupilotMega.GCSViews
this.BUT_setup.UseVisualStyleBackColor = true;
this.BUT_setup.Click += new System.EventHandler(this.BUT_setup_Click);
//
// pictureBoxHilimage
//
this.pictureBoxHilimage.Image = global::ArdupilotMega.Properties.Resources.hil;
resources.ApplyResources(this.pictureBoxHilimage, "pictureBoxHilimage");
this.pictureBoxHilimage.Name = "pictureBoxHilimage";
this.pictureBoxHilimage.TabStop = false;
//
// pictureBoxAPHil
//
this.pictureBoxAPHil.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxAPHil.Image = global::ArdupilotMega.Properties.Resources.hilplane;
resources.ApplyResources(this.pictureBoxAPHil, "pictureBoxAPHil");
this.pictureBoxAPHil.Name = "pictureBoxAPHil";
this.pictureBoxAPHil.TabStop = false;
this.pictureBoxAPHil.Click += new System.EventHandler(this.pictureBoxAPHil_Click);
//
// pictureBoxACHil
//
this.pictureBoxACHil.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxACHil.Image = global::ArdupilotMega.Properties.Resources.hilquad;
resources.ApplyResources(this.pictureBoxACHil, "pictureBoxACHil");
this.pictureBoxACHil.Name = "pictureBoxACHil";
this.pictureBoxACHil.TabStop = false;
this.pictureBoxACHil.Click += new System.EventHandler(this.pictureBoxACHil_Click);
//
// pictureBoxACHHil
//
this.pictureBoxACHHil.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxACHHil.Image = global::ArdupilotMega.Properties.Resources.hilheli;
resources.ApplyResources(this.pictureBoxACHHil, "pictureBoxACHHil");
this.pictureBoxACHHil.Name = "pictureBoxACHHil";
this.pictureBoxACHHil.TabStop = false;
this.pictureBoxACHHil.Click += new System.EventHandler(this.pictureBoxACHHil_Click);
//
// pictureBoxOcta
//
this.pictureBoxOcta.Image = global::ArdupilotMega.Properties.Resources.octo;
resources.ApplyResources(this.pictureBoxOcta, "pictureBoxOcta");
this.pictureBoxOcta.Name = "pictureBoxOcta";
this.pictureBoxOcta.TabStop = false;
this.pictureBoxOcta.Click += new System.EventHandler(this.pictureBoxOcta_Click);
//
// pictureBoxOctav
//
this.pictureBoxOctav.Image = global::ArdupilotMega.Properties.Resources.octov;
resources.ApplyResources(this.pictureBoxOctav, "pictureBoxOctav");
this.pictureBoxOctav.Name = "pictureBoxOctav";
this.pictureBoxOctav.TabStop = false;
this.pictureBoxOctav.Click += new System.EventHandler(this.pictureBoxOctav_Click);
//
// Firmware
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lbl_ACHil);
this.Controls.Add(this.pictureBoxQuadHil);
this.Controls.Add(this.pictureBoxOctav);
this.Controls.Add(this.pictureBoxOcta);
this.Controls.Add(this.pictureBoxACHHil);
this.Controls.Add(this.pictureBoxACHil);
this.Controls.Add(this.pictureBoxAPHil);
this.Controls.Add(this.pictureBoxHilimage);
this.Controls.Add(this.BUT_setup);
this.Controls.Add(this.lbl_Heli);
this.Controls.Add(this.pictureBoxHeli);
this.Controls.Add(this.lbl_ACY6);
this.Controls.Add(this.lbl_ACTri);
this.Controls.Add(this.lbl_ACHexa);
this.Controls.Add(this.lbl_ACQuad);
this.Controls.Add(this.lbl_APHil);
this.Controls.Add(this.label2);
this.Controls.Add(this.lbl_AP);
this.Controls.Add(this.lbl_status);
this.Controls.Add(this.progress);
this.Controls.Add(this.pictureBoxY6);
this.Controls.Add(this.pictureBoxTri);
this.Controls.Add(this.pictureBoxHexa);
this.Controls.Add(this.pictureBoxQuad);
this.Controls.Add(this.pictureBoxAPMHIL);
this.Controls.Add(this.pictureBoxAPM);
this.MinimumSize = new System.Drawing.Size(1008, 461);
this.Name = "Firmware";
this.Load += new System.EventHandler(this.FirmwareVisual_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAPM)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAPMHIL)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuad)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxHexa)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxTri)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxY6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxHeli)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuadHil)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxHilimage)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAPHil)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxACHil)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxACHHil)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -384,39 +356,47 @@ namespace ArdupilotMega.GCSViews
{
if (temp.url.ToLower().Contains("firmware/AP-1".ToLower()))
{
lbl_AP.Text = temp.name;
pictureBoxAPM.Text = temp.name;
}
else if (temp.url.ToLower().Contains("firmware/APHIL-".ToLower()))
{
lbl_APHil.Text = temp.name;
pictureBoxAPHil.Text = temp.name;
}
else if (temp.url.ToLower().Contains("firmware/ac2-quad-".ToLower()))
{
lbl_ACQuad.Text = temp.name;
pictureBoxQuad.Text = temp.name;
}
else if (temp.url.ToLower().Contains("firmware/ac2-tri".ToLower()))
{
lbl_ACTri.Text = temp.name;
pictureBoxTri.Text = temp.name;
}
else if (temp.url.ToLower().Contains("firmware/ac2-hexa".ToLower()))
{
lbl_ACHexa.Text = temp.name;
pictureBoxHexa.Text = temp.name;
}
else if (temp.url.ToLower().Contains("firmware/ac2-y6".ToLower()))
{
lbl_ACY6.Text = temp.name;
pictureBoxY6.Text = temp.name;
}
else if (temp.url.ToLower().Contains("firmware/ac2-heli-1".ToLower()))
{
lbl_Heli.Text = temp.name;
pictureBoxHeli.Text = temp.name;
}
else if (temp.url.ToLower().Contains("firmware/ac2-quadhil".ToLower()))
{
lbl_ACHil.Text = temp.name;
pictureBoxACHil.Text = temp.name;
}
else if (temp.url.ToLower().Contains("firmware/ac2-octav-".ToLower()))
{
pictureBoxOctav.Text = temp.name;
}
else if (temp.url.ToLower().Contains("firmware/ac2-octa-".ToLower()))
{
pictureBoxOcta.Text = temp.name;
}
else
{
Console.WriteLine("No Home "+ temp.name + " " + temp.url);
Console.WriteLine("No Home " + temp.name + " " + temp.url);
}
}
@ -546,7 +526,7 @@ namespace ArdupilotMega.GCSViews
return;
}
Console.WriteLine("Using "+baseurl);
Console.WriteLine("Using " + baseurl);
// Create a request using a URL that can receive a post.
WebRequest request = WebRequest.Create(baseurl);
@ -736,7 +716,7 @@ namespace ArdupilotMega.GCSViews
byte[] readIntelHEXv2(StreamReader sr)
{
byte[] FLASH = new byte[sr.BaseStream.Length / 2];
byte[] FLASH = new byte[1024 * 1024];
int optionoffset = 0;
int total = 0;
@ -770,7 +750,7 @@ namespace ArdupilotMega.GCSViews
}
else if (option == 2)
{
optionoffset += (int)Convert.ToUInt16(line.Substring(9, 4), 16) << 4;
optionoffset = (int)Convert.ToUInt16(line.Substring(9, 4), 16) << 4;
}
else if (option == 1)
{
@ -779,8 +759,8 @@ namespace ArdupilotMega.GCSViews
int checksum = Convert.ToInt32(line.Substring(line.Length - 2, 2), 16);
byte checksumact = 0;
for (int z = 0; z < ((line.Length - 1 - 2) / 2) ; z++) // minus 1 for : then mins 2 for checksum itself
{
for (int z = 0; z < ((line.Length - 1 - 2) / 2); z++) // minus 1 for : then mins 2 for checksum itself
{
checksumact += Convert.ToByte(line.Substring(z * 2 + 1, 2), 16);
}
checksumact = (byte)(0x100 - checksumact);
@ -820,5 +800,30 @@ namespace ArdupilotMega.GCSViews
MainV2.fixtheme(temp);
temp.ShowDialog();
}
private void pictureBoxOctav_Click(object sender, EventArgs e)
{
findfirmware("AC2-Octav-");
}
private void pictureBoxOcta_Click(object sender, EventArgs e)
{
findfirmware("AC2-Octa-");
}
private void pictureBoxAPHil_Click(object sender, EventArgs e)
{
findfirmware("Firmware/APHIL-");
}
private void pictureBoxACHil_Click(object sender, EventArgs e)
{
findfirmware("AC2-QUADHIL-");
}
private void pictureBoxACHHil_Click(object sender, EventArgs e)
{
findfirmware("AC2-HELHIL-");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -79,6 +79,7 @@ namespace ArdupilotMega.GCSViews
protected override void Dispose(bool disposing)
{
threadrun = 0;
MainV2.config["FlightSplitter"] = MainH.SplitterDistance.ToString();
base.Dispose(disposing);
}
@ -91,7 +92,8 @@ namespace ArdupilotMega.GCSViews
myhud = hud1;
MainHcopy = MainH;
Control.CheckForIllegalCrossThreadCalls = false; // so can update display from another thread
int checkme;
//Control.CheckForIllegalCrossThreadCalls = false; // so can update display from another thread
// setup default tuning graph
if (MainV2.config["Tuning_Graph_Selected"] != null)
@ -292,7 +294,10 @@ namespace ArdupilotMega.GCSViews
if (MainV2.comPort.logreadmode && MainV2.comPort.logplaybackfile != null)
{
BUT_playlog.Text = "Pause";
this.Invoke((System.Windows.Forms.MethodInvoker)delegate()
{
BUT_playlog.Text = "Pause";
});
if (comPort.BaseStream.IsOpen)
MainV2.comPort.logreadmode = false;
@ -311,12 +316,12 @@ namespace ArdupilotMega.GCSViews
if (act > 9999 || act < 0)
act = 1;
int ts = 1;
int ts = 0;
try
{
ts = (int)(act / (double)NUM_playbackspeed.Value);
}
catch { } // cross thread
catch { }
if (ts > 0)
System.Threading.Thread.Sleep(ts);
@ -336,7 +341,15 @@ namespace ArdupilotMega.GCSViews
}
else
{
BUT_playlog.Text = "Play";
if (threadrun == 0) { return; }
try
{
this.Invoke((System.Windows.Forms.MethodInvoker)delegate()
{
BUT_playlog.Text = "Play";
});
}
catch { }
}
try

View File

@ -14,6 +14,12 @@ namespace ArdupilotMega.GCSViews
public Help()
{
InitializeComponent();
try
{
CHK_showconsole.Checked = MainV2.config["showconsole"].ToString() == "True";
}
catch { }
}
private void BUT_updatecheck_Click(object sender, EventArgs e)

View File

@ -238,6 +238,12 @@ namespace ArdupilotMega.GCSViews
{
quad = new HIL.QuadCopter();
if (RAD_JSBSim.Checked)
{
simPort = 5124;
recvPort = 5123;
}
SetupUDPRecv();
if (RAD_softXplanes.Checked)
@ -1002,11 +1008,11 @@ namespace ArdupilotMega.GCSViews
#else
imu.usec = ((ulong)DateTime.Now.ToBinary());
#endif
imu.xgyro = (short)(fdm.phidot * 1150); // roll - yes
imu.xgyro = (short)(fdm.phidot); // roll - yes
//imu.xmag = (short)(Math.Sin(head * deg2rad) * 1000);
imu.ygyro = (short)(fdm.thetadot * 1150); // pitch - yes
imu.ygyro = (short)(fdm.thetadot); // pitch - yes
//imu.ymag = (short)(Math.Cos(head * deg2rad) * 1000);
imu.zgyro = (short)(fdm.psidot * 1150);
imu.zgyro = (short)(fdm.psidot);
imu.zmag = 0;
imu.xacc = (Int16)Math.Min(Int16.MaxValue, Math.Max(Int16.MinValue, (fdm.A_X_pilot * 9808 / 32.2))); // pitch
@ -1906,22 +1912,18 @@ namespace ArdupilotMega.GCSViews
if (File.Exists(@"C:\Program Files (x86)\FlightGear\bin\Win32\fgfs.exe"))
{
ofd.InitialDirectory = @"C:\Program Files (x86)\FlightGear\bin\Win32\";
extra = " --fg-root=\"C:\\Program Files (x86)\\FlightGear\\data\"";
}
else if (File.Exists(@"C:\Program Files\FlightGear\bin\Win32\fgfs.exe"))
{
ofd.InitialDirectory = @"C:\Program Files\FlightGear\bin\Win32\";
extra = " --fg-root=\"C:\\Program Files\\FlightGear\\data\"";
}
else if (File.Exists(@"C:\Program Files\FlightGear 2.4.0\bin\Win32\fgfs.exe"))
{
ofd.InitialDirectory = @"C:\Program Files\FlightGear 2.4.0\bin\Win32\";
extra = " --fg-root=\"C:\\Program Files\\FlightGear 2.4.0\\data\"";
}
else if (File.Exists(@"C:\Program Files (x86)\FlightGear 2.4.0\bin\Win32\fgfs.exe"))
{
ofd.InitialDirectory = @"C:\Program Files (x86)\FlightGear 2.4.0\bin\Win32\";
extra = " --fg-root=\"C:\\Program Files (x86)\\FlightGear 2.4.0\\data\"";
}
else if (File.Exists(@"/usr/games/fgfs"))
{
@ -1939,6 +1941,11 @@ namespace ArdupilotMega.GCSViews
ofd.FileName = MainV2.config["fgexe"].ToString();
}
if (!MainV2.MONO)
{
extra = " --fg-root=\"" + Path.GetDirectoryName(ofd.FileName.ToLower().Replace("bin\\win32\\","")) + "\\data\"";
}
System.Diagnostics.Process P = new System.Diagnostics.Process();
P.StartInfo.FileName = ofd.FileName;
P.StartInfo.Arguments = extra + @" --geometry=400x300 --native-fdm=socket,out,50,127.0.0.1,49005,udp --generic=socket,in,50,127.0.0.1,49000,udp,MAVLink --roll=0 --pitch=0 --wind=0@0 --turbulence=0.0 --prop:/sim/frame-rate-throttle-hz=30 --timeofday=noon --shading-flat --fog-disable --disable-specular-highlight --disable-skyblend --disable-random-objects --disable-panel --disable-horizon-effect --disable-clouds --disable-anti-alias-hud ";

View File

@ -27,8 +27,6 @@ namespace ArdupilotMega.GCSViews
threadrun = false;
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false; // so can update display from another thread
}
void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
@ -39,21 +37,33 @@ namespace ArdupilotMega.GCSViews
{
lock (thisLock)
{
TXT_terminal.SelectionStart = TXT_terminal.Text.Length;
string data = comPort.ReadExisting();
data = data.TrimEnd('\r'); // else added \n all by itself
TXT_terminal.AppendText(data);
if (data.Contains("\b"))
{
TXT_terminal.Text = TXT_terminal.Text.Remove(TXT_terminal.Text.IndexOf('\b'));
TXT_terminal.SelectionStart = TXT_terminal.Text.Length;
}
inputStartPos = TXT_terminal.SelectionStart;
//Console.Write(data);
addText(data);
}
}
catch (Exception) { if (!threadrun) return; TXT_terminal.AppendText("Error reading com port\r\n"); }
}
void addText(string data)
{
this.Invoke((System.Windows.Forms.MethodInvoker)delegate()
{
TXT_terminal.SelectionStart = TXT_terminal.Text.Length;
data = data.TrimEnd('\r'); // else added \n all by itself
data = data.Replace("\0", " ");
TXT_terminal.AppendText(data);
if (data.Contains("\b"))
{
TXT_terminal.Text = TXT_terminal.Text.Remove(TXT_terminal.Text.IndexOf('\b'));
TXT_terminal.SelectionStart = TXT_terminal.Text.Length;
}
inputStartPos = TXT_terminal.SelectionStart;
});
}
private void TXT_terminal_Click(object sender, EventArgs e)
{
// auto scroll
@ -174,9 +184,17 @@ namespace ArdupilotMega.GCSViews
{
threadrun = true;
System.Threading.Thread.Sleep(2000);
DateTime start = DateTime.Now;
comPort.Write("\n\n\n\n\n");
while ((DateTime.Now - start).TotalMilliseconds < 2000)
{
if (comPort.BytesToRead > 0)
{
comPort_DataReceived((object)null, (SerialDataReceivedEventArgs)null);
}
}
comPort.Write("\n\n\n");
while (threadrun)
{
@ -194,6 +212,9 @@ namespace ArdupilotMega.GCSViews
}
catch { }
}
comPort.DtrEnable = false;
if (threadrun == false)
{
comPort.Close();

View File

@ -322,7 +322,7 @@ namespace ArdupilotMega
{
if (but.buttonno != -1 && getButtonState(but.buttonno))
{
MainV2.instance.Invoke((System.Windows.Forms.MethodInvoker)delegate()
MainV2.instance.BeginInvoke((System.Windows.Forms.MethodInvoker)delegate()
{
try
{
@ -470,7 +470,7 @@ namespace ArdupilotMega
{
byte[] buts = state.GetButtons();
if (buts == null)
if (buts == null || JoyButtons[buttonno].buttonno < 0)
return false;
return buts[JoyButtons[buttonno].buttonno] > 0;
@ -483,7 +483,7 @@ namespace ArdupilotMega
state = joystick.CurrentJoystickState;
ushort ans = pickchannel(channel, JoyChannels[channel].axis, JoyChannels[channel].reverse, JoyChannels[channel].expo);
Console.WriteLine("{0} = {1} = {2}",channel,ans, state.X);
return ans;
}

View File

@ -241,6 +241,8 @@ namespace ArdupilotMega
joy.AcquireJoystick(CMB_joysticks.Text);
joy.name = CMB_joysticks.Text;
noButtons = joy.getNumButtons();
for (int f = 0; f < noButtons; f++)
@ -289,10 +291,11 @@ namespace ArdupilotMega
for (int f = 0; f < noButtons; f++)
{
string name = (f + 1).ToString();
((HorizontalProgressBar)this.Controls.Find("hbar" + name, false)[0]).Value = MainV2.joystick.isButtonPressed(f) ? 100 : 0;
((HorizontalProgressBar)this.Controls.Find("hbar" + name, false)[0]).Value = MainV2.joystick.isButtonPressed(f) ? 100 : 0;
}
}
catch { }
catch (Exception ex) { }
}

View File

@ -57,8 +57,6 @@ namespace ArdupilotMega
public Log()
{
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false; // so can update display from another thread
}
private void Log_Load(object sender, EventArgs e)
@ -140,7 +138,10 @@ namespace ArdupilotMega
{
if (start.Second != DateTime.Now.Second)
{
TXT_status.Text = status.ToString() + " " + receivedbytes + " " + comPort.BytesToRead;
this.BeginInvoke((System.Windows.Forms.MethodInvoker)delegate()
{
TXT_status.Text = status.ToString() + " " + receivedbytes + " " + comPort.BytesToRead;
});
start = DateTime.Now;
}
}
@ -206,7 +207,10 @@ namespace ArdupilotMega
MainV2.cs.firmware = MainV2.Firmwares.ArduPlane;
TXT_seriallog.AppendText("Createing KML for " + logfile);
this.Invoke((System.Windows.Forms.MethodInvoker)delegate()
{
TXT_seriallog.AppendText("Createing KML for " + logfile);
});
while (tr.Peek() != -1)
{
@ -230,7 +234,10 @@ namespace ArdupilotMega
status = serialstatus.Waiting;
lock (thisLock)
{
TXT_seriallog.Clear();
this.Invoke((System.Windows.Forms.MethodInvoker)delegate()
{
TXT_seriallog.Clear();
});
}
//if (line.Contains("Dumping Log"))
{
@ -257,7 +264,7 @@ namespace ArdupilotMega
}
lock (thisLock)
{
this.BeginInvoke((System.Threading.ThreadStart)delegate()
this.BeginInvoke((MethodInvoker)delegate()
{
Console.Write(line);

View File

@ -254,7 +254,8 @@ namespace ArdupilotMega
if (MONO)
{
devs = Directory.GetFiles("/dev/", "*ACM*");
if (Directory.Exists("/dev/"))
devs = Directory.GetFiles("/dev/", "*ACM*");
}
string[] ports = SerialPort.GetPortNames();
@ -1298,7 +1299,12 @@ namespace ArdupilotMega
// makesure we have valid image
GCSViews.FlightData.mymap.streamjpgenable = true;
GCSViews.FlightData.myhud.streamjpgenable = true;
GCSViews.FlightData.mymap.Refresh();
MethodInvoker m = delegate()
{
GCSViews.FlightData.mymap.Refresh();
};
this.Invoke(m);
NetworkStream stream = client.GetStream();

View File

@ -33,8 +33,6 @@ namespace ArdupilotMega
public MavlinkLog()
{
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false; // so can update display from another thread
}
private void writeKML(string filename)
@ -371,10 +369,13 @@ namespace ArdupilotMega
float oldlatlngalt = 0;
DateTime appui = DateTime.Now;
while (mine.logplaybackfile.BaseStream.Position < mine.logplaybackfile.BaseStream.Length)
{
// bar moves to 50 % in this step
progressBar1.Value = (int)((float)mine.logplaybackfile.BaseStream.Position / (float)mine.logplaybackfile.BaseStream.Length * 100.0f / 2.0f);
progressBar1.Invalidate();
progressBar1.Refresh();
byte[] packet = mine.readPacket();
@ -383,9 +384,11 @@ namespace ArdupilotMega
cs.UpdateCurrentSettings(null, true, mine);
if (cs.datetime.Second % 5 == 0)
if (appui != DateTime.Now)
{
//Application.DoEvents();
// cant do entire app as mixes with flightdata timer
this.Refresh();
appui = DateTime.Now;
}
try
@ -411,6 +414,7 @@ namespace ArdupilotMega
mine.logplaybackfile.Close();
mine.logplaybackfile = null;
Application.DoEvents();
writeKML(logfile + ".kml");

View File

@ -28,7 +28,13 @@ namespace ArdupilotMega
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainV2());
try
{
Application.Run(new MainV2());
}
catch (Exception ex) { Console.WriteLine(ex.ToString()); }
}
static void Application_Idle(object sender, EventArgs e)

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.7")]
[assembly: AssemblyFileVersion("1.1.8")]
[assembly: NeutralResourcesLanguageAttribute("")]

View File

@ -109,13 +109,6 @@ namespace ArdupilotMega.Properties {
}
}
public static System.Drawing.Bitmap BR_0016_01_3T {
get {
object obj = ResourceManager.GetObject("BR_0016_01_3T", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap compass {
get {
object obj = ResourceManager.GetObject("compass", resourceCulture);
@ -165,27 +158,6 @@ namespace ArdupilotMega.Properties {
}
}
public static System.Drawing.Bitmap frames_03 {
get {
object obj = ResourceManager.GetObject("frames_03", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap frames_04 {
get {
object obj = ResourceManager.GetObject("frames_04", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap frames_05 {
get {
object obj = ResourceManager.GetObject("frames_05", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap frames_06 {
get {
object obj = ResourceManager.GetObject("frames_06", resourceCulture);
@ -193,20 +165,6 @@ namespace ArdupilotMega.Properties {
}
}
public static System.Drawing.Bitmap frames_07 {
get {
object obj = ResourceManager.GetObject("frames_07", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap frames_08 {
get {
object obj = ResourceManager.GetObject("frames_08", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap Gaugebg {
get {
object obj = ResourceManager.GetObject("Gaugebg", resourceCulture);
@ -221,23 +179,65 @@ namespace ArdupilotMega.Properties {
}
}
public static System.Drawing.Bitmap new_frames_09 {
public static System.Drawing.Bitmap hexa {
get {
object obj = ResourceManager.GetObject("new_frames_09", resourceCulture);
object obj = ResourceManager.GetObject("hexa", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap plane2 {
public static System.Drawing.Bitmap hil {
get {
object obj = ResourceManager.GetObject("plane2", resourceCulture);
object obj = ResourceManager.GetObject("hil", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap planetracker {
public static System.Drawing.Bitmap hilheli {
get {
object obj = ResourceManager.GetObject("planetracker", resourceCulture);
object obj = ResourceManager.GetObject("hilheli", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap hilplane {
get {
object obj = ResourceManager.GetObject("hilplane", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap hilquad {
get {
object obj = ResourceManager.GetObject("hilquad", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap octo {
get {
object obj = ResourceManager.GetObject("octo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap octov {
get {
object obj = ResourceManager.GetObject("octov", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap opticalflow {
get {
object obj = ResourceManager.GetObject("opticalflow", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap planeicon {
get {
object obj = ResourceManager.GetObject("planeicon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@ -256,9 +256,16 @@ namespace ArdupilotMega.Properties {
}
}
public static System.Drawing.Bitmap quad2 {
public static System.Drawing.Bitmap quadicon {
get {
object obj = ResourceManager.GetObject("quad2", resourceCulture);
object obj = ResourceManager.GetObject("quadicon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap quadx {
get {
object obj = ResourceManager.GetObject("quadx", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@ -284,11 +291,25 @@ namespace ArdupilotMega.Properties {
}
}
public static System.Drawing.Bitmap tri {
get {
object obj = ResourceManager.GetObject("tri", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap up {
get {
object obj = ResourceManager.GetObject("up", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap y6 {
get {
object obj = ResourceManager.GetObject("y6", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -166,25 +166,25 @@
<data name="APM_airframes_08" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\APM_airframes-08.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="frames_03" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="quad" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\frames-03.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="frames_04" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="quadx" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\frames-04.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="frames_05" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="tri" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\frames-05.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="frames_06" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\frames-06.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="frames_07" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="hexa" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\frames-07.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="frames_08" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="y6" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\frames-08.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="planetracker" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="planeicon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\planetracker.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
@ -1195,20 +1195,29 @@
<data name="sonar" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AC-0004-11-2.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="quad" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\quad.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="plane2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\plane2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="quad2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="quadicon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\quad2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="new_frames_09" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\new frames-09.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="BR_0016_01_3T" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="opticalflow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\BR-0016-01-3T.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="hil" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\new frames-10.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="hilheli" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\new frames-13.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="hilplane" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\new frames-11.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="hilquad" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\new frames-12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="octo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\new frames-05.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="octov" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\new frames-06.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -31,9 +31,7 @@ namespace ArdupilotMega
{
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false; // so can update display from another thread
CreateChart(zg1, "Raw Sensors", "Time", "Raw Data");
CreateChart(zg1, "Raw Sensors", "Time", "Raw Data");
}
public struct plot

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -18,7 +18,13 @@ namespace ArdupilotMega
public Script()
{
engine = Python.CreateEngine();
Dictionary<string, object> options = new Dictionary<string, object>();
options["Debug"] = true;
if (engine != null)
engine.Runtime.Shutdown();
engine = Python.CreateEngine(options);
scope = engine.CreateScope();
scope.SetVariable("cs", MainV2.cs);

View File

@ -700,7 +700,7 @@
// pictureBox2
//
this.pictureBox2.BackColor = System.Drawing.Color.White;
this.pictureBox2.BackgroundImage = global::ArdupilotMega.Properties.Resources.BR_0016_01_3T;
this.pictureBox2.BackgroundImage = global::ArdupilotMega.Properties.Resources.opticalflow;
resources.ApplyResources(this.pictureBox2, "pictureBox2");
this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox2.Name = "pictureBox2";
@ -936,7 +936,7 @@
// pictureBoxQuadX
//
this.pictureBoxQuadX.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxQuadX.Image = global::ArdupilotMega.Properties.Resources.frames_04;
this.pictureBoxQuadX.Image = global::ArdupilotMega.Properties.Resources.quadx;
resources.ApplyResources(this.pictureBoxQuadX, "pictureBoxQuadX");
this.pictureBoxQuadX.Name = "pictureBoxQuadX";
this.pictureBoxQuadX.TabStop = false;
@ -945,7 +945,7 @@
// pictureBoxQuad
//
this.pictureBoxQuad.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBoxQuad.Image = global::ArdupilotMega.Properties.Resources.frames_03;
this.pictureBoxQuad.Image = global::ArdupilotMega.Properties.Resources.quad;
resources.ApplyResources(this.pictureBoxQuad, "pictureBoxQuad");
this.pictureBoxQuad.Name = "pictureBoxQuad";
this.pictureBoxQuad.TabStop = false;

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Folder>
<name>Network Links</name>
<open>1</open>
<NetworkLink>
<name>View Centered Placemark</name>
<open>1</open>
<refreshVisibility>0</refreshVisibility>
<flyToView>1</flyToView>
<Link>
<href>http://127.0.0.1:56781/network.kml</href>
<refreshMode>onInterval</refreshMode>
<refreshInterval>1</refreshInterval>
<viewRefreshTime>1</viewRefreshTime>
</Link>
</NetworkLink>
</Folder>
</kml>