Skip to content

Commit

Permalink
- Fix doesn't go into coord show pages
Browse files Browse the repository at this point in the history
- Fix doesn't set own vis/rings
  • Loading branch information
FalcoGer committed May 22, 2024
1 parent 839d65d commit b70b307
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions CoordinateConverter/DCS/Aircraft/AH64/AH64TSDOptionData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,7 @@ public List<DCSCommand> 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)
Expand Down Expand Up @@ -1377,6 +1378,9 @@ public List<DCSCommand> 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));
Expand All @@ -1401,18 +1405,19 @@ public List<DCSCommand> 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));
Expand Down Expand Up @@ -1448,6 +1453,9 @@ public List<DCSCommand> 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));
Expand Down Expand Up @@ -1481,7 +1489,9 @@ public List<DCSCommand> 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)
Expand All @@ -1501,6 +1511,11 @@ public List<DCSCommand> 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));
Expand Down

0 comments on commit b70b307

Please sign in to comment.