Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CH-47F Chinook Support for DCS #835

Merged
merged 35 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e2e7e1d
Initial Commit for the DCS CH-47F Chinook Interface
BlueFinBima Aug 12, 2024
6f951eb
CH-47F MFD controls (autobinding) and corrections to the RadAlt.
BlueFinBima Aug 13, 2024
750578d
Correct pathing problem for the CH-47F in the in the Helios.Sln file
BlueFinBima Aug 13, 2024
e27f5fd
Missing Overhead Console indicators added for the Chinook
BlueFinBima Aug 13, 2024
d8e779a
Fix problem with the installers not laying down the CH-47F and the A-…
BlueFinBima Aug 14, 2024
cde757b
Merge branch 'Chinook' of https://github.com/HeliosVirtualCockpit/Hel…
BlueFinBima Aug 14, 2024
4a6c28b
CH-47F - lots of interface tidy up following testing. (More to do)
BlueFinBima Aug 14, 2024
f7220b9
CH47F CDU artwork added. more interface tweaks, and embedded viewport…
BlueFinBima Aug 15, 2024
87fdbc7
CH-47F Fix for the MFD rockers. More interface changes. ICSx knobs …
BlueFinBima Aug 15, 2024
4ce82b0
CH-47F Interface - Basic functions implemented and tested. RADALT an…
BlueFinBima Aug 16, 2024
b434962
CH-47F Patches added.
BlueFinBima Aug 16, 2024
60ae27c
Fix for AH-64D Apache TEDAC viewport have not being "TEDAC" #834
BlueFinBima Aug 17, 2024
0778084
CH-47F
BlueFinBima Aug 19, 2024
803542d
CH-47F - Complete the SFDs and RWR. Split the CDU's into two.
BlueFinBima Aug 20, 2024
8935a14
deletion of the redundant CDU.cs
BlueFinBima Aug 20, 2024
572695c
Fix to problem where the reversal of swipe direction was not working …
BlueFinBima Aug 20, 2024
3f2833a
Readme Change
BlueFinBima Aug 20, 2024
83703ce
Fix for CH-47F Args 1229-1232 for the VHF Radio display
BlueFinBima Aug 20, 2024
99ac478
CH-47F - Add the M880 Chronometer
BlueFinBima Aug 21, 2024
2909b58
CH-47F - Fix for incorrect viewport name in the Chronometer.
BlueFinBima Aug 21, 2024
cc5a66f
CH-47F Remove brim from FAT gauge.
BlueFinBima Aug 22, 2024
545931c
Merge branch 'Chinook' of https://github.com/HeliosVirtualCockpit/Hel…
BlueFinBima Aug 22, 2024
e9c0a4a
Corrections to Iris configuration creation not working for remote.
BlueFinBima Aug 23, 2024
1500770
Move Hornet Viewport templates to main Toolbox folder
BlueFinBima Aug 23, 2024
249b401
Add Helios Private fonts to the Font Chooser
BlueFinBima Aug 26, 2024
e6f7738
Merge branch 'Chinook' of https://github.com/HeliosVirtualCockpit/Hel…
BlueFinBima Aug 26, 2024
10d1d10
#801 Completion of work to have private fonts appear in the Font Choo…
BlueFinBima Aug 26, 2024
143af19
#801 Implement Stretch for fonts which was defaulting to Medium.
BlueFinBima Aug 27, 2024
34406a3
Add missing Stretch property to the Font Chooser save / restore capab…
BlueFinBima Aug 27, 2024
1ec3e56
Add a Released trigger to the Potentiometer knob.
BlueFinBima Aug 28, 2024
7284e40
Initial Changes to the DCS monitor setup lua for combined.
BlueFinBima Aug 29, 2024
70839cf
Minor change to the Status Information item for viewports.
BlueFinBima Aug 29, 2024
76b70c0
Correction for the wrong syntax used for the "or" operator in the Lua…
BlueFinBima Aug 30, 2024
5e41f77
Correcting the CH-47F Switch Covers
BlueFinBima Aug 30, 2024
ab646f5
Copyright Date change for the CH-47F interface
BlueFinBima Aug 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
289 changes: 289 additions & 0 deletions Aircraft CH-47F Plugin/Aircraft CH-47F Plugin.csproj

Large diffs are not rendered by default.

196 changes: 196 additions & 0 deletions Aircraft CH-47F Plugin/Docs/Helios.CH-47F.Plugin.Install.Read.Me.rtf

Large diffs are not rendered by default.

177 changes: 177 additions & 0 deletions Aircraft CH-47F Plugin/Gauges/CDU/CDU Bottom.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
// Copyright 2014 Craig Courtney
// Copyright 2022 Helios Contributors
//
// Helios is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Helios is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

namespace GadrocsWorkshop.Helios.Gauges.CH47F.CDU
{
using GadrocsWorkshop.Helios.ComponentModel;
using GadrocsWorkshop.Helios.Controls;
using System;
using System.Windows;
using System.Windows.Media;
using System.Xml;
using System.Globalization;
using System.Xml.Linq;
using System.Drawing.Imaging;

[HeliosControl("Helios.CH47F.CDU.Bottom", "CDU Keyboard", "CH-47F Chinook", typeof(BackgroundImageRenderer), HeliosControlFlags.NotShownInUI)]
public class CDU_Bottom : CompositeVisualWithBackgroundImage
{
private static readonly Rect SCREEN_RECT = new Rect(145, 94, 512, 486);
private Rect _scaledScreenRect = SCREEN_RECT;
private string _interfaceDevice = "";
private const string PANEL_IMAGE = "{CH-47F}/Gauges/CDU/Images/CDU_Bezel_Bot.png";
private const int KBOFFSET = 659;

public CDU_Bottom(string interfaceDevice)
: base(interfaceDevice, new Size(810, 1000 - KBOFFSET))
{
SupportedInterfaces = new[] { typeof(Interfaces.DCS.CH47F.CH47FInterface) };
_interfaceDevice = interfaceDevice;

int buttonNumber = 0;
string[] labels = new string[] { "1", "2", "3",
"A", "B", "C", "D", "E", "F", "G", "4", "5", "6", "H", "I", "J", "K", "L", "M", "N", "7", "8", "9", "O", "P", "Q", "R", "S", "T", "U", "0", "dot", "V",
"W", "X", "Y", "Z", "SP", "MARK", "slash", "dash", "TDL", "ASE", "empty", "DATA", "STAT"};


for (int y = 670 - KBOFFSET; y <= 808 - KBOFFSET; y += 69)
{
for (int x = 19; x <= 730; x += 79)
{
AddButton($"{labels[buttonNumber]}", new Rect(x, y, 63, 54), $"{labels[buttonNumber++]}");
}
}
for (int x = 97; x <= 650; x += 79)
{
AddButton($"{labels[buttonNumber]}", new Rect(x, 875 - KBOFFSET, 63, 54), $"{labels[buttonNumber++]}");
}
for (int x = 66; x <= 661; x += 85)
{
AddButton($"{labels[buttonNumber]}", new Rect(x, 940 - KBOFFSET, 81, 60), $"{labels[buttonNumber++]}");
}
}
protected HeliosPanel AddPanel(string name, Point posn, Size size, string background, string interfaceDevice)
{
HeliosPanel panel = AddPanel
(
name: name,
posn: posn,
size: size,
background: background
);
// in this instance, we want to all the panels to be hide-able so the actions need to be added
IBindingAction panelAction = panel.Actions["toggle.hidden"];
panelAction.Device = $"{Name}_{name}";
panelAction.Name = "hidden";
if (!Actions.ContainsKey(panel.Actions.GetKeyForItem(panelAction)))
{
Actions.Add(panelAction);
}
panelAction = panel.Actions["set.hidden"];
panelAction.Device = $"{Name}_{name}";
panelAction.Name = "hidden";
if (!Actions.ContainsKey(panel.Actions.GetKeyForItem(panelAction)))
{
Actions.Add(panelAction);
}
return panel;
}

private void AddButton(string name, Rect rect, string label)
{
PushButton button = new PushButton();
button.Top = rect.Y;
button.Left = rect.X;
button.Width = rect.Width;
button.Height = rect.Height;
if (label.Length == 2 && (label.StartsWith("L") || label.StartsWith("R"))) {
label = label.Substring(0,1) + "x";
}

button.Image = $"{{CH-47F}}/Gauges/CDU/Images/CDU_{label.Replace(" ", "_")}_Norm.png";
button.PushedImage = $"{{CH-47F}}/Gauges/CDU/Images/CDU_{(label.Replace(" ","_"))}_Pressed.png";

button.Name = name;

Children.Add(button);

AddTrigger(button.Triggers["pushed"], name);
AddTrigger(button.Triggers["released"], name);

AddAction(button.Actions["push"], name);
AddAction(button.Actions["release"], name);
AddAction(button.Actions["set.physical state"], name);
// add the default bindings
AddDefaultOutputBinding(
childName: name,
deviceTriggerName: "pushed",
interfaceActionName: $"{_interfaceDevice}.push.{name}"
);
AddDefaultOutputBinding(
childName: name,
deviceTriggerName: "released",
interfaceActionName: $"{_interfaceDevice}.release.{name}"
);
AddDefaultInputBinding(
childName: name,
interfaceTriggerName: $"{_interfaceDevice}.{name}.changed",
deviceActionName: "set.physical state");
}
private string ComponentName(string name)
{
return $"{Name}_{name}";
}
private new void AddTrigger(IBindingTrigger trigger, string name)
{
trigger.Device = ComponentName(name);
if (!Triggers.ContainsKey(Triggers.GetKeyForItem(trigger))) Triggers.Add(trigger);

}
private new void AddAction(IBindingAction action, string name)
{
action.Device = ComponentName(name);
if (!Actions.ContainsKey(Actions.GetKeyForItem(action))) Actions.Add(action);
}

public override string DefaultBackgroundImage => PANEL_IMAGE;

protected override void OnBackgroundImageChange()
{
BackgroundImage = BackgroundImageIsCustomized ? null : PANEL_IMAGE;
}
public override bool HitTest(Point location)
{
if (_scaledScreenRect.Contains(location))
{
return false;
}

return false;
}
public override void MouseDown(Point location)
{
// No-Op
}
public override void MouseDrag(Point location)
{
// No-Op
}
public override void MouseUp(Point location)
{
// No-Op
}
}
}
33 changes: 33 additions & 0 deletions Aircraft CH-47F Plugin/Gauges/CDU/CDU Copilot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// CopyLeft 2014 Craig Courtney
// CopyLeft 2024 Helios Contributors
//
// Helios is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Helios is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

namespace GadrocsWorkshop.Helios.Gauges.CH47F.CDU
{
using GadrocsWorkshop.Helios.ComponentModel;
using GadrocsWorkshop.Helios.Controls;
using System;
using System.Windows;
using System.Windows.Media;

[HeliosControl("Helios.CH47F.CDU.Top.Copilot", "CDU Display Left (Copilot)", "CH-47F Chinook", typeof(BackgroundImageRenderer), HeliosControlFlags.None)]
public class CDUTopCopilot : CDU_Top
{
public CDUTopCopilot()
: base("CDU (Left)")
{
}
}
}
33 changes: 33 additions & 0 deletions Aircraft CH-47F Plugin/Gauges/CDU/CDU Keyboard Copilot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// CopyLeft 2014 Craig Courtney
// CopyLeft 2024 Helios Contributors
//
// Helios is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Helios is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

namespace GadrocsWorkshop.Helios.Gauges.CH47F.CDU
{
using GadrocsWorkshop.Helios.ComponentModel;
using GadrocsWorkshop.Helios.Controls;
using System;
using System.Windows;
using System.Windows.Media;

[HeliosControl("Helios.CH47F.CDU.Keyboard.Copilot", "CDU Keyboard Left (Copilot)", "CH-47F Chinook", typeof(BackgroundImageRenderer), HeliosControlFlags.None)]
public class CDUBotCopilot : CDU_Bottom
{
public CDUBotCopilot()
: base("CDU (Left)")
{
}
}
}
32 changes: 32 additions & 0 deletions Aircraft CH-47F Plugin/Gauges/CDU/CDU Keyboard Pilot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright 2014 Craig Courtney
// Copyright 2024 Helios Contributors
//
// Helios is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Helios is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

namespace GadrocsWorkshop.Helios.Gauges.CH47F.CDU
{
using GadrocsWorkshop.Helios.ComponentModel;
using GadrocsWorkshop.Helios.Controls;
using System;
using System.Windows;
using System.Windows.Media;

[HeliosControl("Helios.CH47F.CDU.Keyboard.Pilot", "CDU Keyboard Right (Pilot)", "CH-47F Chinook", typeof(BackgroundImageRenderer), HeliosControlFlags.None)]
public class CDUBotPilot : CDU_Bottom
{
public CDUBotPilot() : base("CDU (Right)")
{
}
}
}
32 changes: 32 additions & 0 deletions Aircraft CH-47F Plugin/Gauges/CDU/CDU Pilot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright 2014 Craig Courtney
// Copyright 2024 Helios Contributors
//
// Helios is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Helios is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

namespace GadrocsWorkshop.Helios.Gauges.CH47F.CDU
{
using GadrocsWorkshop.Helios.ComponentModel;
using GadrocsWorkshop.Helios.Controls;
using System;
using System.Windows;
using System.Windows.Media;

[HeliosControl("Helios.CH47F.CDU.Top.Pilot", "CDU Display Right (Pilot)", "CH-47F Chinook", typeof(BackgroundImageRenderer), HeliosControlFlags.None)]
public class CDUTopPilot : CDU_Top
{
public CDUTopPilot() : base("CDU (Right)")
{
}
}
}
Loading