APM Planner 1.1.95

fix config panel value change detection
add loiter_ to AC config screen
Add praram name to Friendly param, and exception ignoring.
fix param file note line
intergrate andrews gimbal config.
fix any possible log appending issues
remove old cli planner on connect
modify speech to not crash on windows mono
This commit is contained in:
Michael Oborne 2012-07-01 17:51:22 +08:00
parent d1cb8c9a60
commit 46f004bcca
36 changed files with 2326 additions and 624 deletions

View File

@ -30,6 +30,8 @@ namespace ArdupilotMega.Arduino
serialPort.BaudRate = 57600;
serialPort.Open();
serialPort.toggleDTR();
Thread.Sleep(100);
int a = 0;
@ -65,6 +67,8 @@ namespace ArdupilotMega.Arduino
serialPort.BaudRate = 115200;
serialPort.Open();
serialPort.toggleDTR();
Thread.Sleep(100);
a = 0;

View File

@ -219,6 +219,9 @@
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="Transitions">
<HintPath>Lib\Transitions.dll</HintPath>
</Reference>
<Reference Include="ZedGraph, Version=5.1.2.878, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>
@ -242,6 +245,7 @@
</Compile>
<Compile Include="Comms\CommsTCPSerial.cs" />
<Compile Include="Comms\CommsUdpSerial.cs" />
<Compile Include="Presenter\ConfigCameraStabPresenter.cs" />
<Compile Include="Controls\HSI.cs">
<SubType>UserControl</SubType>
</Compile>
@ -249,9 +253,23 @@
<DependentUpon>HSI.cs</DependentUpon>
</Compile>
<Compile Include="Controls\IDynamicParameterControl.cs" />
<Compile Include="Controls\LabelWithPseudoOpacity.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\OpenGLtest.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\PictureBoxWithPseudoOpacity.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\PseudoOpacityHelper.cs" />
<Compile Include="Presenter\DelegateCommand.cs" />
<Compile Include="GCSViews\ConfigurationView\ConfigCameraStab.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="GCSViews\ConfigurationView\ConfigCameraStab.designer.cs">
<DependentUpon>ConfigCameraStab.cs</DependentUpon>
</Compile>
<Compile Include="GCSViews\ConfigurationView\ConfigFriendlyParams.cs">
<SubType>UserControl</SubType>
</Compile>
@ -276,6 +294,7 @@
<Compile Include="GCSViews\ConfigurationView\ConfigArdurover.Designer.cs">
<DependentUpon>ConfigArdurover.cs</DependentUpon>
</Compile>
<Compile Include="Presenter\ICommand.cs" />
<Compile Include="Mavlink\IMAVLink.cs" />
<Compile Include="Utilities\CaptureMJPEG.cs" />
<Compile Include="Utilities\CollectionExtensions.cs" />
@ -675,6 +694,9 @@
<EmbeddedResource Include="GCSViews\ConfigurationView\ConfigBatteryMonitoring.zh-TW.resx">
<DependentUpon>ConfigBatteryMonitoring.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\ConfigurationView\ConfigCameraStab.resx">
<DependentUpon>ConfigCameraStab.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GCSViews\ConfigurationView\ConfigFlightModes.es-ES.resx">
<DependentUpon>ConfigFlightModes.cs</DependentUpon>
</EmbeddedResource>
@ -1131,6 +1153,7 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Resources\Welcome_CN.rtf" />
<None Include="Resources\Welcome_TW.rtf" />
<None Include="Resources\Welcome_to_Michael_Oborne.rtf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@ -1162,6 +1185,10 @@
<None Include="Resources\new frames-05.png" />
<None Include="Resources\BR-0016-01-3T.jpg" />
<None Include="Resources\car.png" />
<None Include="Resources\iconWarning32.png" />
<None Include="Resources\iconWarning48.png" />
<None Include="Resources\cameraGimalPitch1.png" />
<None Include="Resources\cameraGimalRoll1.png" />
<Content Include="Resources\MAVCmd.zh-Hans.txt" />
<None Include="Resources\MAVParam.txt" />
<Content Include="Resources\MAVParam.zh-Hans.txt" />

View File

@ -9,4 +9,12 @@ Fix Issue 662 - now reads sat count for mav 1.0
Partial Issue 654 - added current to status, hud still wip
Fix Issue 648 - add validation to value
Fix Issue 638 - add delay
Fix Issue 636 - check for version.txt in app directory
Fix Issue 636 - check for version.txt in app directory
Fix config panel null bug
Add more Ardurover config options
Add Exceptions handling to video format selection
Add FORMAT_VERSION to param file ignore list
Fix NOTE param file line
Add APMRover hidden firmware upload (control-R) on firmware screen.
fix possible speach engine exception
add dataflashlog for apmrover

View File

@ -50,7 +50,6 @@ namespace ArdupilotMega.Comms
string PortName { get; set; }
int ReadBufferSize { get; set; }
int ReadTimeout { get; set; }
int ReceivedBytesThreshold { get; set; }
bool RtsEnable { get; set; }
StopBits StopBits { get; set; }
int WriteBufferSize { get; set; }

View File

@ -23,7 +23,6 @@ namespace ArdupilotMega.Comms
public int WriteBufferSize { get; set; }
public int WriteTimeout { get; set; }
public int ReceivedBytesThreshold { get; set; }
public bool RtsEnable { get; set; }
~TcpSerial()

View File

@ -20,7 +20,6 @@ namespace ArdupilotMega.Comms
public int WriteBufferSize { get; set; }
public int WriteTimeout { get; set; }
public int ReceivedBytesThreshold { get; set; }
public bool RtsEnable { get; set; }
~UdpSerial()

View File

@ -46,6 +46,7 @@ namespace ArdupilotMega.Controls
thisctl.Value = (decimal)(float)MainV2.comPort.param[value];
thisctl.Enabled = true;
thisctl.Validated += new EventHandler(thisctl_Validated);
thisctl.ValueChanged += thisctl_Validated;
}
catch (Exception ex) { Console.WriteLine(ex.ToString()); }
}

View File

@ -222,7 +222,7 @@
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(22, 96);
this.label10.Location = new System.Drawing.Point(13, 96);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(156, 13);
this.label10.TabIndex = 16;

View File

@ -0,0 +1,53 @@
using System;
using System.ComponentModel;
using System.Windows.Forms;
namespace ArdupilotMega.Controls
{
/// <summary>
/// Label which uses a painting trick to simulate opacity
/// </summary>
/// <remarks>
/// On Paint will put a rectangle with the same color as the background overtop
/// of the imapge. The Alpha of the rectangle's color is adjusted according to the
/// (new) Opacity property.
/// For this to appear as translucency, the background property must be set to the
/// same color as the background of the form.
/// </remarks>
public class LabelWithPseudoOpacity : Label
{
private float _opacity = 1.0F;
/// <summary>
/// The (simulated) Opacity. 0 is fully transparent, 1.0 is normal
/// </summary>
[Description("(Simulated) Opacity of the image"), Category("Appearance")]
[DefaultValue(typeof(float), "1.0")]
public float Opacity
{
get { return _opacity; }
set
{
if (_opacity == value)
return;
if (value > 1.0F || value < 0.0F)
throw new ArgumentOutOfRangeException();
_opacity = value;
Console.WriteLine("Opacity:" + _opacity);
Invalidate();
Invalidate();
Invalidate();
Invalidate();
}
}
protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
this.CoverWithRect(pe.Graphics, Opacity);
}
}
}

View File

@ -0,0 +1,49 @@
using System;
using System.ComponentModel;
using System.Windows.Forms;
namespace ArdupilotMega.Controls
{
/// <summary>
/// Picture Box which uses a painting trick to simulate opacity
/// </summary>
/// <remarks>
/// On Paint will put a rectangle with the same color as the background overtop
/// of the imapge. The Alpha of the rectangle's color is adjusted according to the
/// (new) Opacity property.
/// For this to appear as translucency, the background property must be set to the
/// same color as the background of the form.
/// </remarks>
public class PictureBoxWithPseudoOpacity : PictureBox
{
private float _opacity = 1.0F;
/// <summary>
/// The (simulated) Opacity. 0 is fully transparent, 1.0 is normal
/// </summary>
[Description("(Simulated) Opacity of the image"), Category("Appearance")]
[DefaultValue(typeof(float), "1.0")]
public float Opacity
{
get { return _opacity; }
set
{
if (_opacity == value)
return;
if (value > 1.0F || value < 0.0F)
throw new ArgumentOutOfRangeException();
_opacity = value;
Invalidate();
}
}
protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
this.CoverWithRect(pe.Graphics, Opacity);
}
}
}

View File

@ -0,0 +1,24 @@
using System;
using System.Drawing;
using System.Windows.Forms;
namespace ArdupilotMega.Controls
{
internal static class PseudoOpacityHelper
{
public static void CoverWithRect(this Control c, Graphics g, float opacity)
{
var bgcolor = c.BackColor;
int alpha = 255 - ((int)(opacity * 255));
Console.WriteLine("Alpha:" + alpha);
var opacityColor = Color.FromArgb(alpha, bgcolor.R, bgcolor.G, bgcolor.B);
using (var brush = new SolidBrush(opacityColor))
{
g.FillRectangle(brush, 0, 0, c.Width, c.Height);
}
}
}
}

View File

@ -28,98 +28,98 @@
/// </summary>
private void InitializeComponent()
{
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.label1 = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.myLabel1 = new ArdupilotMega.Controls.MyLabel();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
// trackBar1
//
this.trackBar1.Location = new System.Drawing.Point(77, 3);
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(179, 30);
this.trackBar1.TabIndex = 3;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 4;
this.label1.Text = "label1";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.AutoSize = true;
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 1);
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 33);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 5, 0, 10);
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(471, 70);
this.tableLayoutPanel1.TabIndex = 5;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
this.tableLayoutPanel2.Controls.Add(this.trackBar1, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.numericUpDown1, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 21);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(298, 36);
this.tableLayoutPanel2.TabIndex = 5;
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(3, 3);
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(47, 20);
this.numericUpDown1.TabIndex = 4;
//
// myLabel1
//
this.myLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.myLabel1.Location = new System.Drawing.Point(4, 4);
this.myLabel1.Name = "myLabel1";
this.myLabel1.resize = false;
this.myLabel1.Size = new System.Drawing.Size(227, 23);
this.myLabel1.TabIndex = 0;
this.myLabel1.Text = "myLabel1";
//
// RangeControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.myLabel1);
this.Name = "RangeControl";
this.Size = new System.Drawing.Size(478, 106);
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.label1 = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.myLabel1 = new ArdupilotMega.Controls.MyLabel();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
// trackBar1
//
this.trackBar1.Location = new System.Drawing.Point(77, 3);
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(179, 30);
this.trackBar1.TabIndex = 3;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 4;
this.label1.Text = "label1";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.AutoSize = true;
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 1);
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 33);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 5, 0, 10);
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(471, 70);
this.tableLayoutPanel1.TabIndex = 5;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
this.tableLayoutPanel2.Controls.Add(this.trackBar1, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.numericUpDown1, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 21);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(298, 36);
this.tableLayoutPanel2.TabIndex = 5;
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(3, 3);
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(47, 20);
this.numericUpDown1.TabIndex = 4;
//
// myLabel1
//
this.myLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.myLabel1.Location = new System.Drawing.Point(4, 4);
this.myLabel1.Name = "myLabel1";
this.myLabel1.resize = false;
this.myLabel1.Size = new System.Drawing.Size(301, 23);
this.myLabel1.TabIndex = 0;
this.myLabel1.Text = "myLabel1";
//
// RangeControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.myLabel1);
this.Name = "RangeControl";
this.Size = new System.Drawing.Size(478, 106);
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}

View File

@ -280,6 +280,10 @@ namespace ArdupilotMega
get
{
float work = 0;
if (localsnrdb == 0)
{
return 0;
}
if (localsnrdb > remotesnrdb)
{
// remote

View File

@ -128,6 +128,15 @@
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.BUT_writePIDS = new ArdupilotMega.Controls.MyButton();
this.BUT_rerequestparams = new ArdupilotMega.Controls.MyButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.LOITER_LAT_D = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.LOITER_LAT_IMAX = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.LOITER_LAT_I = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.LOITER_LAT_P = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.TUNE_LOW)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TUNE_HIGH)).BeginInit();
this.groupBox5.SuspendLayout();
@ -179,6 +188,11 @@
((System.ComponentModel.ISupportInitialize)(this.RATE_RLL_IMAX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RATE_RLL_I)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RATE_RLL_P)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LOITER_LAT_D)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.LOITER_LAT_IMAX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.LOITER_LAT_I)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.LOITER_LAT_P)).BeginInit();
this.SuspendLayout();
//
// myLabel3
@ -801,10 +815,65 @@
this.BUT_rerequestparams.UseVisualStyleBackColor = true;
this.BUT_rerequestparams.Click += new System.EventHandler(this.BUT_rerequestparams_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.LOITER_LAT_D);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.LOITER_LAT_IMAX);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.LOITER_LAT_I);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.LOITER_LAT_P);
this.groupBox1.Controls.Add(this.label4);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// LOITER_LAT_D
//
resources.ApplyResources(this.LOITER_LAT_D, "LOITER_LAT_D");
this.LOITER_LAT_D.Name = "LOITER_LAT_D";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// LOITER_LAT_IMAX
//
resources.ApplyResources(this.LOITER_LAT_IMAX, "LOITER_LAT_IMAX");
this.LOITER_LAT_IMAX.Name = "LOITER_LAT_IMAX";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// LOITER_LAT_I
//
resources.ApplyResources(this.LOITER_LAT_I, "LOITER_LAT_I");
this.LOITER_LAT_I.Name = "LOITER_LAT_I";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// LOITER_LAT_P
//
resources.ApplyResources(this.LOITER_LAT_P, "LOITER_LAT_P");
this.LOITER_LAT_P.Name = "LOITER_LAT_P";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// ConfigArducopter
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.BUT_rerequestparams);
this.Controls.Add(this.BUT_writePIDS);
this.Controls.Add(this.myLabel3);
@ -879,6 +948,11 @@
((System.ComponentModel.ISupportInitialize)(this.RATE_RLL_IMAX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RATE_RLL_I)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RATE_RLL_P)).EndInit();
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LOITER_LAT_D)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LOITER_LAT_IMAX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LOITER_LAT_I)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LOITER_LAT_P)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -984,5 +1058,14 @@
private System.Windows.Forms.ToolTip toolTip1;
private Controls.MyButton BUT_writePIDS;
private Controls.MyButton BUT_rerequestparams;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.NumericUpDown LOITER_LAT_D;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.NumericUpDown LOITER_LAT_IMAX;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown LOITER_LAT_I;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown LOITER_LAT_P;
private System.Windows.Forms.Label label4;
}
}

View File

@ -326,6 +326,19 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
arr[0].BackColor = Color.Green;
}
}
// keep loiter_lat and loiter_lon paired
if (name.Contains("LOITER_LAT_"))
{
string newname = name.Replace("LOITER_LAT_", "LOITER_LON_");
Control[] arr = this.Controls.Find(newname, true);
changes[newname] = float.Parse(((Control)sender).Text);
if (arr.Length > 0)
{
arr[0].Text = ((Control)sender).Text;
arr[0].BackColor = Color.Green;
}
}
// keep nav_lat and nav_lon paired
if (name.Contains("HLD_LAT_"))
{

View File

@ -119,7 +119,7 @@
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="myLabel3.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 302</value>
<value>364, 321</value>
</data>
<data name="myLabel3.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 23</value>
@ -135,16 +135,16 @@
<value>myLabel3</value>
</data>
<data name="&gt;&gt;myLabel3.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner, Version=1.1.4523.24267, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4564.20854, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;myLabel3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;myLabel3.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="TUNE_LOW.Location" type="System.Drawing.Point, System.Drawing">
<value>575, 305</value>
<value>399, 324</value>
</data>
<data name="TUNE_LOW.Size" type="System.Drawing.Size, System.Drawing">
<value>51, 20</value>
@ -162,10 +162,10 @@
<value>$this</value>
</data>
<data name="&gt;&gt;TUNE_LOW.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="TUNE_HIGH.Location" type="System.Drawing.Point, System.Drawing">
<value>665, 305</value>
<value>489, 324</value>
</data>
<data name="TUNE_HIGH.Size" type="System.Drawing.Size, System.Drawing">
<value>46, 20</value>
@ -183,10 +183,10 @@
<value>$this</value>
</data>
<data name="&gt;&gt;TUNE_HIGH.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="myLabel2.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 277</value>
<value>364, 296</value>
</data>
<data name="myLabel2.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 23</value>
@ -201,13 +201,13 @@
<value>myLabel2</value>
</data>
<data name="&gt;&gt;myLabel2.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner, Version=1.1.4523.24267, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4564.20854, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;myLabel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;myLabel2.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="TUNE.Items" xml:space="preserve">
<value>CH6_NONE</value>
@ -276,7 +276,7 @@
<value>CH6_RATE_KD</value>
</data>
<data name="TUNE.Location" type="System.Drawing.Point, System.Drawing">
<value>599, 277</value>
<value>423, 296</value>
</data>
<data name="TUNE.Size" type="System.Drawing.Size, System.Drawing">
<value>112, 21</value>
@ -294,10 +294,10 @@
<value>$this</value>
</data>
<data name="&gt;&gt;TUNE.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="myLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 329</value>
<value>364, 348</value>
</data>
<data name="myLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 23</value>
@ -312,13 +312,13 @@
<value>myLabel1</value>
</data>
<data name="&gt;&gt;myLabel1.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner, Version=1.1.4523.24267, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4564.20854, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;myLabel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;myLabel1.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="CH7_OPT.Items" xml:space="preserve">
<value>Do Nothing</value>
@ -345,7 +345,7 @@
<value>Save WP</value>
</data>
<data name="CH7_OPT.Location" type="System.Drawing.Point, System.Drawing">
<value>599, 329</value>
<value>423, 348</value>
</data>
<data name="CH7_OPT.Size" type="System.Drawing.Size, System.Drawing">
<value>112, 21</value>
@ -363,7 +363,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CH7_OPT.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<data name="THR_RATE_D.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 60</value>
@ -559,7 +559,7 @@
<value>7</value>
</data>
<data name="groupBox5.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 267</value>
<value>12, 247</value>
</data>
<data name="groupBox5.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 110</value>
@ -580,7 +580,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox5.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<data name="CHK_lockrollpitch.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -589,7 +589,7 @@
<value>NoControl</value>
</data>
<data name="CHK_lockrollpitch.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 247</value>
<value>12, 112</value>
</data>
<data name="CHK_lockrollpitch.Size" type="System.Drawing.Size, System.Drawing">
<value>154, 17</value>
@ -610,7 +610,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHK_lockrollpitch.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="NAV_LAT_D.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 60</value>
@ -853,7 +853,7 @@
<value>9</value>
</data>
<data name="groupBox4.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 133</value>
<value>541, 247</value>
</data>
<data name="groupBox4.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 131</value>
@ -874,7 +874,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox4.ZOrder" xml:space="preserve">
<value>11</value>
<value>12</value>
</data>
<data name="XTRK_GAIN_SC1.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 13</value>
@ -925,7 +925,7 @@
<value>1</value>
</data>
<data name="groupBox6.Location" type="System.Drawing.Point, System.Drawing">
<value>364, 267</value>
<value>364, 247</value>
</data>
<data name="groupBox6.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 43</value>
@ -946,7 +946,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox6.ZOrder" xml:space="preserve">
<value>12</value>
<value>13</value>
</data>
<data name="THR_ALT_IMAX.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 63</value>
@ -1093,7 +1093,7 @@
<value>5</value>
</data>
<data name="groupBox7.Location" type="System.Drawing.Point, System.Drawing">
<value>188, 267</value>
<value>188, 247</value>
</data>
<data name="groupBox7.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 110</value>
@ -1114,7 +1114,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox7.ZOrder" xml:space="preserve">
<value>13</value>
<value>14</value>
</data>
<data name="HLD_LAT_IMAX.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 61</value>
@ -1270,7 +1270,7 @@
<value>27</value>
</data>
<data name="groupBox19.Text" xml:space="preserve">
<value>Loiter</value>
<value>Loiter Speed</value>
</data>
<data name="&gt;&gt;groupBox19.Name" xml:space="preserve">
<value>groupBox19</value>
@ -1282,7 +1282,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox19.ZOrder" xml:space="preserve">
<value>14</value>
<value>15</value>
</data>
<data name="STB_YAW_IMAX.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 63</value>
@ -1450,7 +1450,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox20.ZOrder" xml:space="preserve">
<value>15</value>
<value>16</value>
</data>
<data name="STAB_D.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 88</value>
@ -1666,7 +1666,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox21.ZOrder" xml:space="preserve">
<value>16</value>
<value>17</value>
</data>
<data name="STB_RLL_IMAX.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 63</value>
@ -1834,7 +1834,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox22.ZOrder" xml:space="preserve">
<value>17</value>
<value>18</value>
</data>
<data name="RATE_YAW_D.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 60</value>
@ -2050,7 +2050,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox23.ZOrder" xml:space="preserve">
<value>18</value>
<value>19</value>
</data>
<data name="RATE_PIT_D.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 60</value>
@ -2266,7 +2266,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox24.ZOrder" xml:space="preserve">
<value>19</value>
<value>20</value>
</data>
<data name="RATE_RLL_D.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 60</value>
@ -2482,7 +2482,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox25.ZOrder" xml:space="preserve">
<value>20</value>
<value>21</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
@ -2506,13 +2506,13 @@
<value>BUT_writePIDS</value>
</data>
<data name="&gt;&gt;BUT_writePIDS.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4523.24267, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4564.20854, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_writePIDS.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;BUT_writePIDS.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="BUT_rerequestparams.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@ -2536,12 +2536,228 @@
<value>BUT_rerequestparams</value>
</data>
<data name="&gt;&gt;BUT_rerequestparams.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4523.24267, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4564.20854, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_rerequestparams.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;BUT_rerequestparams.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="LOITER_LAT_D.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 60</value>
</data>
<data name="LOITER_LAT_D.Size" type="System.Drawing.Size, System.Drawing">
<value>78, 20</value>
</data>
<data name="LOITER_LAT_D.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;LOITER_LAT_D.Name" xml:space="preserve">
<value>LOITER_LAT_D</value>
</data>
<data name="&gt;&gt;LOITER_LAT_D.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;LOITER_LAT_D.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;LOITER_LAT_D.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 63</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>10, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>D</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="LOITER_LAT_IMAX.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 84</value>
</data>
<data name="LOITER_LAT_IMAX.Size" type="System.Drawing.Size, System.Drawing">
<value>78, 20</value>
</data>
<data name="LOITER_LAT_IMAX.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;LOITER_LAT_IMAX.Name" xml:space="preserve">
<value>LOITER_LAT_IMAX</value>
</data>
<data name="&gt;&gt;LOITER_LAT_IMAX.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;LOITER_LAT_IMAX.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;LOITER_LAT_IMAX.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 87</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>IMAX</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="LOITER_LAT_I.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 37</value>
</data>
<data name="LOITER_LAT_I.Size" type="System.Drawing.Size, System.Drawing">
<value>78, 20</value>
</data>
<data name="LOITER_LAT_I.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;LOITER_LAT_I.Name" xml:space="preserve">
<value>LOITER_LAT_I</value>
</data>
<data name="&gt;&gt;LOITER_LAT_I.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;LOITER_LAT_I.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;LOITER_LAT_I.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 40</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>10, 13</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>I</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="LOITER_LAT_P.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 13</value>
</data>
<data name="LOITER_LAT_P.Size" type="System.Drawing.Size, System.Drawing">
<value>78, 20</value>
</data>
<data name="LOITER_LAT_P.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;LOITER_LAT_P.Name" xml:space="preserve">
<value>LOITER_LAT_P</value>
</data>
<data name="&gt;&gt;LOITER_LAT_P.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;LOITER_LAT_P.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;LOITER_LAT_P.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="label4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 16</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>14, 13</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>P</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
</data>
<data name="&gt;&gt;label4.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label4.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>537, 133</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 108</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>32</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Rate Loiter</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@ -2566,6 +2782,6 @@
<value>ConfigArducopter</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4523.24267, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner10, Version=1.1.4564.20854, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -117,152 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&gt;&gt;label31.Name" xml:space="preserve">
<value>label31</value>
</data>
<data name="&gt;&gt;label31.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label31.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;label31.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;label32.Name" xml:space="preserve">
<value>label32</value>
</data>
<data name="&gt;&gt;label32.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label32.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;label32.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;label33.Name" xml:space="preserve">
<value>label33</value>
</data>
<data name="&gt;&gt;label33.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label33.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;label33.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;TXT_ampspervolt.Name" xml:space="preserve">
<value>TXT_ampspervolt</value>
</data>
<data name="&gt;&gt;TXT_ampspervolt.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TXT_ampspervolt.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;TXT_ampspervolt.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;label34.Name" xml:space="preserve">
<value>label34</value>
</data>
<data name="&gt;&gt;label34.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label34.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;label34.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;TXT_divider.Name" xml:space="preserve">
<value>TXT_divider</value>
</data>
<data name="&gt;&gt;TXT_divider.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TXT_divider.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;TXT_divider.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;label35.Name" xml:space="preserve">
<value>label35</value>
</data>
<data name="&gt;&gt;label35.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label35.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;label35.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;TXT_voltage.Name" xml:space="preserve">
<value>TXT_voltage</value>
</data>
<data name="&gt;&gt;TXT_voltage.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TXT_voltage.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;TXT_voltage.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="&gt;&gt;TXT_inputvoltage.Name" xml:space="preserve">
<value>TXT_inputvoltage</value>
</data>
<data name="&gt;&gt;TXT_inputvoltage.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TXT_inputvoltage.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;TXT_inputvoltage.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="&gt;&gt;TXT_measuredvoltage.Name" xml:space="preserve">
<value>TXT_measuredvoltage</value>
</data>
<data name="&gt;&gt;TXT_measuredvoltage.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TXT_measuredvoltage.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;TXT_measuredvoltage.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="groupBox4.Location" type="System.Drawing.Point, System.Drawing">
<value>14, 172</value>
</data>
<data name="groupBox4.Size" type="System.Drawing.Size, System.Drawing">
<value>238, 131</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="groupBox4.TabIndex" type="System.Int32, mscorlib">
<value>50</value>
</data>
<data name="groupBox4.Text" xml:space="preserve">
<value>Calibration</value>
</data>
<data name="&gt;&gt;groupBox4.Name" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;groupBox4.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox4.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox4.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label31.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -270,6 +125,7 @@
<data name="label31.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label31.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 16</value>
</data>
@ -364,7 +220,7 @@
<value>2</value>
</data>
<data name="TXT_ampspervolt.Location" type="System.Drawing.Point, System.Drawing">
<value>149, 100</value>
<value>157, 100</value>
</data>
<data name="TXT_ampspervolt.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
@ -421,7 +277,7 @@
<value>4</value>
</data>
<data name="TXT_divider.Location" type="System.Drawing.Point, System.Drawing">
<value>149, 78</value>
<value>157, 78</value>
</data>
<data name="TXT_divider.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
@ -478,7 +334,7 @@
<value>6</value>
</data>
<data name="TXT_voltage.Location" type="System.Drawing.Point, System.Drawing">
<value>149, 57</value>
<value>157, 57</value>
</data>
<data name="TXT_voltage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
@ -502,7 +358,7 @@
<value>7</value>
</data>
<data name="TXT_inputvoltage.Location" type="System.Drawing.Point, System.Drawing">
<value>149, 13</value>
<value>157, 13</value>
</data>
<data name="TXT_inputvoltage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
@ -526,7 +382,7 @@
<value>8</value>
</data>
<data name="TXT_measuredvoltage.Location" type="System.Drawing.Point, System.Drawing">
<value>149, 35</value>
<value>157, 35</value>
</data>
<data name="TXT_measuredvoltage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
@ -549,6 +405,30 @@
<data name="&gt;&gt;TXT_measuredvoltage.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="groupBox4.Location" type="System.Drawing.Point, System.Drawing">
<value>14, 172</value>
</data>
<data name="groupBox4.Size" type="System.Drawing.Size, System.Drawing">
<value>238, 131</value>
</data>
<data name="groupBox4.TabIndex" type="System.Int32, mscorlib">
<value>50</value>
</data>
<data name="groupBox4.Text" xml:space="preserve">
<value>Calibration</value>
</data>
<data name="&gt;&gt;groupBox4.Name" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;groupBox4.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox4.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox4.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label47.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
@ -802,6 +682,6 @@ Then subtract 0.3v from that value and enter it in field #1 at left.
<value>ConfigBatteryMonitoring</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4531.12462, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner10, Version=1.1.4564.19603, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -0,0 +1,630 @@
using ArdupilotMega.Controls;
using ArdupilotMega.Presenter;
namespace ArdupilotMega.GCSViews.ConfigurationView
{
partial class ConfigCameraStab
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary> pi
/// 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.components = new System.ComponentModel.Container();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.presenterBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();
this.BUT_WriteValues = new ArdupilotMega.Controls.MyButton();
this.BUT_SetDefaults = new ArdupilotMega.Controls.MyButton();
this.BUT_Refresh = new ArdupilotMega.Controls.MyButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown6 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown7 = new System.Windows.Forms.NumericUpDown();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.numericUpDown8 = new System.Windows.Forms.NumericUpDown();
this.PBOX_WarningIcon = new ArdupilotMega.Controls.PictureBoxWithPseudoOpacity();
this.LBL_Error = new ArdupilotMega.Controls.LabelWithPseudoOpacity();
this.LNK_wiki = new System.Windows.Forms.LinkLabel();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.presenterBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PBOX_WarningIcon)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.BackgroundImage = global::ArdupilotMega.Properties.Resources.cameraGimalPitch1;
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pictureBox1.Location = new System.Drawing.Point(33, 52);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(203, 112);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// numericUpDown1
//
this.numericUpDown1.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.presenterBindingSource, "CameraPitchGain", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.numericUpDown1.DecimalPlaces = 2;
this.numericUpDown1.Increment = new decimal(new int[] {
5,
0,
0,
131072});
this.numericUpDown1.Location = new System.Drawing.Point(376, 77);
this.numericUpDown1.Maximum = new decimal(new int[] {
5,
0,
0,
0});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(55, 20);
this.numericUpDown1.TabIndex = 4;
this.numericUpDown1.Value = new decimal(new int[] {
10,
0,
0,
65536});
//
// presenterBindingSource
//
this.presenterBindingSource.DataSource = typeof(ArdupilotMega.Presenter.ConfigCameraStabPresenter);
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.presenterBindingSource, "CameraPitchReverse", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.checkBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.checkBox1.Location = new System.Drawing.Point(365, 129);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(66, 17);
this.checkBox1.TabIndex = 5;
this.checkBox1.Text = "Reverse";
this.checkBox1.UseVisualStyleBackColor = true;
//
// numericUpDown2
//
this.numericUpDown2.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.presenterBindingSource, "CameraPitchMax", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.numericUpDown2.Increment = new decimal(new int[] {
10,
0,
0,
0});
this.numericUpDown2.Location = new System.Drawing.Point(273, 129);
this.numericUpDown2.Maximum = new decimal(new int[] {
2200,
0,
0,
0});
this.numericUpDown2.Minimum = new decimal(new int[] {
800,
0,
0,
0});
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(59, 20);
this.numericUpDown2.TabIndex = 6;
this.numericUpDown2.Value = new decimal(new int[] {
2000,
0,
0,
0});
//
// numericUpDown3
//
this.numericUpDown3.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.presenterBindingSource, "CameraPitchTrim", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.numericUpDown3.Increment = new decimal(new int[] {
10,
0,
0,
0});
this.numericUpDown3.Location = new System.Drawing.Point(273, 103);
this.numericUpDown3.Maximum = new decimal(new int[] {
2200,
0,
0,
0});
this.numericUpDown3.Minimum = new decimal(new int[] {
800,
0,
0,
0});
this.numericUpDown3.Name = "numericUpDown3";
this.numericUpDown3.Size = new System.Drawing.Size(59, 20);
this.numericUpDown3.TabIndex = 7;
this.numericUpDown3.Value = new decimal(new int[] {
1500,
0,
0,
0});
//
// numericUpDown4
//
this.numericUpDown4.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.presenterBindingSource, "CameraPitchMin", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.numericUpDown4.Increment = new decimal(new int[] {
10,
0,
0,
0});
this.numericUpDown4.Location = new System.Drawing.Point(273, 77);
this.numericUpDown4.Maximum = new decimal(new int[] {
2200,
0,
0,
0});
this.numericUpDown4.Minimum = new decimal(new int[] {
800,
0,
0,
0});
this.numericUpDown4.Name = "numericUpDown4";
this.numericUpDown4.Size = new System.Drawing.Size(59, 20);
this.numericUpDown4.TabIndex = 8;
this.numericUpDown4.Value = new decimal(new int[] {
1000,
0,
0,
0});
//
// BUT_WriteValues
//
this.BUT_WriteValues.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BUT_WriteValues.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.presenterBindingSource, "WriteValuesCommand", true));
this.BUT_WriteValues.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.BUT_WriteValues.Location = new System.Drawing.Point(568, 383);
this.BUT_WriteValues.Name = "BUT_WriteValues";
this.BUT_WriteValues.Size = new System.Drawing.Size(94, 37);
this.BUT_WriteValues.TabIndex = 49;
this.BUT_WriteValues.Text = "Write";
this.BUT_WriteValues.UseVisualStyleBackColor = true;
//
// BUT_SetDefaults
//
this.BUT_SetDefaults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.BUT_SetDefaults.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.presenterBindingSource, "SetDefaultsCommand", true, System.Windows.Forms.DataSourceUpdateMode.Never));
this.BUT_SetDefaults.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.BUT_SetDefaults.Location = new System.Drawing.Point(30, 397);
this.BUT_SetDefaults.Name = "BUT_SetDefaults";
this.BUT_SetDefaults.Size = new System.Drawing.Size(78, 23);
this.BUT_SetDefaults.TabIndex = 50;
this.BUT_SetDefaults.Text = "Set Defaults";
this.BUT_SetDefaults.UseVisualStyleBackColor = true;
//
// BUT_Refresh
//
this.BUT_Refresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.BUT_Refresh.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.presenterBindingSource, "RefreshValuesCommand", true));
this.BUT_Refresh.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.BUT_Refresh.Location = new System.Drawing.Point(114, 397);
this.BUT_Refresh.Name = "BUT_Refresh";
this.BUT_Refresh.Size = new System.Drawing.Size(78, 23);
this.BUT_Refresh.TabIndex = 51;
this.BUT_Refresh.Text = "Refresh";
this.BUT_Refresh.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Location = new System.Drawing.Point(17, 216);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(635, 5);
this.groupBox1.TabIndex = 52;
this.groupBox1.TabStop = false;
//
// pictureBox2
//
this.pictureBox2.BackgroundImage = global::ArdupilotMega.Properties.Resources.cameraGimalRoll1;
this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pictureBox2.Location = new System.Drawing.Point(33, 207);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(203, 112);
this.pictureBox2.TabIndex = 53;
this.pictureBox2.TabStop = false;
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Location = new System.Drawing.Point(17, 59);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(635, 5);
this.groupBox2.TabIndex = 59;
this.groupBox2.TabStop = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label1.Location = new System.Drawing.Point(243, 79);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(24, 13);
this.label1.TabIndex = 60;
this.label1.Text = "Min";
//
// label2
//
this.label2.AutoSize = true;
this.label2.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label2.Location = new System.Drawing.Point(243, 105);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(27, 13);
this.label2.TabIndex = 61;
this.label2.Text = "Trim";
//
// label3
//
this.label3.AutoSize = true;
this.label3.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label3.Location = new System.Drawing.Point(243, 133);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(27, 13);
this.label3.TabIndex = 62;
this.label3.Text = "Max";
//
// label4
//
this.label4.AutoSize = true;
this.label4.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label4.Location = new System.Drawing.Point(346, 79);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 13);
this.label4.TabIndex = 63;
this.label4.Text = "Gain";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label5.Location = new System.Drawing.Point(21, 40);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(44, 20);
this.label5.TabIndex = 64;
this.label5.Text = "Pitch";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label6.Location = new System.Drawing.Point(20, 198);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(36, 20);
this.label6.TabIndex = 65;
this.label6.Text = "Roll";
//
// label7
//
this.label7.AutoSize = true;
this.label7.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label7.Location = new System.Drawing.Point(346, 237);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(29, 13);
this.label7.TabIndex = 74;
this.label7.Text = "Gain";
//
// label8
//
this.label8.AutoSize = true;
this.label8.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label8.Location = new System.Drawing.Point(243, 291);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(27, 13);
this.label8.TabIndex = 73;
this.label8.Text = "Max";
//
// label9
//
this.label9.AutoSize = true;
this.label9.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label9.Location = new System.Drawing.Point(243, 263);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(27, 13);
this.label9.TabIndex = 72;
this.label9.Text = "Trim";
//
// label10
//
this.label10.AutoSize = true;
this.label10.ForeColor = System.Drawing.Color.WhiteSmoke;
this.label10.Location = new System.Drawing.Point(243, 237);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(24, 13);
this.label10.TabIndex = 71;
this.label10.Text = "Min";
//
// numericUpDown5
//
this.numericUpDown5.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.presenterBindingSource, "CameraRollMin", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.numericUpDown5.Increment = new decimal(new int[] {
10,
0,
0,
0});
this.numericUpDown5.Location = new System.Drawing.Point(273, 235);
this.numericUpDown5.Maximum = new decimal(new int[] {
2200,
0,
0,
0});
this.numericUpDown5.Minimum = new decimal(new int[] {
800,
0,
0,
0});
this.numericUpDown5.Name = "numericUpDown5";
this.numericUpDown5.Size = new System.Drawing.Size(59, 20);
this.numericUpDown5.TabIndex = 70;
this.numericUpDown5.Value = new decimal(new int[] {
1000,
0,
0,
0});
//
// numericUpDown6
//
this.numericUpDown6.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.presenterBindingSource, "CameraRollTrim", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.numericUpDown6.Increment = new decimal(new int[] {
10,
0,
0,
0});
this.numericUpDown6.Location = new System.Drawing.Point(273, 261);
this.numericUpDown6.Maximum = new decimal(new int[] {
2200,
0,
0,
0});
this.numericUpDown6.Minimum = new decimal(new int[] {
800,
0,
0,
0});
this.numericUpDown6.Name = "numericUpDown6";
this.numericUpDown6.Size = new System.Drawing.Size(59, 20);
this.numericUpDown6.TabIndex = 69;
this.numericUpDown6.Value = new decimal(new int[] {
1500,
0,
0,
0});
//
// numericUpDown7
//
this.numericUpDown7.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.presenterBindingSource, "CameraRollMax", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.numericUpDown7.Increment = new decimal(new int[] {
10,
0,
0,
0});
this.numericUpDown7.Location = new System.Drawing.Point(273, 287);
this.numericUpDown7.Maximum = new decimal(new int[] {
2200,
0,
0,
0});
this.numericUpDown7.Minimum = new decimal(new int[] {
800,
0,
0,
0});
this.numericUpDown7.Name = "numericUpDown7";
this.numericUpDown7.Size = new System.Drawing.Size(59, 20);
this.numericUpDown7.TabIndex = 68;
this.numericUpDown7.Value = new decimal(new int[] {
2000,
0,
0,
0});
//
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.presenterBindingSource, "CameraRollReverse", true));
this.checkBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.checkBox2.Location = new System.Drawing.Point(365, 287);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(66, 17);
this.checkBox2.TabIndex = 67;
this.checkBox2.Text = "Reverse";
this.checkBox2.UseVisualStyleBackColor = true;
//
// numericUpDown8
//
this.numericUpDown8.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.presenterBindingSource, "CameraRollGain", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.numericUpDown8.DecimalPlaces = 2;
this.numericUpDown8.Increment = new decimal(new int[] {
5,
0,
0,
131072});
this.numericUpDown8.Location = new System.Drawing.Point(376, 235);
this.numericUpDown8.Maximum = new decimal(new int[] {
5,
0,
0,
0});
this.numericUpDown8.Name = "numericUpDown8";
this.numericUpDown8.Size = new System.Drawing.Size(55, 20);
this.numericUpDown8.TabIndex = 66;
this.numericUpDown8.Value = new decimal(new int[] {
10,
0,
0,
65536});
//
// PBOX_WarningIcon
//
this.PBOX_WarningIcon.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.PBOX_WarningIcon.Image = global::ArdupilotMega.Properties.Resources.iconWarning32;
this.PBOX_WarningIcon.Location = new System.Drawing.Point(264, 389);
this.PBOX_WarningIcon.Name = "PBOX_WarningIcon";
this.PBOX_WarningIcon.Opacity = 0.5F;
this.PBOX_WarningIcon.Size = new System.Drawing.Size(32, 32);
this.PBOX_WarningIcon.TabIndex = 75;
this.PBOX_WarningIcon.TabStop = false;
//
// LBL_Error
//
this.LBL_Error.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.LBL_Error.AutoSize = true;
this.LBL_Error.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.presenterBindingSource, "Error", true));
this.LBL_Error.ForeColor = System.Drawing.Color.WhiteSmoke;
this.LBL_Error.Location = new System.Drawing.Point(303, 402);
this.LBL_Error.Name = "LBL_Error";
this.LBL_Error.Size = new System.Drawing.Size(138, 13);
this.LBL_Error.TabIndex = 76;
this.LBL_Error.Text = "Error Message of some kind";
//
// LNK_wiki
//
this.LNK_wiki.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.LNK_wiki.AutoSize = true;
this.LNK_wiki.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.LNK_wiki.LinkColor = System.Drawing.Color.CornflowerBlue;
this.LNK_wiki.Location = new System.Drawing.Point(624, 9);
this.LNK_wiki.Name = "LNK_wiki";
this.LNK_wiki.Size = new System.Drawing.Size(28, 13);
this.LNK_wiki.TabIndex = 77;
this.LNK_wiki.TabStop = true;
this.LNK_wiki.Text = "Wiki";
this.LNK_wiki.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LNK_Wiki_Clicked);
//
// ConfigCameraStab
//
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(39)))), ((int)(((byte)(40)))));
this.Controls.Add(this.LNK_wiki);
this.Controls.Add(this.LBL_Error);
this.Controls.Add(this.PBOX_WarningIcon);
this.Controls.Add(this.label7);
this.Controls.Add(this.label8);
this.Controls.Add(this.label9);
this.Controls.Add(this.label10);
this.Controls.Add(this.numericUpDown5);
this.Controls.Add(this.numericUpDown6);
this.Controls.Add(this.numericUpDown7);
this.Controls.Add(this.checkBox2);
this.Controls.Add(this.numericUpDown8);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.BUT_Refresh);
this.Controls.Add(this.BUT_SetDefaults);
this.Controls.Add(this.BUT_WriteValues);
this.Controls.Add(this.numericUpDown4);
this.Controls.Add(this.numericUpDown3);
this.Controls.Add(this.numericUpDown2);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.pictureBox1);
this.Name = "ConfigCameraStab";
this.Size = new System.Drawing.Size(674, 432);
this.Load += new System.EventHandler(this.ConfigCameraStab_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.presenterBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PBOX_WarningIcon)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.NumericUpDown numericUpDown3;
private System.Windows.Forms.NumericUpDown numericUpDown4;
private Controls.MyButton BUT_WriteValues;
private Controls.MyButton BUT_SetDefaults;
private Controls.MyButton BUT_Refresh;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.NumericUpDown numericUpDown5;
private System.Windows.Forms.NumericUpDown numericUpDown6;
private System.Windows.Forms.NumericUpDown numericUpDown7;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.NumericUpDown numericUpDown8;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.BindingSource presenterBindingSource;
private PictureBoxWithPseudoOpacity PBOX_WarningIcon;
private LabelWithPseudoOpacity LBL_Error;
private System.Windows.Forms.LinkLabel LNK_wiki;
}
}

View File

@ -0,0 +1,126 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using ArdupilotMega.Controls.BackstageView;
using ArdupilotMega.Presenter;
using Transitions;
namespace ArdupilotMega.GCSViews.ConfigurationView
{
public partial class ConfigCameraStab : BackStageViewContentPanel
{
private ConfigCameraStabPresenter _presenter;
private Transition[] _ErrorTransition;
private Transition _NoErrorTransition;
public ConfigCameraStab()
{
InitializeComponent();
PBOX_WarningIcon.Opacity = 0.0F;
LBL_Error.Opacity = 0.0F;
}
private void ConfigCameraStab_Load(object sender, EventArgs ev)
{
_presenter = new ConfigCameraStabPresenter(MainV2.comPort);
presenterBindingSource.DataSource = _presenter;
var delay = new Transition(new TransitionType_Linear(2000));
var fadeIn = new Transition(new TransitionType_Linear(800));
fadeIn.add(PBOX_WarningIcon, "Opacity", 1.0F);
fadeIn.add(LBL_Error, "Opacity", 1.0F);
_ErrorTransition = new[] { delay, fadeIn };
_NoErrorTransition = new Transition(new TransitionType_Linear(10));
_NoErrorTransition.add(PBOX_WarningIcon, "Opacity", 0.0F);
_NoErrorTransition.add(LBL_Error, "Opacity", 0.0F);
//setup button actions
foreach (var btn in Controls.Cast<Control>().OfType<Button>())
btn.Click += HandleButtonClick;
_presenter.PropertyChanged += (s, e) =>
{
if (e.PropertyName == "HasError")
{
SetErrorMessageOpacity();
}
};
_presenter.PropertyChanged += CheckCommandStates;
LNK_wiki.MouseEnter += (s, e) => FadeLinkTo((LinkLabel)s, Color.CornflowerBlue);
LNK_wiki.MouseLeave += (s, e) => FadeLinkTo((LinkLabel)s, Color.WhiteSmoke);
SetErrorMessageOpacity();
// Fix for mono bug where binding sources do not respect INPC notifications on POCOs
if (MainV2.MONO)
{
_presenter.PropertyChanged += (s, e) => presenterBindingSource.ResetBindings(false);
}
_presenter.Load();
}
private void SetErrorMessageOpacity()
{
if (_presenter.HasError)
{
// Todo - is this the prob? maybe single log trasition
var t = new Transition(new TransitionType_Acceleration(1000));
t.add(PBOX_WarningIcon, "Opacity", 1.0F);
t.add(LBL_Error, "Opacity", 1.0F);
t.run();
//Transition.runChain(_ErrorTransition);
}
else
{
_NoErrorTransition.run();
}
}
private static void FadeLinkTo(LinkLabel l, Color c)
{
var changeColorTransition = new Transition(new TransitionType_Linear(300));
changeColorTransition.add(l, "LinkColor", c);
changeColorTransition.run();
}
// Common handler for all buttons
// Will execute an ICommand if one is found on the button Tag
private static void HandleButtonClick(object sender, EventArgs e)
{
if (sender is Button)
{
var cmd = (sender as Button).Tag as ICommand;
if (cmd != null)
if (cmd.CanExecute(null))
cmd.Execute(null);
}
}
// Something has changed on the presenter - This may be an Icommand
// enabled state, so update the buttons as appropriate
void CheckCommandStates(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
{
foreach (var btn in Controls.Cast<Control>().OfType<Button>())
{
var cmd = btn.Tag as ICommand;
if (cmd != null)
btn.Enabled = cmd.CanExecute(null);
}
}
private void LNK_Wiki_Clicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start(new ProcessStartInfo("http://code.google.com/p/arducopter/wiki/AC2_Camera"));
}
}
}

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>
<metadata name="presenterBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>147, 17</value>
</metadata>
</root>

View File

@ -186,7 +186,13 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
// get the params if nothing exists already
if (_params != null && _params.Count == 0)
Utilities.ParameterMetaDataParser.GetParameterInformation();
{
try
{
Utilities.ParameterMetaDataParser.GetParameterInformation();
}
catch (Exception exp) { log.Error(exp); } // just to cleanup any errors
}
_params.ForEach(x =>
{
@ -198,7 +204,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
string value = ((float)MainV2.comPort.param[x.Key]).ToString("0.###");
string description = _parameterMetaDataRepository.GetParameterMetaData(x.Key, ParameterMetaDataConstants.Description);
string displayName = x.Value;
string displayName = x.Value + " (" + x.Key + ")";
string units = _parameterMetaDataRepository.GetParameterMetaData(x.Key, ParameterMetaDataConstants.Units);
// If this is a range
@ -234,15 +240,15 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
rangeControl.Scaler = scaler;
rangeControl.DescriptionText = FitDescriptionText(units, description);
rangeControl.LabelText = displayName;
rangeControl.TrackBarControl.Minimum = scaledLowerRange;
rangeControl.TrackBarControl.Maximum = scaledUpperRange;
rangeControl.TrackBarControl.Minimum = Math.Min(scaledLowerRange,(int)intValue);
rangeControl.TrackBarControl.Maximum = Math.Max(scaledUpperRange, (int)intValue);
rangeControl.TrackBarControl.TickFrequency = scaledIncrement;
rangeControl.TrackBarControl.Value = (int)intValue;
rangeControl.NumericUpDownControl.Increment = (decimal)increment;
rangeControl.NumericUpDownControl.DecimalPlaces = scaler.ToString(CultureInfo.InvariantCulture).Length - 1;
rangeControl.NumericUpDownControl.Minimum = (decimal)lowerRange;
rangeControl.NumericUpDownControl.Maximum = (decimal)upperRange;
rangeControl.NumericUpDownControl.Minimum = (decimal)Math.Min(lowerRange, ((float)MainV2.comPort.param[x.Key]));
rangeControl.NumericUpDownControl.Maximum = (decimal)Math.Max(upperRange, ((float)MainV2.comPort.param[x.Key]));
rangeControl.NumericUpDownControl.Value = (decimal)((float)MainV2.comPort.param[x.Key]);
rangeControl.AttachEvents();

View File

@ -180,7 +180,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
}
Common.InputBox("Custom Note", "Enter your Notes/Frame Type etc", ref input);
if (input != "")
sw.WriteLine("NOTE: " + input.Replace(',', '|'));
sw.WriteLine("#NOTE: " + input.Replace(',', '|'));
foreach (DataGridViewRow row in Params.Rows)
{
float value = float.Parse(row.Cells[1].Value.ToString());

View File

@ -19,61 +19,13 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
if (MainV2.comPort.BaseStream.IsOpen)
{
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigRadioInput(), "Radio Calibration"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigFlightModes(), "Flight Modes"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigHardwareOptions(), "Hardware Options"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigBatteryMonitoring(), "Battery Monitor"));
/******************************HELI **************************/
if (MainV2.comPort.param["H_GYR_ENABLE"] != null) // heli
{
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigAccelerometerCalibrationQuad(), "ArduCopter Level"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigTradHeli(), "Heli Setup"));
var configpanel = new Controls.ConfigPanel();
configpanel.LoadXML("ArduCopterConfig.xml");
this.backstageView.AddPage(new BackstageView.BackstageViewPage(configpanel, "ArduCopter Pids"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigArducopter(), "ArduCopter Config"));
}
/****************************** ArduCopter **************************/
else if (MainV2.cs.firmware == MainV2.Firmwares.ArduCopter2)
{
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigAccelerometerCalibrationQuad(), "ArduCopter Level"));
var configpanel = new Controls.ConfigPanel();
configpanel.LoadXML("ArduCopterConfig.xml");
this.backstageView.AddPage(new BackstageView.BackstageViewPage(configpanel, "ArduCopter Pids"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigArducopter(), "ArduCopter Config"));
}
/****************************** ArduPlane **************************/
else if (MainV2.cs.firmware == MainV2.Firmwares.ArduPlane)
{
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigAccelerometerCalibrationPlane(), "ArduPlane Level"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigArduplane(), "ArduPlane Pids"));
}
/****************************** ArduRover **************************/
else if (MainV2.cs.firmware == MainV2.Firmwares.ArduRover)
{
//this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigAccelerometerCalibrationPlane(), "ArduRover Level"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigArdurover(), "ArduRover Pids"));
}
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigFriendlyParams { ParameterMode = ParameterMetaDataConstants.Standard }, "Standard Params"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigFriendlyParams { ParameterMode = ParameterMetaDataConstants.Advanced }, "Advanced Params"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigRawParams(), "Parameter List"));
AddPagesForConnectedState();
}
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ArdupilotMega._3DRradio(), "3DR Radio"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ArdupilotMega.Antenna.Tracker(), "Antenna Tracker"));
this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigPlanner(), "Planner"));
// These pages work when not connected to an APM
AddBackstageViewPage(new ArdupilotMega._3DRradio(), "3DR Radio");
AddBackstageViewPage(new ArdupilotMega.Antenna.Tracker(), "Antenna Tracker");
AddBackstageViewPage(new ConfigPlanner(), "Planner");
this.backstageView.ActivatePage(backstageView.Pages[0]);
@ -83,6 +35,68 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
}
}
// Add the pages that can only be shown when we are connected to an APM
private void AddPagesForConnectedState()
{
/****************************** Common **************************/
AddBackstageViewPage(new ConfigRadioInput(), "Radio Calibration");
AddBackstageViewPage(new ConfigFlightModes(), "Flight Modes");
AddBackstageViewPage(new ConfigHardwareOptions(), "Hardware Options");
AddBackstageViewPage(new ConfigBatteryMonitoring(), "Battery Monitor");
AddBackstageViewPage(new ConfigCameraStab(), "Camera Gimbal");
/******************************HELI **************************/
if (MainV2.comPort.param["H_GYR_ENABLE"] != null) // heli
{
AddBackstageViewPage(new ConfigAccelerometerCalibrationQuad(), "ArduCopter Level");
AddBackstageViewPage(new ConfigTradHeli(), "Heli Setup");
var configpanel = new Controls.ConfigPanel();
configpanel.LoadXML("ArduCopterConfig.xml");
AddBackstageViewPage(configpanel, "ArduCopter Pids");
AddBackstageViewPage(new ConfigArducopter(), "ArduCopter Config");
}
/****************************** ArduCopter **************************/
else if (MainV2.cs.firmware == MainV2.Firmwares.ArduCopter2)
{
AddBackstageViewPage(new ConfigAccelerometerCalibrationQuad(), "ArduCopter Level");
var configpanel = new Controls.ConfigPanel();
configpanel.LoadXML("ArduCopterConfig.xml");
AddBackstageViewPage(configpanel, "ArduCopter Pids");
AddBackstageViewPage(new ConfigArducopter(), "ArduCopter Config");
}
/****************************** ArduPlane **************************/
else if (MainV2.cs.firmware == MainV2.Firmwares.ArduPlane)
{
AddBackstageViewPage(new ConfigAccelerometerCalibrationPlane(), "ArduPlane Level");
AddBackstageViewPage(new ConfigArduplane(), "ArduPlane Pids");
}
/****************************** ArduRover **************************/
else if (MainV2.cs.firmware == MainV2.Firmwares.ArduRover)
{
//AddBackstageViewPage(new ConfigAccelerometerCalibrationPlane(), "ArduRover Level"));
AddBackstageViewPage(new ConfigArdurover(), "ArduRover Pids");
}
AddBackstageViewPage(new ConfigFriendlyParams { ParameterMode = ParameterMetaDataConstants.Standard }, "Standard Params");
AddBackstageViewPage(new ConfigFriendlyParams { ParameterMode = ParameterMetaDataConstants.Advanced }, "Advanced Params");
AddBackstageViewPage(new ConfigRawParams(), "Parameter List");
}
private void AddBackstageViewPage(BackStageViewContentPanel userControl, string headerText)
{
backstageView.AddPage(new BackstageView.BackstageViewPage(userControl, headerText));
}
private void Setup_Load(object sender, EventArgs e)
{

View File

@ -226,7 +226,7 @@
<value>hud1</value>
</data>
<data name="&gt;&gt;hud1.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.HUD, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.HUD, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;hud1.Parent" xml:space="preserve">
<value>SubMainLeft.Panel1</value>
@ -265,7 +265,7 @@
<value>BUT_script</value>
</data>
<data name="&gt;&gt;BUT_script.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_script.Parent" xml:space="preserve">
<value>tabActions</value>
@ -298,7 +298,7 @@
<value>BUT_joystick</value>
</data>
<data name="&gt;&gt;BUT_joystick.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_joystick.Parent" xml:space="preserve">
<value>tabActions</value>
@ -328,7 +328,7 @@
<value>BUT_quickmanual</value>
</data>
<data name="&gt;&gt;BUT_quickmanual.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_quickmanual.Parent" xml:space="preserve">
<value>tabActions</value>
@ -358,7 +358,7 @@
<value>BUT_quickrtl</value>
</data>
<data name="&gt;&gt;BUT_quickrtl.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_quickrtl.Parent" xml:space="preserve">
<value>tabActions</value>
@ -388,7 +388,7 @@
<value>BUT_quickauto</value>
</data>
<data name="&gt;&gt;BUT_quickauto.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_quickauto.Parent" xml:space="preserve">
<value>tabActions</value>
@ -442,7 +442,7 @@
<value>BUT_setwp</value>
</data>
<data name="&gt;&gt;BUT_setwp.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_setwp.Parent" xml:space="preserve">
<value>tabActions</value>
@ -493,7 +493,7 @@
<value>BUT_setmode</value>
</data>
<data name="&gt;&gt;BUT_setmode.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_setmode.Parent" xml:space="preserve">
<value>tabActions</value>
@ -523,7 +523,7 @@
<value>BUT_clear_track</value>
</data>
<data name="&gt;&gt;BUT_clear_track.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_clear_track.Parent" xml:space="preserve">
<value>tabActions</value>
@ -574,7 +574,7 @@
<value>BUT_Homealt</value>
</data>
<data name="&gt;&gt;BUT_Homealt.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_Homealt.Parent" xml:space="preserve">
<value>tabActions</value>
@ -604,7 +604,7 @@
<value>BUT_RAWSensor</value>
</data>
<data name="&gt;&gt;BUT_RAWSensor.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_RAWSensor.Parent" xml:space="preserve">
<value>tabActions</value>
@ -634,7 +634,7 @@
<value>BUTrestartmission</value>
</data>
<data name="&gt;&gt;BUTrestartmission.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUTrestartmission.Parent" xml:space="preserve">
<value>tabActions</value>
@ -664,7 +664,7 @@
<value>BUTactiondo</value>
</data>
<data name="&gt;&gt;BUTactiondo.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUTactiondo.Parent" xml:space="preserve">
<value>tabActions</value>
@ -718,7 +718,7 @@
<value>Gvspeed</value>
</data>
<data name="&gt;&gt;Gvspeed.Type" xml:space="preserve">
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;Gvspeed.Parent" xml:space="preserve">
<value>tabGauges</value>
@ -748,7 +748,7 @@
<value>Gheading</value>
</data>
<data name="&gt;&gt;Gheading.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.HSI, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.HSI, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;Gheading.Parent" xml:space="preserve">
<value>tabGauges</value>
@ -778,7 +778,7 @@
<value>Galt</value>
</data>
<data name="&gt;&gt;Galt.Type" xml:space="preserve">
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;Galt.Parent" xml:space="preserve">
<value>tabGauges</value>
@ -811,7 +811,7 @@
<value>Gspeed</value>
</data>
<data name="&gt;&gt;Gspeed.Type" xml:space="preserve">
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;Gspeed.Parent" xml:space="preserve">
<value>tabGauges</value>
@ -895,7 +895,7 @@
<value>lbl_playbackspeed</value>
</data>
<data name="&gt;&gt;lbl_playbackspeed.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;lbl_playbackspeed.Parent" xml:space="preserve">
<value>tabTLogs</value>
@ -922,7 +922,7 @@
<value>lbl_logpercent</value>
</data>
<data name="&gt;&gt;lbl_logpercent.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;lbl_logpercent.Parent" xml:space="preserve">
<value>tabTLogs</value>
@ -949,7 +949,7 @@
<value>NUM_playbackspeed</value>
</data>
<data name="&gt;&gt;NUM_playbackspeed.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;NUM_playbackspeed.Parent" xml:space="preserve">
<value>tabTLogs</value>
@ -976,7 +976,7 @@
<value>BUT_log2kml</value>
</data>
<data name="&gt;&gt;BUT_log2kml.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_log2kml.Parent" xml:space="preserve">
<value>tabTLogs</value>
@ -1030,7 +1030,7 @@
<value>BUT_playlog</value>
</data>
<data name="&gt;&gt;BUT_playlog.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_playlog.Parent" xml:space="preserve">
<value>tabTLogs</value>
@ -1057,7 +1057,7 @@
<value>BUT_loadtelem</value>
</data>
<data name="&gt;&gt;BUT_loadtelem.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;BUT_loadtelem.Parent" xml:space="preserve">
<value>tabTLogs</value>
@ -1246,7 +1246,7 @@
<value>lbl_hdop</value>
</data>
<data name="&gt;&gt;lbl_hdop.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;lbl_hdop.Parent" xml:space="preserve">
<value>splitContainer1.Panel2</value>
@ -1279,7 +1279,7 @@
<value>lbl_sats</value>
</data>
<data name="&gt;&gt;lbl_sats.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;lbl_sats.Parent" xml:space="preserve">
<value>splitContainer1.Panel2</value>
@ -1309,7 +1309,7 @@
<value>lbl_winddir</value>
</data>
<data name="&gt;&gt;lbl_winddir.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;lbl_winddir.Parent" xml:space="preserve">
<value>splitContainer1.Panel2</value>
@ -1339,7 +1339,7 @@
<value>lbl_windvel</value>
</data>
<data name="&gt;&gt;lbl_windvel.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;lbl_windvel.Parent" xml:space="preserve">
<value>splitContainer1.Panel2</value>
@ -1511,7 +1511,7 @@
<value>gMapControl1</value>
</data>
<data name="&gt;&gt;gMapControl1.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;gMapControl1.Parent" xml:space="preserve">
<value>splitContainer1.Panel2</value>
@ -1574,7 +1574,7 @@
<value>TXT_lat</value>
</data>
<data name="&gt;&gt;TXT_lat.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;TXT_lat.Parent" xml:space="preserve">
<value>panel1</value>
@ -1631,7 +1631,7 @@
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>panel1</value>
@ -1661,7 +1661,7 @@
<value>TXT_long</value>
</data>
<data name="&gt;&gt;TXT_long.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;TXT_long.Parent" xml:space="preserve">
<value>panel1</value>
@ -1691,7 +1691,7 @@
<value>TXT_alt</value>
</data>
<data name="&gt;&gt;TXT_alt.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;TXT_alt.Parent" xml:space="preserve">
<value>panel1</value>
@ -1892,7 +1892,7 @@
<value>label6</value>
</data>
<data name="&gt;&gt;label6.Type" xml:space="preserve">
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;label6.Parent" xml:space="preserve">
<value>$this</value>
@ -1988,6 +1988,6 @@
<value>FlightData</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4560.33097, Culture=neutral, PublicKeyToken=null</value>
<value>System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4561.37648, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -577,6 +577,7 @@ namespace ArdupilotMega
{
giveComport = false;
// sanity check
if (comPort.BaseStream.IsOpen && cs.groundspeed > 4)
{
if (DialogResult.No == CustomMessageBox.Show("Your model is still moving are you sure you want to disconnect?", "Disconnect", MessageBoxButtons.YesNo))
@ -585,25 +586,23 @@ namespace ArdupilotMega
}
}
// cleanup from any previous sessions
if (comPort.logfile != null)
comPort.logfile.Close();
if (comPort.rawlogfile != null)
comPort.rawlogfile.Close();
comPort.logfile = null;
comPort.rawlogfile = null;
// decide if this is a connect or disconnect
if (comPort.BaseStream.IsOpen)
{
try
{
try
{
if (speechEngine != null) // cancel all pending speech
speechEngine.SpeakAsyncCancelAll();
}
catch (Exception ex)
{
log.Error(ex);
}
if (comPort.logfile != null)
comPort.logfile.Close();
if (comPort.rawlogfile != null)
comPort.rawlogfile.Close();
if (speechEngine != null) // cancel all pending speech
speechEngine.SpeakAsyncCancelAll();
comPort.BaseStream.DtrEnable = false;
comPort.Close();
@ -664,22 +663,16 @@ namespace ArdupilotMega
{
comPort.BaseStream.BaudRate = int.Parse(_connectionControl.CMB_baudrate.Text);
}
catch { }
catch (Exception exp) { log.Error(exp); }
// false here
comPort.BaseStream.DtrEnable = false;
comPort.BaseStream.RtsEnable = false;
// reset on connect logic.
if (config["CHK_resetapmonconnect"] == null || bool.Parse(config["CHK_resetapmonconnect"].ToString()) == true)
comPort.BaseStream.toggleDTR();
// cleanup from any previous sessions
if (comPort.logfile != null)
comPort.logfile.Close();
if (comPort.rawlogfile != null)
comPort.rawlogfile.Close();
// setup to record new logs
try
{
@ -688,9 +681,9 @@ namespace ArdupilotMega
comPort.rawlogfile = new BinaryWriter(File.Open(Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar + @"logs" + Path.DirectorySeparatorChar + DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss") + ".rlog", FileMode.CreateNew, FileAccess.ReadWrite, FileShare.Read));
}
catch { CustomMessageBox.Show("Failed to create log - wont log this session"); } // soft fail
catch (Exception exp2) { log.Error(exp2); CustomMessageBox.Show("Failed to create log - wont log this session"); } // soft fail
// reset connect time
// reset connect time - for timeout functions
connecttime = DateTime.Now;
// do the connect
@ -728,7 +721,7 @@ namespace ArdupilotMega
}
catch (Exception ex)
{
log.Warn(ex.ToString());
log.Warn(ex);
try
{
_connectionControl.IsConnected(false);
@ -770,9 +763,12 @@ namespace ArdupilotMega
return;
}
}
else
{
log.Error("Could not download eeprom contents");
}
}
catch { }
log.Debug(ex.ToString());
catch (Exception exp3) { log.Error(exp3); }
//MessageBox.Show("Can not establish a connection\n\n" + ex.ToString());
return;
}
@ -1762,7 +1758,7 @@ namespace ArdupilotMega
log.Debug(path);
// Create a request using a URL that can receive a post.
string requestUriString = baseurl + path;
string requestUriString = baseurl + Path.GetFileName(path);
log.Debug("Checking for update at: " + requestUriString);
var webRequest = WebRequest.Create(requestUriString);
webRequest.Timeout = 5000;

View File

@ -289,7 +289,7 @@ namespace ArdupilotMega
}
// incase we are in setup mode
BaseStream.WriteLine("planner\rgcs\r");
//BaseStream.WriteLine("planner\rgcs\r");
log.Info(DateTime.Now.Millisecond + " Start connect loop ");
@ -313,7 +313,7 @@ namespace ArdupilotMega
System.Threading.Thread.Sleep(1);
// incase we are in setup mode
BaseStream.WriteLine("planner\rgcs\r");
//BaseStream.WriteLine("planner\rgcs\r");
// can see 2 heartbeat packets at any time, and will connect - was one after the other
@ -321,7 +321,7 @@ namespace ArdupilotMega
buffer = getHeartBeat();
// incase we are in setup mode
BaseStream.WriteLine("planner\rgcs\r");
//BaseStream.WriteLine("planner\rgcs\r");
System.Threading.Thread.Sleep(1);
@ -556,7 +556,7 @@ namespace ArdupilotMega
{
if (!param.ContainsKey(paramname))
{
log.Info("Param doesnt exist " + paramname);
log.Warn("Trying to set Param that doesnt exist " + paramname);
return false;
}
@ -568,11 +568,9 @@ namespace ArdupilotMega
MainV2.giveComport = true;
mavlink_param_set_t req = new mavlink_param_set_t();
req.target_system = sysid;
req.target_component = compid;
var req = new mavlink_param_set_t {target_system = sysid, target_component = compid};
byte[] temp = ASCIIEncoding.ASCII.GetBytes(paramname);
byte[] temp = Encoding.ASCII.GetBytes(paramname);
modifyParamForDisplay(false, paramname, ref value);
#if MAVLINK10
@ -2369,7 +2367,7 @@ namespace ArdupilotMega
try
{
if (logfile != null && logfile.BaseStream.CanWrite)
if (logfile != null && logfile.BaseStream.CanWrite && !logreadmode)
{
lock (logwritelock)
{

View File

@ -2,14 +2,14 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" xmlns:difx="http://schemas.microsoft.com/wix/DifxAppExtension">
<Product Id="*" Name="APM Planner" Language="1033" Version="1.1.92" Manufacturer="Michael Oborne" UpgradeCode="{625389D7-EB3C-4d77-A5F6-A285CF99437D}">
<Product Id="*" Name="APM Planner" Language="1033" Version="1.1.94" Manufacturer="Michael Oborne" UpgradeCode="{625389D7-EB3C-4d77-A5F6-A285CF99437D}">
<Package Description="APM Planner Installer" Comments="Apm Planner Installer" Manufacturer="Michael Oborne" InstallerVersion="200" Compressed="yes" />
<Upgrade Id="{625389D7-EB3C-4d77-A5F6-A285CF99437D}">
<UpgradeVersion OnlyDetect="yes" Minimum="1.1.92" Property="NEWERVERSIONDETECTED" IncludeMinimum="no" />
<UpgradeVersion OnlyDetect="no" Maximum="1.1.92" Property="OLDERVERSIONBEINGUPGRADED" IncludeMaximum="no" />
<UpgradeVersion OnlyDetect="yes" Minimum="1.1.94" Property="NEWERVERSIONDETECTED" IncludeMinimum="no" />
<UpgradeVersion OnlyDetect="no" Maximum="1.1.94" Property="OLDERVERSIONBEINGUPGRADED" IncludeMaximum="no" />
</Upgrade>
<InstallExecuteSequence>
@ -31,7 +31,7 @@
<Permission User="Everyone" GenericAll="yes" />
</CreateFolder>
</Component>
<Component Id="_comp1" Guid="c5288a34-fa31-4ee3-92f0-52c727960dcb">
<Component Id="_comp1" Guid="73b00fbb-76c5-44d2-a1d3-7c4597e981d7">
<File Id="_2" Source="..\bin\release\.gdbinit" />
<File Id="_3" Source="..\bin\release\.gitignore" />
<File Id="_4" Source="..\bin\release\aerosim3.91.txt" />
@ -47,201 +47,204 @@
<File Id="_14" Source="..\bin\release\ArdupilotMegaPlanner.exe.config" />
<File Id="_15" Source="..\bin\release\ArdupilotMegaPlanner.exe.manifest" />
<File Id="_16" Source="..\bin\release\ArdupilotMegaPlanner.pdb" />
<File Id="_17" Source="..\bin\release\ArdupilotMegaPlanner10.exe" />
<File Id="_18" Source="..\bin\release\ArdupilotMegaPlanner10.exe.config" />
<File Id="_19" Source="..\bin\release\block_plane_0.dae" />
<File Id="_20" Source="..\bin\release\BSE.Windows.Forms.dll" />
<File Id="_21" Source="..\bin\release\BSE.Windows.Forms.pdb" />
<File Id="_22" Source="..\bin\release\BSE.Windows.Forms.xml" />
<File Id="_23" Source="..\bin\release\Core.dll" />
<File Id="_24" Source="..\bin\release\dataflashlog.xml" />
<File Id="_25" Source="..\bin\release\DirectShowLib-2005.dll" />
<File Id="_26" Source="..\bin\release\eeprom.bin" />
<File Id="_27" Source="..\bin\release\GMap.NET.Core.dll" />
<File Id="_28" Source="..\bin\release\GMap.NET.Core.pdb" />
<File Id="_29" Source="..\bin\release\GMap.NET.WindowsForms.dll" />
<File Id="_30" Source="..\bin\release\GMap.NET.WindowsForms.pdb" />
<File Id="_31" Source="..\bin\release\hud.html" />
<File Id="_32" Source="..\bin\release\ICSharpCode.SharpZipLib.dll" />
<File Id="_33" Source="..\bin\release\Ionic.Zip.Reduced.dll" />
<File Id="_34" Source="..\bin\release\IronPython.dll" />
<File Id="_35" Source="..\bin\release\IronPython.Modules.dll" />
<File Id="_36" Source="..\bin\release\JSBSim.exe" />
<File Id="_37" Source="..\bin\release\KMLib.dll" />
<File Id="_38" Source="..\bin\release\log4net.dll" />
<File Id="_39" Source="..\bin\release\mavcmd.xml" />
<File Id="_40" Source="..\bin\release\MAVLink.xml" />
<File Id="_41" Source="..\bin\release\MetaDataExtractor.dll" />
<File Id="_42" Source="..\bin\release\Microsoft.DirectX.DirectInput.dll" />
<File Id="_43" Source="..\bin\release\Microsoft.DirectX.dll" />
<File Id="_44" Source="..\bin\release\Microsoft.Dynamic.dll" />
<File Id="_45" Source="..\bin\release\Microsoft.Scripting.Core.dll" />
<File Id="_46" Source="..\bin\release\Microsoft.Scripting.Debugging.dll" />
<File Id="_47" Source="..\bin\release\Microsoft.Scripting.dll" />
<File Id="_48" Source="..\bin\release\Microsoft.Scripting.ExtensionAttribute.dll" />
<File Id="_49" Source="..\bin\release\netDxf.dll" />
<File Id="_50" Source="..\bin\release\OpenTK.Compatibility.dll" />
<File Id="_51" Source="..\bin\release\OpenTK.dll" />
<File Id="_52" Source="..\bin\release\OpenTK.dll.config" />
<File Id="_53" Source="..\bin\release\OpenTK.GLControl.dll" />
<File Id="_54" Source="..\bin\release\ParameterMetaData.xml" />
<File Id="_55" Source="..\bin\release\quadhil.xml" />
<File Id="_56" Source="..\bin\release\runme" />
<File Id="_57" Source="..\bin\release\SharpKml.dll" />
<File Id="_58" Source="..\bin\release\SharpKml.pdb" />
<File Id="_59" Source="..\bin\release\SharpKml.xml" />
<File Id="_60" Source="..\bin\release\System.Data.SQLite.dll" />
<File Id="_61" Source="..\bin\release\System.Reactive.dll" />
<File Id="_62" Source="..\bin\release\System.Reactive.xml" />
<File Id="_63" Source="..\bin\release\System.Speech.dll" />
<File Id="_64" Source="..\bin\release\Updater.exe" />
<File Id="_65" Source="..\bin\release\Updater.exe.config" />
<File Id="_66" Source="..\bin\release\Updater.pdb" />
<File Id="_67" Source="..\bin\release\version.exe" />
<File Id="_68" Source="..\bin\release\version.txt" />
<File Id="_69" Source="..\bin\release\ZedGraph.dll" />
<File Id="_17" Source="..\bin\release\ArdupilotMegaPlanner10.application" />
<File Id="_18" Source="..\bin\release\ArdupilotMegaPlanner10.exe" />
<File Id="_19" Source="..\bin\release\ArdupilotMegaPlanner10.exe.config" />
<File Id="_20" Source="..\bin\release\ArdupilotMegaPlanner10.exe.manifest" />
<File Id="_21" Source="..\bin\release\ArdupilotMegaPlanner10.pdb" />
<File Id="_22" Source="..\bin\release\block_plane_0.dae" />
<File Id="_23" Source="..\bin\release\BSE.Windows.Forms.dll" />
<File Id="_24" Source="..\bin\release\BSE.Windows.Forms.pdb" />
<File Id="_25" Source="..\bin\release\BSE.Windows.Forms.xml" />
<File Id="_26" Source="..\bin\release\Core.dll" />
<File Id="_27" Source="..\bin\release\dataflashlog.xml" />
<File Id="_28" Source="..\bin\release\DirectShowLib-2005.dll" />
<File Id="_29" Source="..\bin\release\eeprom.bin" />
<File Id="_30" Source="..\bin\release\GMap.NET.Core.dll" />
<File Id="_31" Source="..\bin\release\GMap.NET.Core.pdb" />
<File Id="_32" Source="..\bin\release\GMap.NET.WindowsForms.dll" />
<File Id="_33" Source="..\bin\release\GMap.NET.WindowsForms.pdb" />
<File Id="_34" Source="..\bin\release\hud.html" />
<File Id="_35" Source="..\bin\release\ICSharpCode.SharpZipLib.dll" />
<File Id="_36" Source="..\bin\release\Ionic.Zip.Reduced.dll" />
<File Id="_37" Source="..\bin\release\IronPython.dll" />
<File Id="_38" Source="..\bin\release\IronPython.Modules.dll" />
<File Id="_39" Source="..\bin\release\JSBSim.exe" />
<File Id="_40" Source="..\bin\release\KMLib.dll" />
<File Id="_41" Source="..\bin\release\log4net.dll" />
<File Id="_42" Source="..\bin\release\mavcmd.xml" />
<File Id="_43" Source="..\bin\release\MAVLink.xml" />
<File Id="_44" Source="..\bin\release\MetaDataExtractor.dll" />
<File Id="_45" Source="..\bin\release\Microsoft.DirectX.DirectInput.dll" />
<File Id="_46" Source="..\bin\release\Microsoft.DirectX.dll" />
<File Id="_47" Source="..\bin\release\Microsoft.Dynamic.dll" />
<File Id="_48" Source="..\bin\release\Microsoft.Scripting.Core.dll" />
<File Id="_49" Source="..\bin\release\Microsoft.Scripting.Debugging.dll" />
<File Id="_50" Source="..\bin\release\Microsoft.Scripting.dll" />
<File Id="_51" Source="..\bin\release\Microsoft.Scripting.ExtensionAttribute.dll" />
<File Id="_52" Source="..\bin\release\netDxf.dll" />
<File Id="_53" Source="..\bin\release\OpenTK.Compatibility.dll" />
<File Id="_54" Source="..\bin\release\OpenTK.dll" />
<File Id="_55" Source="..\bin\release\OpenTK.dll.config" />
<File Id="_56" Source="..\bin\release\OpenTK.GLControl.dll" />
<File Id="_57" Source="..\bin\release\ParameterMetaData.xml" />
<File Id="_58" Source="..\bin\release\quadhil.xml" />
<File Id="_59" Source="..\bin\release\runme" />
<File Id="_60" Source="..\bin\release\SharpKml.dll" />
<File Id="_61" Source="..\bin\release\SharpKml.pdb" />
<File Id="_62" Source="..\bin\release\SharpKml.xml" />
<File Id="_63" Source="..\bin\release\System.Data.SQLite.dll" />
<File Id="_64" Source="..\bin\release\System.Reactive.dll" />
<File Id="_65" Source="..\bin\release\System.Reactive.xml" />
<File Id="_66" Source="..\bin\release\System.Speech.dll" />
<File Id="_67" Source="..\bin\release\Updater.exe" />
<File Id="_68" Source="..\bin\release\Updater.exe.config" />
<File Id="_69" Source="..\bin\release\Updater.pdb" />
<File Id="_70" Source="..\bin\release\version.exe" />
<File Id="_71" Source="..\bin\release\version.txt" />
<File Id="_72" Source="..\bin\release\ZedGraph.dll" />
</Component>
<Directory Id="aircraft69" Name="aircraft">
<Component Id="_comp70" Guid="1407ca2e-1a81-44eb-bc4e-9195c9db71a5">
<File Id="_71" Source="..\bin\release\aircraft\placeholder.txt" />
<Directory Id="aircraft72" Name="aircraft">
<Component Id="_comp73" Guid="99d059ca-fa16-4a34-b168-eee253dd05cb">
<File Id="_74" Source="..\bin\release\aircraft\placeholder.txt" />
</Component>
<Directory Id="arducopter71" Name="arducopter">
<Component Id="_comp72" Guid="d1ee2488-270c-4cc1-a0f6-08367c78b09e">
<File Id="_73" Source="..\bin\release\aircraft\arducopter\arducopter-set.xml" />
<File Id="_74" Source="..\bin\release\aircraft\arducopter\arducopter.jpg" />
<File Id="_75" Source="..\bin\release\aircraft\arducopter\arducopter.xml" />
<File Id="_76" Source="..\bin\release\aircraft\arducopter\initfile.xml" />
<File Id="_77" Source="..\bin\release\aircraft\arducopter\plus_quad2-set.xml" />
<File Id="_78" Source="..\bin\release\aircraft\arducopter\plus_quad2.xml" />
<File Id="_79" Source="..\bin\release\aircraft\arducopter\quad.nas" />
<File Id="_80" Source="..\bin\release\aircraft\arducopter\README" />
<Directory Id="arducopter74" Name="arducopter">
<Component Id="_comp75" Guid="dec6420f-1730-4098-8a00-6c2c6c50c176">
<File Id="_76" Source="..\bin\release\aircraft\arducopter\arducopter-set.xml" />
<File Id="_77" Source="..\bin\release\aircraft\arducopter\arducopter.jpg" />
<File Id="_78" Source="..\bin\release\aircraft\arducopter\arducopter.xml" />
<File Id="_79" Source="..\bin\release\aircraft\arducopter\initfile.xml" />
<File Id="_80" Source="..\bin\release\aircraft\arducopter\plus_quad2-set.xml" />
<File Id="_81" Source="..\bin\release\aircraft\arducopter\plus_quad2.xml" />
<File Id="_82" Source="..\bin\release\aircraft\arducopter\quad.nas" />
<File Id="_83" Source="..\bin\release\aircraft\arducopter\README" />
</Component>
<Directory Id="data80" Name="data">
<Component Id="_comp81" Guid="e42d6cbe-7cce-4e33-bb9d-ffe315ce0b93">
<File Id="_82" Source="..\bin\release\aircraft\arducopter\data\arducopter_half_step.txt" />
<File Id="_83" Source="..\bin\release\aircraft\arducopter\data\arducopter_step.txt" />
<File Id="_84" Source="..\bin\release\aircraft\arducopter\data\rw_generic_pylon.ac" />
<Directory Id="data83" Name="data">
<Component Id="_comp84" Guid="b73f95ee-2ae5-4ca7-b2a6-bb946632a27f">
<File Id="_85" Source="..\bin\release\aircraft\arducopter\data\arducopter_half_step.txt" />
<File Id="_86" Source="..\bin\release\aircraft\arducopter\data\arducopter_step.txt" />
<File Id="_87" Source="..\bin\release\aircraft\arducopter\data\rw_generic_pylon.ac" />
</Component>
</Directory>
<Directory Id="Engines84" Name="Engines">
<Component Id="_comp85" Guid="910f8c0c-aa7c-4c8a-b927-3993a8e8e3f5">
<File Id="_86" Source="..\bin\release\aircraft\arducopter\Engines\a2830-12.xml" />
<File Id="_87" Source="..\bin\release\aircraft\arducopter\Engines\prop10x4.5.xml" />
<Directory Id="Engines87" Name="Engines">
<Component Id="_comp88" Guid="7ee46f7c-6ee3-4fb8-8cce-32b00949ccad">
<File Id="_89" Source="..\bin\release\aircraft\arducopter\Engines\a2830-12.xml" />
<File Id="_90" Source="..\bin\release\aircraft\arducopter\Engines\prop10x4.5.xml" />
</Component>
</Directory>
<Directory Id="Models87" Name="Models">
<Component Id="_comp88" Guid="6b51d578-b057-4aa2-93ec-a89203ac6f34">
<File Id="_89" Source="..\bin\release\aircraft\arducopter\Models\arducopter.ac" />
<File Id="_90" Source="..\bin\release\aircraft\arducopter\Models\arducopter.xml" />
<File Id="_91" Source="..\bin\release\aircraft\arducopter\Models\plus_quad.ac" />
<File Id="_92" Source="..\bin\release\aircraft\arducopter\Models\plus_quad2.ac" />
<File Id="_93" Source="..\bin\release\aircraft\arducopter\Models\plus_quad2.xml" />
<File Id="_94" Source="..\bin\release\aircraft\arducopter\Models\quad.3ds" />
<File Id="_95" Source="..\bin\release\aircraft\arducopter\Models\shareware_output.3ds" />
<File Id="_96" Source="..\bin\release\aircraft\arducopter\Models\Untitled.ac" />
<File Id="_97" Source="..\bin\release\aircraft\arducopter\Models\Y6_test.ac" />
<Directory Id="Models90" Name="Models">
<Component Id="_comp91" Guid="f0c2bffe-1711-49b0-8138-aa3c7140b1d5">
<File Id="_92" Source="..\bin\release\aircraft\arducopter\Models\arducopter.ac" />
<File Id="_93" Source="..\bin\release\aircraft\arducopter\Models\arducopter.xml" />
<File Id="_94" Source="..\bin\release\aircraft\arducopter\Models\plus_quad.ac" />
<File Id="_95" Source="..\bin\release\aircraft\arducopter\Models\plus_quad2.ac" />
<File Id="_96" Source="..\bin\release\aircraft\arducopter\Models\plus_quad2.xml" />
<File Id="_97" Source="..\bin\release\aircraft\arducopter\Models\quad.3ds" />
<File Id="_98" Source="..\bin\release\aircraft\arducopter\Models\shareware_output.3ds" />
<File Id="_99" Source="..\bin\release\aircraft\arducopter\Models\Untitled.ac" />
<File Id="_100" Source="..\bin\release\aircraft\arducopter\Models\Y6_test.ac" />
</Component>
</Directory>
</Directory>
<Directory Id="Rascal97" Name="Rascal">
<Component Id="_comp98" Guid="c6535718-d88e-4652-8d64-27d754a30fd3">
<File Id="_99" Source="..\bin\release\aircraft\Rascal\Rascal-keyboard.xml" />
<File Id="_100" Source="..\bin\release\aircraft\Rascal\Rascal-submodels.xml" />
<File Id="_101" Source="..\bin\release\aircraft\Rascal\Rascal.xml" />
<File Id="_102" Source="..\bin\release\aircraft\Rascal\Rascal110-JSBSim-set.xml" />
<File Id="_103" Source="..\bin\release\aircraft\Rascal\Rascal110-JSBSim.xml" />
<File Id="_104" Source="..\bin\release\aircraft\Rascal\Rascal110-splash.rgb" />
<File Id="_105" Source="..\bin\release\aircraft\Rascal\README.Rascal" />
<File Id="_106" Source="..\bin\release\aircraft\Rascal\reset_CMAC.xml" />
<File Id="_107" Source="..\bin\release\aircraft\Rascal\thumbnail.jpg" />
<Directory Id="Rascal100" Name="Rascal">
<Component Id="_comp101" Guid="615c6b7f-f8aa-4960-a596-49357da8741b">
<File Id="_102" Source="..\bin\release\aircraft\Rascal\Rascal-keyboard.xml" />
<File Id="_103" Source="..\bin\release\aircraft\Rascal\Rascal-submodels.xml" />
<File Id="_104" Source="..\bin\release\aircraft\Rascal\Rascal.xml" />
<File Id="_105" Source="..\bin\release\aircraft\Rascal\Rascal110-JSBSim-set.xml" />
<File Id="_106" Source="..\bin\release\aircraft\Rascal\Rascal110-JSBSim.xml" />
<File Id="_107" Source="..\bin\release\aircraft\Rascal\Rascal110-splash.rgb" />
<File Id="_108" Source="..\bin\release\aircraft\Rascal\README.Rascal" />
<File Id="_109" Source="..\bin\release\aircraft\Rascal\reset_CMAC.xml" />
<File Id="_110" Source="..\bin\release\aircraft\Rascal\thumbnail.jpg" />
</Component>
<Directory Id="Engines107" Name="Engines">
<Component Id="_comp108" Guid="7bf37524-009b-4060-9189-77d4115e0c13">
<File Id="_109" Source="..\bin\release\aircraft\Rascal\Engines\18x8.xml" />
<File Id="_110" Source="..\bin\release\aircraft\Rascal\Engines\Zenoah_G-26A.xml" />
<Directory Id="Engines110" Name="Engines">
<Component Id="_comp111" Guid="6fb8b91b-105b-415d-acde-93b8b280d800">
<File Id="_112" Source="..\bin\release\aircraft\Rascal\Engines\18x8.xml" />
<File Id="_113" Source="..\bin\release\aircraft\Rascal\Engines\Zenoah_G-26A.xml" />
</Component>
</Directory>
<Directory Id="Models110" Name="Models">
<Component Id="_comp111" Guid="1cd03e13-5eca-48ee-b382-b65b5804852a">
<File Id="_112" Source="..\bin\release\aircraft\Rascal\Models\Rascal.rgb" />
<File Id="_113" Source="..\bin\release\aircraft\Rascal\Models\Rascal110-000-013.ac" />
<File Id="_114" Source="..\bin\release\aircraft\Rascal\Models\Rascal110.xml" />
<File Id="_115" Source="..\bin\release\aircraft\Rascal\Models\smoke.png" />
<File Id="_116" Source="..\bin\release\aircraft\Rascal\Models\smokeW.xml" />
<File Id="_117" Source="..\bin\release\aircraft\Rascal\Models\Trajectory-Marker.ac" />
<File Id="_118" Source="..\bin\release\aircraft\Rascal\Models\Trajectory-Marker.xml" />
<Directory Id="Models113" Name="Models">
<Component Id="_comp114" Guid="f5cebabf-1c5d-455c-8dbd-1ad9f658e81f">
<File Id="_115" Source="..\bin\release\aircraft\Rascal\Models\Rascal.rgb" />
<File Id="_116" Source="..\bin\release\aircraft\Rascal\Models\Rascal110-000-013.ac" />
<File Id="_117" Source="..\bin\release\aircraft\Rascal\Models\Rascal110.xml" />
<File Id="_118" Source="..\bin\release\aircraft\Rascal\Models\smoke.png" />
<File Id="_119" Source="..\bin\release\aircraft\Rascal\Models\smokeW.xml" />
<File Id="_120" Source="..\bin\release\aircraft\Rascal\Models\Trajectory-Marker.ac" />
<File Id="_121" Source="..\bin\release\aircraft\Rascal\Models\Trajectory-Marker.xml" />
</Component>
</Directory>
<Directory Id="Systems118" Name="Systems">
<Component Id="_comp119" Guid="762a9e17-db9b-450f-ab4e-38a57b39b9d6">
<File Id="_120" Source="..\bin\release\aircraft\Rascal\Systems\110-autopilot.xml" />
<File Id="_121" Source="..\bin\release\aircraft\Rascal\Systems\airdata.nas" />
<File Id="_122" Source="..\bin\release\aircraft\Rascal\Systems\electrical.xml" />
<File Id="_123" Source="..\bin\release\aircraft\Rascal\Systems\main.nas" />
<File Id="_124" Source="..\bin\release\aircraft\Rascal\Systems\ugear.nas" />
<Directory Id="Systems121" Name="Systems">
<Component Id="_comp122" Guid="6c6b3b7b-6047-4b93-812f-ce9fd0e4f5a0">
<File Id="_123" Source="..\bin\release\aircraft\Rascal\Systems\110-autopilot.xml" />
<File Id="_124" Source="..\bin\release\aircraft\Rascal\Systems\airdata.nas" />
<File Id="_125" Source="..\bin\release\aircraft\Rascal\Systems\electrical.xml" />
<File Id="_126" Source="..\bin\release\aircraft\Rascal\Systems\main.nas" />
<File Id="_127" Source="..\bin\release\aircraft\Rascal\Systems\ugear.nas" />
</Component>
</Directory>
</Directory>
</Directory>
<Directory Id="Driver124" Name="Driver">
<Component Id="_comp125" Guid="6f12a3be-958b-499f-852c-ae40e75604ce">
<File Id="_126" Source="..\bin\release\Driver\Arduino MEGA 2560.inf" />
<Directory Id="Driver127" Name="Driver">
<Component Id="_comp128" Guid="12ce9c0e-c6fb-4c12-ae36-61814cfce607">
<File Id="_129" Source="..\bin\release\Driver\Arduino MEGA 2560.inf" />
</Component>
</Directory>
<Directory Id="es_ES126" Name="es-ES">
<Component Id="_comp127" Guid="0788bdad-9d40-42cd-aa75-6e3b571961ef">
<File Id="_128" Source="..\bin\release\es-ES\ArdupilotMegaPlanner.resources.dll" />
<Directory Id="es_ES129" Name="es-ES">
<Component Id="_comp130" Guid="01265ed4-7b14-406d-b236-1020b407a26b">
<File Id="_131" Source="..\bin\release\es-ES\ArdupilotMegaPlanner10.resources.dll" />
</Component>
</Directory>
<Directory Id="fr128" Name="fr">
<Component Id="_comp129" Guid="ffd2f6eb-458f-4fa6-b70b-c4d86bc4768f">
<File Id="_130" Source="..\bin\release\fr\ArdupilotMegaPlanner.resources.dll" />
<Directory Id="fr131" Name="fr">
<Component Id="_comp132" Guid="5bb76b0c-070c-44b5-b28a-1017cc93db61">
<File Id="_133" Source="..\bin\release\fr\ArdupilotMegaPlanner10.resources.dll" />
</Component>
</Directory>
<Directory Id="it_IT130" Name="it-IT">
<Component Id="_comp131" Guid="a6cf3ce7-b5af-4d23-bba2-9ad2bd3a7ad4">
<File Id="_132" Source="..\bin\release\it-IT\ArdupilotMegaPlanner.resources.dll" />
<Directory Id="it_IT133" Name="it-IT">
<Component Id="_comp134" Guid="f036c3d7-fe2a-4e54-af83-bdaff26dc9c7">
<File Id="_135" Source="..\bin\release\it-IT\ArdupilotMegaPlanner10.resources.dll" />
</Component>
</Directory>
<Directory Id="jsbsim132" Name="jsbsim">
<Component Id="_comp133" Guid="2759b623-0a72-41aa-9988-33e98be80b76">
<File Id="_134" Source="..\bin\release\jsbsim\fgout.xml" />
<File Id="_135" Source="..\bin\release\jsbsim\rascal_test.xml" />
<Directory Id="jsbsim135" Name="jsbsim">
<Component Id="_comp136" Guid="83d2b000-4515-45a8-a014-9263d493d771">
<File Id="_137" Source="..\bin\release\jsbsim\fgout.xml" />
<File Id="_138" Source="..\bin\release\jsbsim\rascal_test.xml" />
</Component>
</Directory>
<Directory Id="m3u135" Name="m3u">
<Component Id="_comp136" Guid="2b82d1da-0794-45d9-ad4c-101d8876d4bb">
<File Id="_137" Source="..\bin\release\m3u\both.m3u" />
<File Id="_138" Source="..\bin\release\m3u\GeoRefnetworklink.kml" />
<File Id="_139" Source="..\bin\release\m3u\hud.m3u" />
<File Id="_140" Source="..\bin\release\m3u\map.m3u" />
<File Id="_141" Source="..\bin\release\m3u\networklink.kml" />
<Directory Id="m3u138" Name="m3u">
<Component Id="_comp139" Guid="d1f10ef1-a76c-4aa7-adf9-40806fb39bda">
<File Id="_140" Source="..\bin\release\m3u\both.m3u" />
<File Id="_141" Source="..\bin\release\m3u\GeoRefnetworklink.kml" />
<File Id="_142" Source="..\bin\release\m3u\hud.m3u" />
<File Id="_143" Source="..\bin\release\m3u\map.m3u" />
<File Id="_144" Source="..\bin\release\m3u\networklink.kml" />
</Component>
</Directory>
<Directory Id="pl141" Name="pl">
<Component Id="_comp142" Guid="b8deb376-d000-4b1f-a20e-619c2122a084">
<File Id="_143" Source="..\bin\release\pl\ArdupilotMegaPlanner.resources.dll" />
<Directory Id="pl144" Name="pl">
<Component Id="_comp145" Guid="d8a89eb1-82e9-48ec-b72b-4a2a772d94bc">
<File Id="_146" Source="..\bin\release\pl\ArdupilotMegaPlanner10.resources.dll" />
</Component>
</Directory>
<Directory Id="Resources143" Name="Resources">
<Component Id="_comp144" Guid="df3a70ae-a508-4ea7-b96b-c9eab52dc152">
<File Id="_145" Source="..\bin\release\Resources\MAVCmd.txt" />
<File Id="_146" Source="..\bin\release\Resources\Welcome_to_Michael_Oborne.rtf" />
<Directory Id="Resources146" Name="Resources">
<Component Id="_comp147" Guid="35eaf355-814a-44a7-9721-46de0a3d4ead">
<File Id="_148" Source="..\bin\release\Resources\MAVCmd.txt" />
<File Id="_149" Source="..\bin\release\Resources\Welcome_to_Michael_Oborne.rtf" />
</Component>
</Directory>
<Directory Id="ru_RU146" Name="ru-RU">
<Component Id="_comp147" Guid="aed3fa93-2191-42a4-9bd6-df0ea166c9bb">
<File Id="_148" Source="..\bin\release\ru-RU\ArdupilotMegaPlanner.resources.dll" />
<Directory Id="ru_RU149" Name="ru-RU">
<Component Id="_comp150" Guid="a6364b29-52a2-401e-ac6e-be439a38b196">
<File Id="_151" Source="..\bin\release\ru-RU\ArdupilotMegaPlanner10.resources.dll" />
</Component>
</Directory>
<Directory Id="zh_Hans148" Name="zh-Hans">
<Component Id="_comp149" Guid="56d74fe2-41f0-453c-a4b5-fec2025d5f2b">
<File Id="_150" Source="..\bin\release\zh-Hans\ArdupilotMegaPlanner.resources.dll" />
<Directory Id="zh_Hans151" Name="zh-Hans">
<Component Id="_comp152" Guid="c0c3c964-13c5-4908-8014-625313f016bb">
<File Id="_153" Source="..\bin\release\zh-Hans\ArdupilotMegaPlanner10.resources.dll" />
</Component>
</Directory>
<Directory Id="zh_TW150" Name="zh-TW">
<Component Id="_comp151" Guid="ef35d50e-a6c9-466b-9fe3-687a3338a1af">
<File Id="_152" Source="..\bin\release\zh-TW\ArdupilotMegaPlanner.resources.dll" />
<Directory Id="zh_TW153" Name="zh-TW">
<Component Id="_comp154" Guid="3e391954-f83a-45bf-975c-ee56d8dd3c11">
<File Id="_155" Source="..\bin\release\zh-TW\ArdupilotMegaPlanner10.resources.dll" />
</Component>
</Directory>
@ -285,26 +288,26 @@
<ComponentRef Id="InstallDirPermissions" />
<ComponentRef Id="_comp1" />
<ComponentRef Id="_comp70" />
<ComponentRef Id="_comp72" />
<ComponentRef Id="_comp81" />
<ComponentRef Id="_comp85" />
<ComponentRef Id="_comp73" />
<ComponentRef Id="_comp75" />
<ComponentRef Id="_comp84" />
<ComponentRef Id="_comp88" />
<ComponentRef Id="_comp98" />
<ComponentRef Id="_comp108" />
<ComponentRef Id="_comp91" />
<ComponentRef Id="_comp101" />
<ComponentRef Id="_comp111" />
<ComponentRef Id="_comp119" />
<ComponentRef Id="_comp125" />
<ComponentRef Id="_comp127" />
<ComponentRef Id="_comp129" />
<ComponentRef Id="_comp131" />
<ComponentRef Id="_comp133" />
<ComponentRef Id="_comp114" />
<ComponentRef Id="_comp122" />
<ComponentRef Id="_comp128" />
<ComponentRef Id="_comp130" />
<ComponentRef Id="_comp132" />
<ComponentRef Id="_comp134" />
<ComponentRef Id="_comp136" />
<ComponentRef Id="_comp142" />
<ComponentRef Id="_comp144" />
<ComponentRef Id="_comp139" />
<ComponentRef Id="_comp145" />
<ComponentRef Id="_comp147" />
<ComponentRef Id="_comp149" />
<ComponentRef Id="_comp151" />
<ComponentRef Id="_comp150" />
<ComponentRef Id="_comp152" />
<ComponentRef Id="_comp154" />
<ComponentRef Id="ApplicationShortcut" />

View File

@ -0,0 +1,367 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reactive.Subjects;
using System.Reflection;
using log4net;
namespace ArdupilotMega.Presenter
{
public class ConfigCameraStabPresenter : INotifyPropertyChanged, IDataErrorInfo
{
private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// These are lightweight PropertyMetaData objects, just so that populating defaults
// and saving etc can be done programatically, rather than explicitely
// This is starting to step on the toes of PropertyDescriptor etc in System.Componentmodel,
// however I wanted to keep 'normal' CLR properties here for testability, and more certain Mono
// compatibility
private readonly List<PropertyMap> _propertyMap = new List<PropertyMap>
{
PropertyMap.Create<int>("CameraPitchMin", "CAM_P_MIN", 1000),
PropertyMap.Create<int>("CameraPitchMax", "CAM_P_MAX", 2000),
PropertyMap.Create<int>("CameraPitchTrim", "CAM_P_TRIM", 1500),
PropertyMap.Create<bool>("CameraPitchReverse", "CAM_P_REV", false),
PropertyMap.Create<float>("CameraPitchGain", "CAM_P_G", 1.0F),
PropertyMap.Create<int>("CameraRollMin", "CAM_R_MIN", 1000),
PropertyMap.Create<int>("CameraRollMax", "CAM_R_MAX", 2000),
PropertyMap.Create<int>("CameraRollTrim", "CAM_R_TRIM", 1500),
PropertyMap.Create<bool>("CameraRollReverse", "CAM_R_REV", false),
PropertyMap.Create<float>("CameraRollGain", "CAM_R_G", 1.0F),
};
private CameraAxisProperties _pitchAxis;
private CameraAxisProperties _rollAxis;
private readonly IMAVLink _mavlink;
private readonly Dictionary<string, string> _errors;
public ConfigCameraStabPresenter(IMAVLink mavlink)
{
_mavlink = mavlink;
_errors = new Dictionary<string, string>();
RefreshValuesCommand = new DelegateCommand(_ => GetCameraStabVals());
WriteValuesCommand = new DelegateCommand(_ => WriteValues());
SetDefaultsCommand = new DelegateCommand(_ => SetDefaults());
// Todo change to load params once finished
SetDefaults();
}
public event PropertyChangedEventHandler PropertyChanged;
public ICommand SetDefaultsCommand { get; private set; }
/// <summary>
/// Try to write the cam stab values to the apm
/// </summary>
public ICommand WriteValuesCommand { get; private set; }
/// <summary>
/// Re-Fetch the cam stab values from teh apm
/// </summary>
public ICommand RefreshValuesCommand { get; private set; }
#region publicBindableProperties
/// <summary>
/// Pitch The lowest PWM
/// </summary>
public int CameraPitchMin
{
get { return _pitchAxis.Min; }
set
{
if (_pitchAxis.Min == value) return;
_pitchAxis.Min = value;
RaisePropertyChanged("CameraPitchMin");
}
}
/// <summary>
/// Pitch The highest PWM
/// </summary>
public int CameraPitchMax
{
get { return _pitchAxis.Max; }
set
{
if (_pitchAxis.Max == value) return;
_pitchAxis.Max = value;
RaisePropertyChanged("CameraPitchMax");
}
}
public int CameraPitchTrim
{
get { return _pitchAxis.Trim; }
set
{
if (_pitchAxis.Trim == value) return;
_pitchAxis.Trim = value;
RaisePropertyChanged("CameraPitchTrim");
}
}
/// <summary>
/// Set higher or lower to scale the travel of the servo
/// </summary>
public float CameraPitchGain
{
get { return _pitchAxis.Gain; }
set
{
if (_pitchAxis.Gain == value) return;
_pitchAxis.Gain = value;
RaisePropertyChanged("CameraPitchGain");
}
}
public bool CameraPitchReverse
{
get { return _pitchAxis.Reverse; }
set
{
if (_pitchAxis.Reverse == value) return;
_pitchAxis.Reverse = value;
RaisePropertyChanged("CameraPitchReverse");
}
}
/// <summary>
/// Roll The lowest PWM
/// </summary>
public int CameraRollMin
{
get { return _rollAxis.Min; }
set
{
if (_rollAxis.Min == value) return;
_rollAxis.Min = value;
RaisePropertyChanged("CameraRollMin");
}
}
/// <summary>
/// Roll The highest PWM
/// </summary>
public int CameraRollMax
{
get { return _rollAxis.Max; }
set
{
if (_rollAxis.Max == value) return;
_rollAxis.Max = value;
RaisePropertyChanged("CameraRollMax");
}
}
public int CameraRollTrim
{
get { return _rollAxis.Trim; }
set
{
if (_rollAxis.Trim == value) return;
_rollAxis.Trim= value;
RaisePropertyChanged("CameraRollTrim");
}
}
/// <summary>
/// Set higher or lower to scale the travel of the servo
/// </summary>
public float CameraRollGain
{
get { return _rollAxis.Gain; }
set
{
if (_rollAxis.Gain == value) return;
_rollAxis.Gain = value;
RaisePropertyChanged("CameraRollGain");
}
}
public bool CameraRollReverse
{
get { return _rollAxis.Reverse; }
set
{
if (_rollAxis.Reverse == value) return;
_rollAxis.Reverse = value;
RaisePropertyChanged("CameraRollReverse");
}
}
private bool hasError;
public bool HasError
{
get { return hasError; }
set
{
if (hasError == value) return;
hasError = value;
RaisePropertyChanged("HasError", false);
}
}
#endregion
private void GetCameraStabVals()
{
foreach (var p in _propertyMap)
{
var pinfo = GetType().GetProperty(p.PresenterPropertyName);
var paramVal = GetParam(p.ApmPropertyName, p.PropertyType);
pinfo.SetValue(this, paramVal, null);
}
}
private void SetDefaults()
{
_propertyMap.ForEach(p => GetType().GetProperty(p.PresenterPropertyName).SetValue(this, p.DefaultValue, null));
}
private void WriteValues()
{
foreach (var p in _propertyMap)
{
var pinfo = GetType().GetProperty(p.PresenterPropertyName);
var val = pinfo.GetValue(this, null);
try
{
// handle boolean
if (val.GetType() == typeof(Boolean))
{
if (!_mavlink.setParam(p.ApmPropertyName, ((Boolean)val) ? 1 : 0))
log.Error("Error setting Camstab parameter");
}
else
{
if (!_mavlink.setParam(p.ApmPropertyName, float.Parse(val.ToString())))
log.Error("Error setting Camstab parameter");
}
}
catch (Exception e)
{
log.Error("Error setting Camstab parameter", e);
}
}
}
private object GetParam(string paramName, Type paramType)
{
if (_mavlink.param.ContainsKey(paramName))
{
return paramType == typeof (bool)
? _mavlink.param[paramName].ToString() == "1"
: Convert.ChangeType(_mavlink.param[paramName].ToString(), paramType);
}
log.ErrorFormat("Could not get param {0}", paramName);
return null;
}
public void Load()
{
RefreshValuesCommand.Execute(null);
}
private void RaisePropertyChanged(string propName, bool shouldValidate = true)
{
if (shouldValidate)
ValidatePropertyValues();
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propName));
}
}
private void ValidatePropertyValues()
{
var errCount = _errors.Count;
_errors.Clear();
if (CameraPitchMax < CameraPitchMin)
{
_errors["CameraPitchMax"] = "Max should be > Min";
_errors["CameraPitchMin"] = "Max should be > Min";
}
if ((CameraPitchTrim < CameraPitchMin) || (CameraPitchTrim > CameraPitchMax))
{
_errors["CameraPitchTrim"] = "Trim should be between Min and Max";
}
if (CameraRollMax < CameraRollMin)
{
_errors["CameraRollMax"] = "Max should be > Min";
_errors["CameraRollMin"] = "Max should be > Min";
}
if ((CameraRollTrim < CameraRollMin) || (CameraRollTrim > CameraRollMax))
{
_errors["CameraRollTrim"] = "Trim should be between Min and Max";
}
if (_errors.Count != errCount)
{
this.RaisePropertyChanged("Error", false);
}
HasError = _errors.Count > 0;
}
public string this[string columnName]
{
get { return _errors.ContainsKey(columnName) ? _errors[columnName] : null; }
}
public string Error
{
get { return _errors.Values.FirstOrDefault(); }
}
private struct CameraAxisProperties
{
public int Min;
public int Max;
public int Trim;
public float Gain;
public bool Reverse;
}
private struct PropertyMap
{
public string PresenterPropertyName;
public string ApmPropertyName;
public Type PropertyType;
public object DefaultValue;
public static PropertyMap Create<T>(string presenterPropertyName, string apmPropertyName, object defaultVal)
{
return new PropertyMap
{
PresenterPropertyName = presenterPropertyName,
ApmPropertyName = apmPropertyName,
PropertyType = typeof(T),
DefaultValue = defaultVal
};
}
}
}
}

View File

@ -0,0 +1,61 @@
using System;
namespace ArdupilotMega.Presenter
{
/// <summary>
/// A command that executes delegates to determine whether the command can execute, and to execute the command.
/// </summary>
/// <remarks>
/// <para>
/// This command implementation is useful when the command simply needs to execute a method on a view model. The delegate for
/// determining whether the command can execute is optional. If it is not provided, the command is considered always eligible
/// to execute.
/// </para>
/// </remarks>
public class DelegateCommand : ICommand
{
private readonly Predicate<object> _canExecute;
private readonly Action<object> _execute;
public DelegateCommand(Action<object> execute)
{
_execute = execute;
}
/// <summary>
/// Constructs an instance of <c>DelegateCommand</c>.
/// </summary>
/// <param name="execute">
/// The delegate to invoke when the command is executed.
/// </param>
/// <param name="canExecute">
/// The delegate to invoke to determine whether the command can execute.
/// </param>
public DelegateCommand(Action<object> execute, Predicate<object> canExecute)
{
_execute = execute;
_canExecute = canExecute;
}
/// <summary>
/// Determines whether this command can execute.
/// </summary>
public bool CanExecute(object parameter)
{
if (_canExecute == null)
{
return true;
}
return _canExecute(parameter);
}
/// <summary>
/// Executes this command.
/// </summary>
public void Execute(object parameter)
{
_execute(parameter);
}
}
}

View File

@ -0,0 +1,8 @@
namespace ArdupilotMega.Presenter
{
public interface ICommand
{
void Execute(object param);
bool CanExecute(object param);
}
}

View File

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

View File

@ -109,6 +109,18 @@ namespace ArdupilotMega.Properties {
}
}
public static System.Drawing.Bitmap cameraGimalPitch1 {
get {
object obj = ResourceManager.GetObject("cameraGimalPitch1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap cameraGimalRoll1 {
get {
object obj = ResourceManager.GetObject("cameraGimalRoll1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
public static System.Drawing.Bitmap compass {
get {
object obj = ResourceManager.GetObject("compass", resourceCulture);

View File

@ -1234,4 +1234,11 @@
<data name="rover" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\car.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="cameraGimalPitch1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cameraGimalPitch1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="cameraGimalRoll1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cameraGimalRoll1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -54,25 +54,29 @@ namespace ArdupilotMega.Utilities
{
if (MONO)
{
//if (_speechlinux == null)
try
{
//if (_speechlinux == null)
{
_state = SynthesizerState.Speaking;
_speechlinux = new System.Diagnostics.Process();
_speechlinux.StartInfo.RedirectStandardInput = true;
_speechlinux.StartInfo.UseShellExecute = false;
_speechlinux.StartInfo.FileName = "festival";
_speechlinux.Start();
_speechlinux.Exited += new EventHandler(_speechlinux_Exited);
log.Info("TTS: start " + _speechlinux.StartTime);
}
_state = SynthesizerState.Speaking;
_speechlinux = new System.Diagnostics.Process();
_speechlinux.StartInfo.RedirectStandardInput = true;
_speechlinux.StartInfo.UseShellExecute = false;
_speechlinux.StartInfo.FileName = "festival";
_speechlinux.Start();
_speechlinux.Exited += new EventHandler(_speechlinux_Exited);
log.Info("TTS: start " + _speechlinux.StartTime);
_speechlinux.StandardInput.WriteLine("(SayText \"" + text + "\")");
_speechlinux.StandardInput.WriteLine("(quit)");
_speechlinux.Close();
}
_state = SynthesizerState.Speaking;
_speechlinux.StandardInput.WriteLine("(SayText \"" + text + "\")");
_speechlinux.StandardInput.WriteLine("(quit)");
_speechlinux.Close();
catch { } // ignore errors
_state = SynthesizerState.Ready;
}

View File

@ -23,10 +23,6 @@ namespace ArdupilotMega
{
public partial class temp : Form
{
[DllImport("DIFXApi.dll", CharSet = CharSet.Unicode)]
public static extern Int32 DriverPackagePreinstall(string DriverPackageInfPath, Int32 Flags);
private static readonly ILog log =
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public temp()
@ -908,13 +904,5 @@ namespace ArdupilotMega
{
MagCalib.ProcessLog();
}
void driverinstall()
{
int result = DriverPackagePreinstall(@"\Driver\XYZ.inf", 0);
if (result != 0)
MessageBox.Show("Driver installation failed.");
}
}
}

View File

@ -112,7 +112,7 @@ namespace wix
*/
//Console.ReadLine();
string exepath = Path.GetFullPath(path) + Path.DirectorySeparatorChar + "ArdupilotMegaPlanner.exe";
string exepath = Path.GetFullPath(path) + Path.DirectorySeparatorChar + "ArdupilotMegaPlanner10.exe";
string version = Assembly.LoadFile(exepath).GetName().Version.ToString();
System.Diagnostics.FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(exepath);