|
@@ -53,6 +53,7 @@ namespace VirgoRT.Devices
|
|
|
private float LD_MAX = 0;
|
|
|
private float PH_MIN = 0;
|
|
|
private float PH_MAX = 0;
|
|
|
+ private bool isMatch => Name == "match";
|
|
|
//private int _scMatchPresetMode;
|
|
|
//private int _scMatchMode;
|
|
|
//private readonly SCConfigItem _scMatchPositionC1;
|
|
@@ -220,6 +221,8 @@ namespace VirgoRT.Devices
|
|
|
/// <param name="c2"></param>
|
|
|
public override void SetMatchPosition(float c1, float c2, out string reason)
|
|
|
{
|
|
|
+ reason = string.Empty;
|
|
|
+ if (isMatch) return;
|
|
|
LOG.Info($"SetMatchPosition {Module} {Name} c1={c1} c2={c2}");
|
|
|
base.SetMatchPosition(c1, c2, out reason);
|
|
|
//this.SetWorkMode(EnumRfMatchTuneMode.Auto);
|
|
@@ -229,6 +232,7 @@ namespace VirgoRT.Devices
|
|
|
public override bool SetMatchMode(string mode, out string reason)
|
|
|
{
|
|
|
reason = string.Empty;
|
|
|
+ if (isMatch) return true;
|
|
|
LOG.Info($"SetMatchMode {Module} {Name} mode={mode}");
|
|
|
if (mode == EnumRfMatchTuneMode.Manual.ToString())
|
|
|
SetWorkMode(EnumRfMatchTuneMode.Manual);
|
|
@@ -239,9 +243,10 @@ namespace VirgoRT.Devices
|
|
|
|
|
|
public override void SetMatchPositionC1(float c1, out string reason)
|
|
|
{
|
|
|
+ reason = string.Empty;
|
|
|
+ if (isMatch) return;
|
|
|
LOG.Info($"SetMatchPositionC1 {Module} {Name} c1={c1} ");
|
|
|
base.SetMatchPositionC1(c1, out reason);
|
|
|
- reason = string.Empty;
|
|
|
LoadPosition1 = c1;
|
|
|
ushort val1 = (ushort)(c1 * 10);
|
|
|
|
|
@@ -251,9 +256,10 @@ namespace VirgoRT.Devices
|
|
|
|
|
|
public override void SetMatchPositionC2(float c2, out string reason)
|
|
|
{
|
|
|
+ reason = string.Empty;
|
|
|
+ if (isMatch) return;
|
|
|
LOG.Info($"SetMatchPositionC2 {Module} {Name} c2={c2} ");
|
|
|
base.SetMatchPositionC2(c2, out reason);
|
|
|
- reason = string.Empty;
|
|
|
LoadPosition2 = c2;
|
|
|
ushort val2 = (ushort)(c2 * 10);
|
|
|
|
|
@@ -381,6 +387,7 @@ namespace VirgoRT.Devices
|
|
|
|
|
|
private void SetPosition(float c1val, float c2val)
|
|
|
{
|
|
|
+ if (isMatch) return;
|
|
|
ushort val1 = (ushort)(c1val * 10);
|
|
|
ushort val2 = (ushort)(c2val * 10);
|
|
|
|
|
@@ -390,12 +397,14 @@ namespace VirgoRT.Devices
|
|
|
|
|
|
private void SetWorkMode(EnumRfMatchTuneMode mode)
|
|
|
{
|
|
|
+ if (isMatch) return;
|
|
|
this.SendCmd(mode == EnumRfMatchTuneMode.Auto ? AdTecMatchAMVGMessage.AUTO :
|
|
|
mode == EnumRfMatchTuneMode.Manual ? AdTecMatchAMVGMessage.MANUAL : "");
|
|
|
}
|
|
|
|
|
|
private void SetPresetMemory(byte gear)
|
|
|
{
|
|
|
+ if (isMatch) return;
|
|
|
this.SendCmd(AdTecMatchAMVGMessage.PRESET_MEM + gear.ToString());
|
|
|
}
|
|
|
}
|