mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 15:38:29 -04:00
3f9a077dbd
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1153 f9c3cf11-9bcb-44bc-f272-b75c42450872
47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
namespace ArducopterConfigurator.PresentationModels
|
|
{
|
|
public class AltitudeHoldConfigVm : MonitorVm
|
|
{
|
|
public AltitudeHoldConfigVm(CommsSession sp)
|
|
: base(sp)
|
|
{
|
|
PropsInUpdateOrder = new[] { "P", "I", "D", };
|
|
|
|
RefreshCommand = new DelegateCommand(_ => RefreshValues());
|
|
UpdateCommand = new DelegateCommand(_ => UpdateValues());
|
|
}
|
|
|
|
public ICommand RefreshCommand { get; private set; }
|
|
public ICommand UpdateCommand { get; private set; }
|
|
|
|
public float P { get; protected set; }
|
|
public float I { get; protected set; }
|
|
public float D { get; protected set; }
|
|
|
|
|
|
private void RefreshValues()
|
|
{
|
|
SendString("F");
|
|
}
|
|
|
|
public void UpdateValues()
|
|
{
|
|
SendPropsWithCommand("E");
|
|
}
|
|
|
|
protected override void OnActivated()
|
|
{
|
|
RefreshValues();
|
|
}
|
|
|
|
protected override void OnStringReceived(string strReceived)
|
|
{
|
|
PopulatePropsFromUpdate(strReceived,true);
|
|
}
|
|
|
|
public override string Name
|
|
{
|
|
get { return "Altitude Hold"; }
|
|
}
|
|
}
|
|
} |