You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.5 KiB
71 lines
1.5 KiB
using System; |
|
|
|
namespace ArducopterConfigurator.PresentationModels |
|
{ |
|
/// <summary> |
|
/// Vm for Altitude hold settings |
|
/// </summary> |
|
/// <remarks> |
|
/// Todo: this one is weird because the APM sends and receives the values |
|
/// in a different order |
|
/// There is a unit test to cover it but it will need fixing. |
|
/// TODO: test this |
|
/// </remarks> |
|
public class AltitudeHoldConfigVm : CrudVm |
|
{ |
|
public AltitudeHoldConfigVm() |
|
{ |
|
updateString = "E"; |
|
refreshString = "F"; |
|
PropsInUpdateOrder = new[] {"P", "I", "D",}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
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 |
|
{ |
|
get { return "Altitude Hold"; } |
|
} |
|
} |
|
} |