mirror of https://github.com/ArduPilot/ardupilot
Configurator.Net: Tx calibration changes
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1711 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
3121f943c0
commit
50e427fa95
|
@ -20,9 +20,45 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
PropsInUpdateOrder = new[] {"P", "I", "D",};
|
||||
}
|
||||
|
||||
public float P { get; set; }
|
||||
public float I { get; set; }
|
||||
public float D { get; set; }
|
||||
|
||||
private float _p;
|
||||
public float P
|
||||
{
|
||||
get { return _p; }
|
||||
set
|
||||
{
|
||||
if (_p == value) return;
|
||||
_p = value;
|
||||
FirePropertyChanged("P");
|
||||
}
|
||||
}
|
||||
|
||||
private float _i;
|
||||
|
||||
public float I
|
||||
{
|
||||
get { return _i; }
|
||||
set
|
||||
{
|
||||
if (_i == value) return;
|
||||
_i = value;
|
||||
FirePropertyChanged("I");
|
||||
}
|
||||
}
|
||||
|
||||
private float _d;
|
||||
|
||||
public float D
|
||||
{
|
||||
get { return _d; }
|
||||
set
|
||||
{
|
||||
if (_d == value) return;
|
||||
_d = value;
|
||||
FirePropertyChanged("D");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override string Name
|
||||
{
|
||||
|
|
|
@ -19,7 +19,6 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
get { return _isCalibrating; }
|
||||
set
|
||||
{
|
||||
if (_isCalibrating == value) return;
|
||||
_isCalibrating = value;
|
||||
FirePropertyChanged("IsCalibrating");
|
||||
}
|
||||
|
@ -129,11 +128,11 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
);
|
||||
|
||||
|
||||
|
||||
|
||||
sendString("1" + vals);
|
||||
|
||||
IsCalibrating = false;
|
||||
HideWatermarks();
|
||||
|
||||
// save
|
||||
//sendString(WRITE_TO_EEPROM);
|
||||
}
|
||||
|
@ -176,6 +175,7 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
public void Activate()
|
||||
{
|
||||
IsCalibrating = false;
|
||||
HideWatermarks();
|
||||
sendString(START_UPDATES);
|
||||
}
|
||||
|
||||
|
@ -204,6 +204,8 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
if (_roll == value) return;
|
||||
_roll = value;
|
||||
FirePropertyChanged("Roll");
|
||||
if (!_isCalibrating) return;
|
||||
|
||||
if (value > RollMax)
|
||||
RollMax = value;
|
||||
if (value < RollMin)
|
||||
|
@ -244,6 +246,8 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
if (_pitch == value) return;
|
||||
_pitch = value;
|
||||
FirePropertyChanged("Pitch");
|
||||
if (!_isCalibrating) return;
|
||||
|
||||
if (value > PitchMax)
|
||||
PitchMax = value;
|
||||
if (value < PitchMin)
|
||||
|
@ -264,7 +268,6 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
}
|
||||
|
||||
private int _pitchMin;
|
||||
|
||||
public int PitchMin
|
||||
{
|
||||
get { return _pitchMin; }
|
||||
|
@ -286,6 +289,8 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
if (_yaw == value) return;
|
||||
_yaw = value;
|
||||
FirePropertyChanged("Yaw");
|
||||
if (!_isCalibrating) return;
|
||||
|
||||
if (value > YawMax)
|
||||
YawMax = value;
|
||||
if (value < YawMin)
|
||||
|
@ -326,6 +331,7 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
if (_throttle == value) return;
|
||||
_throttle = value;
|
||||
FirePropertyChanged("Throttle");
|
||||
if (!_isCalibrating) return;
|
||||
if (value > ThrottleMax)
|
||||
ThrottleMax = value;
|
||||
if (value < ThrottleMin)
|
||||
|
@ -366,6 +372,7 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
if (_mode == value) return;
|
||||
_mode = value;
|
||||
FirePropertyChanged("Mode");
|
||||
if (!_isCalibrating) return;
|
||||
if (value > ModeMax)
|
||||
ModeMax = value;
|
||||
if (value < ModeMin)
|
||||
|
@ -406,6 +413,8 @@ namespace ArducopterConfigurator.PresentationModels
|
|||
if (_aux == value) return;
|
||||
_aux = value;
|
||||
FirePropertyChanged("Aux");
|
||||
if (!_isCalibrating) return;
|
||||
|
||||
if (value > AuxMax)
|
||||
AuxMax = value;
|
||||
if (value < AuxMin)
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace ArducopterConfigurator
|
|||
var t = Type.GetType("Mono.Runtime");
|
||||
IsMonoRuntime = (t != null);
|
||||
|
||||
//var session = new CommsSession();
|
||||
var session = new FakeCommsSession();
|
||||
var session = new CommsSession();
|
||||
//var session = new FakeCommsSession();
|
||||
|
||||
|
||||
var mainVm = new MainVm(session);
|
||||
|
|
|
@ -90,12 +90,13 @@
|
|||
//
|
||||
// textBox6
|
||||
//
|
||||
this.textBox6.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Yaw", true));
|
||||
this.textBox6.Enabled = false;
|
||||
this.textBox6.Location = new System.Drawing.Point(206, 26);
|
||||
this.textBox6.Name = "textBox6";
|
||||
this.textBox6.ReadOnly = true;
|
||||
this.textBox6.Size = new System.Drawing.Size(35, 20);
|
||||
this.textBox6.Size = new System.Drawing.Size(35, 13);
|
||||
this.textBox6.TabIndex = 29;
|
||||
//
|
||||
// label3
|
||||
|
@ -109,42 +110,46 @@
|
|||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Roll", true));
|
||||
this.textBox1.Enabled = false;
|
||||
this.textBox1.Location = new System.Drawing.Point(206, 76);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ReadOnly = true;
|
||||
this.textBox1.Size = new System.Drawing.Size(35, 20);
|
||||
this.textBox1.Size = new System.Drawing.Size(35, 13);
|
||||
this.textBox1.TabIndex = 32;
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Throttle", true));
|
||||
this.textBox2.Enabled = false;
|
||||
this.textBox2.Location = new System.Drawing.Point(13, 141);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.ReadOnly = true;
|
||||
this.textBox2.Size = new System.Drawing.Size(35, 20);
|
||||
this.textBox2.Size = new System.Drawing.Size(35, 13);
|
||||
this.textBox2.TabIndex = 35;
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Pitch", true));
|
||||
this.textBox3.Enabled = false;
|
||||
this.textBox3.Location = new System.Drawing.Point(65, 141);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.ReadOnly = true;
|
||||
this.textBox3.Size = new System.Drawing.Size(35, 20);
|
||||
this.textBox3.Size = new System.Drawing.Size(35, 13);
|
||||
this.textBox3.TabIndex = 36;
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Mode", true));
|
||||
this.textBox4.Enabled = false;
|
||||
this.textBox4.Location = new System.Drawing.Point(118, 182);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.ReadOnly = true;
|
||||
this.textBox4.Size = new System.Drawing.Size(35, 20);
|
||||
this.textBox4.Size = new System.Drawing.Size(35, 13);
|
||||
this.textBox4.TabIndex = 39;
|
||||
//
|
||||
// label4
|
||||
|
@ -158,12 +163,13 @@
|
|||
//
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Aux", true));
|
||||
this.textBox5.Enabled = false;
|
||||
this.textBox5.Location = new System.Drawing.Point(176, 182);
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.ReadOnly = true;
|
||||
this.textBox5.Size = new System.Drawing.Size(35, 20);
|
||||
this.textBox5.Size = new System.Drawing.Size(35, 13);
|
||||
this.textBox5.TabIndex = 42;
|
||||
//
|
||||
// label5
|
||||
|
@ -395,7 +401,7 @@
|
|||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "TransmitterChannelsView";
|
||||
this.Size = new System.Drawing.Size(465, 244);
|
||||
this.Size = new System.Drawing.Size(399, 244);
|
||||
((System.ComponentModel.ISupportInitialize)(this.TransmitterChannelsBindingSource)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
|
|
@ -123,31 +123,31 @@
|
|||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="button3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
R0lGODlhFgAVAPMAADJ/x+/3/5rA40qOzrPP6v///1mX0sHY7lGT0PT4/LfS68bb70qUzgAAAAAAAAAA
|
||||
ACwAAAAAFgAVAAAEU7DISQuoOM+r+/YgB2riiJVmkQgIgAhJmhjGASyIEY+CIV0zgWlw+EkUiBNgyWw6
|
||||
nxmisYA09WLAgXA0QygAhNyOy3LBUhQU2rKuqNHvVNw0L0QAADs=
|
||||
R0lGODlhFgAVAIMAADJ/x+/3/5rA40qOzrPP6v///1mX0sHY7lGT0PT4/LfS68bb70qUzgAAAAAAAAAA
|
||||
ACH/C05FVFNDQVBFMi4wAwEBAAAh+QQAAAAAACwAAAAAFgAVAAAIdAALCBxIsACAgggTDjyosOFChxAZ
|
||||
QlQocSLCihYLJBCAAAACAQkyJjBg4ACABQgMhJwowIDAgyMFWBxw4KVABQguAtjJs6fPnwlp2iyA02LL
|
||||
kDAHyJw4EoECAARSrmTK0SPIjAQxYjW4taBWrF8zhrU4tkBAADs=
|
||||
</value>
|
||||
</data>
|
||||
<data name="button2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALCwAA
|
||||
CwsBbQSEtwAAA25JREFUOE8tk21QVHUUxv9LmtOXZupL35ucFJbCSWMofNmQeFOJl8omi6mmgo1SCbVM
|
||||
EGdxdxALKkEmbYKitT44ZZgoDorQUIBgy7JgQwgq+753X6JdF5bl13+X7tz/nXPOfZ7zPOfcuapTP0/z
|
||||
28iwmE94WDz96Coxr3pQrFipEqowQqxSiYSlqICoiKruFysSHhChUFgMz/jEQ/etFM+uf0SIV6t70LY6
|
||||
2Ns+RZj/r4V7MB+LoyzIp8xYknFEAiIy3tM+zu7WSV76+CfEtv2/UH7WTrnRSojFOGVpmSuJEVmJs2Uk
|
||||
2bLG0gLaM7fQGmcpPngJUXSgg7fbJij91hMXve38l65RD5dNYS7cDHDe7OeKRdbGfMzYiDcskW7Lztwh
|
||||
p+I8oqD8EmVf2Sg7PSkVglIhHLe5PEIsl5TIfCyKOyEa5q2v/+ad5lvsONCJyP/gCiXNNkpaJlmUFv9y
|
||||
RDh3M8hFc4CL4146xoL8alboHXEwbQuzKPu9/s1t3miYIufDswhN6Y8UnDSz88So7B6N3ctqUonFf+KW
|
||||
Y2aWT2wnEQpODPFu4wwZ2u8RGSU/sL1xmsKGUc5ZFAkLxRcVX5iMQ3J58WmYIyhn67Tc45X6UQoNZp57
|
||||
U36FzNe+43n9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L0C+HGbaLnC3EootkQY1wW9n7kPzqfqTiqhtUfuOi8oJD
|
||||
dIiKDrGkzc0RErGQxJ8kUNIJ6zHe6/ibD8z32X9sAKnok2E0ZheadgdrwuJfnjhX70W5Lke4Phukzxbl
|
||||
Z1lhdNrDgivGmqj3zrcPeLdlnvxPryCpK76j+JxM+dkZUX098W52E51Y+ydpOWFm8yR2Eqf47BQfti6S
|
||||
re1BytZcZl/rAiUtM1y1K4K2klxUcmECr4jlJadhmaiYbcD+mDcaZygxybx0QNxCztuXeNk4TaHBwT6T
|
||||
lULdHUrFz4LTMjkmO4UNVor0s+QZJilutJNjnCS3aY699XfY+VY3UlbZBfbofydXP4VakLKFUH1yFnWt
|
||||
zO5TVgp0IxTUTZCnnyD/5G/k1N0lq/YuebpJdrzehZRZ1kXWF1Pk1/wpROOMzM2zrISIB7x4gg9ZCioo
|
||||
yiPcvgh/yH627DpNYa0N9WdTZLzSiZRW0E7mUSsvHpHZXj2KKxwi/VUL6fst+PwhQoEois9JNODE6w6g
|
||||
UhvYXjNGxvEJnk8UyCz5igztGNuqx0mrGScYdvJ0mYWUcguegAMlGEYJLeFVgrgDYZ5RN/Ls4VukHxlF
|
||||
lWtGOnWmj5S8Zl74aAjVx7cJesNsKe0iteg8YW+EZf8KTk8In+LC5/Og2tHCtkMjgiv42V8jifuRdK23
|
||||
Sd3VhkorCvjcOMMBYd9FRHR1ej34I4/wB9yERLw180tSBO+pipuk7hEOEgUS50STsKU+iPHcKCbzLYzm
|
||||
QRrahzC1DVLfNkR9+wCGtjHSdurZmlXPc7uNnGi8xn9S4RHZGLiTUQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue