ardupilot/Configurator/Configurator.Net/PresentationModels/AcroModeConfigVm.cs
mandrolic 3f9a077dbd Configurator.Net: Initial import
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1153 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-18 22:23:09 +00:00

53 lines
1.4 KiB
C#

using System;
namespace ArducopterConfigurator.PresentationModels
{
public class AcroModeConfigVm : ConfigWithPidsBase
{
public AcroModeConfigVm(CommsSession sp) : base(sp)
{
PropsInUpdateOrder = new[]
{
"RollP",
"RollI",
"RollD",
"PitchP",
"PitchI",
"PitchD",
"YawP",
"YawI",
"YawD",
"TransmitterFactor",
};
RefreshCommand = new DelegateCommand(_ => RefreshValues());
UpdateCommand = new DelegateCommand(_ => UpdateValues());
}
public float TransmitterFactor { get; private set; }
public ICommand RefreshCommand { get; private set; }
public ICommand UpdateCommand { get; private set; }
protected override void OnActivated()
{
RefreshValues();
}
private void RefreshValues()
{
SendString("P");
}
public void UpdateValues()
{
SendPropsWithCommand("O");
}
public override string Name
{
get { return "Acro Mode"; }
}
}
}