From b70b307dac4c87d503f644ba035617e7bd79524f Mon Sep 17 00:00:00 2001 From: Falco Date: Wed, 22 May 2024 19:53:29 +0200 Subject: [PATCH] - Fix doesn't go into coord show pages - Fix doesn't set own vis/rings --- .../DCS/Aircraft/AH64/AH64TSDOptionData.cs | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/CoordinateConverter/DCS/Aircraft/AH64/AH64TSDOptionData.cs b/CoordinateConverter/DCS/Aircraft/AH64/AH64TSDOptionData.cs index 05d648e..ca83c54 100644 --- a/CoordinateConverter/DCS/Aircraft/AH64/AH64TSDOptionData.cs +++ b/CoordinateConverter/DCS/Aircraft/AH64/AH64TSDOptionData.cs @@ -1340,6 +1340,7 @@ public List GenerateCommands(bool isPilot) commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_B2)); currentPhase = EPhase.Navigation; } + if (HasNavPhaseData) { if (NavWpData != EFilter.No_Change && startingCondition.NavWpData != NavWpData) @@ -1377,6 +1378,9 @@ public List GenerateCommands(bool isPilot) if (HasNavCoordData) { + // coord show page + commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_T6)); + if (NavCtrlMeasures != EFilter.No_Change && startingCondition.NavCtrlMeasures != NavCtrlMeasures) { commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_L2)); @@ -1401,18 +1405,19 @@ public List GenerateCommands(bool isPilot) { commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_R2)); } - // back to show page + // back to main show page commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_T6)); } } - if (currentPhase == EPhase.Navigation && HasAtkPhaseData) - { - commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_B2)); - currentPhase = EPhase.Attack; - } if (HasAtkPhaseData) { + if (currentPhase == EPhase.Navigation) + { + commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_B2)); + currentPhase = EPhase.Attack; + } + if (AtkCurrentRoute != EFilter.No_Change && startingCondition.AtkCurrentRoute != AtkCurrentRoute) { commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_L2)); @@ -1448,6 +1453,9 @@ public List GenerateCommands(bool isPilot) if (HasAtkCoordData) { + // go to coord show page + commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_T6)); + if (AtkCtrlMeasures != EFilter.No_Change && startingCondition.AtkCtrlMeasures != AtkCtrlMeasures) { commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_L2)); @@ -1481,7 +1489,9 @@ public List GenerateCommands(bool isPilot) if (HasVisData) { + // Go to threat show page commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_T5)); + EVis currentVis = startingCondition.ThreatVis; // enter generic vis data if (AseThreats != EFilter.No_Change && startingCondition.AseThreats != AseThreats) @@ -1501,6 +1511,11 @@ public List GenerateCommands(bool isPilot) commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_R1)); currentVis = EVis.Own; } + + if (VisOwnOwn != EFilter.No_Change && startingCondition.VisOwnOwn != VisOwnOwn) + { + commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_R2)); + } if (VisOwnTrnPt != EFilter.No_Change && startingCondition.VisOwnTrnPt != VisOwnTrnPt) { commands.Add(new DCSCommand(mfd, (int)AH64.EKeyCode.MFD_R3));