Skip to content

Commit

Permalink
Fixing problems with the location of where the exports.lua file is sa…
Browse files Browse the repository at this point in the history
…ved to.
  • Loading branch information
BlueFinBima authored and BlueFinBima committed Mar 16, 2019
1 parent 5d5fb43 commit c9e3db3
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 51 deletions.
4 changes: 2 additions & 2 deletions Helios/Interfaces/DCS/A10C/A10CInterfaceEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<TextBox Grid.Column="1" Grid.Row="4" VerticalAlignment="Top" HorizontalAlignment="Left" Width="40"
MaxWidth="40" Text="{Binding ElementName=A10PropertiesWindow, Path=Configuration.ExportFrequency}"/>
<TextBlock Grid.Column="1" Grid.Row="5" FontSize="10" FontStyle="Italic" TextWrapping="Wrap">
Number of times per second that intrument guages will be exported per second (min 4).
Number of times per second that instrument guages will be exported per second (min 4).
</TextBlock>
<Label Grid.Column="0" Grid.Row="6" HorizontalAlignment="Right" Content="Phantom Monitor Fix"/>
<CheckBox Grid.Column="1" Grid.Row="6" VerticalAlignment="Center"
Expand Down Expand Up @@ -144,7 +144,7 @@
</StackPanel>
<StackPanel Style="{StaticResource OutOfDateStyle}">
<TextBlock Margin="4" TextWrapping="Wrap">
In order for Helios to interface with DCS A10C an updated Export.lua file must be installed. This will back up and existing Export.lua file and deploy the necessary Helios configuration.
In order for Helios to interface with DCS A10C an updated Export.lua file must be installed. This will back up an existing Export.lua file and deploy the necessary Helios configuration.
</TextBlock>
<Button Click="Configure_Click" Grid.Row="1" HorizontalAlignment="Right" Margin="2">Setup DCS A-10C</Button>
</StackPanel>
Expand Down
4 changes: 2 additions & 2 deletions Helios/Interfaces/DCS/AV8B/AV8BInterfaceEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<TextBox Grid.Column="1" Grid.Row="4" VerticalAlignment="Top" HorizontalAlignment="Left" Width="40"
MaxWidth="40" Text="{Binding ElementName=AV8BPropertiesWindow, Path=Configuration.ExportFrequency}"/>
<TextBlock Grid.Column="1" Grid.Row="5" FontSize="10" FontStyle="Italic" TextWrapping="Wrap">
Number of times per second that intrument guages will be exported per second (min 4).
Number of times per second that instrument guages will be exported per second (min 4).
</TextBlock>
<Label Grid.Column="0" Grid.Row="6" HorizontalAlignment="Right" Content="Phantom Monitor Fix"/>
<CheckBox Grid.Column="1" Grid.Row="6" VerticalAlignment="Center"
Expand Down Expand Up @@ -144,7 +144,7 @@
</StackPanel>
<StackPanel Style="{StaticResource OutOfDateStyle}">
<TextBlock Margin="4" TextWrapping="Wrap">
In order for Helios to interface with DCS AV-8B an updated Export.lua file must be installed. This will back up and existing Export.lua file and deploy the necessary Helios configuration.
In order for Helios to interface with DCS AV-8B an updated Export.lua file must be installed. This will back up an existing Export.lua file and deploy the necessary Helios configuration.
</TextBlock>
<Button Click="Configure_Click" Grid.Row="1" HorizontalAlignment="Right" Margin="2">Setup DCS AV-8B</Button>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion Helios/Interfaces/DCS/AV8B/AV8BInterfaceEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public AV8BInterfaceEditor()
{
InitializeComponent();
Configuration = new DCSConfigurator("DCSAV8B", DCSPath);
Configuration.ExportConfigPath = "Config\\Export";
Configuration.ExportConfigPath = "Scripts";
Configuration.ExportFunctionsPath = "pack://application:,,,/Helios;component/Interfaces/DCS/AV8B/ExportFunctions.lua";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<Label.Content>Export Frequency</Label.Content>
</Label>
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding ElementName=BSEditor,Path=Configuration.ExportFrequency}" VerticalAlignment="Top" HorizontalAlignment="Left" Width="40" MaxWidth="40" />
<TextBlock Grid.Column="1" Grid.Row="5" FontSize="10" FontStyle="Italic" TextWrapping="Wrap">Number of times per second that intrument guages will be exported per second (min 4).</TextBlock>
<TextBlock Grid.Column="1" Grid.Row="5" FontSize="10" FontStyle="Italic" TextWrapping="Wrap">Number of times per second that instrument guages will be exported per second (min 4).</TextBlock>
</Grid>
</GroupBox>
</Grid>
Expand Down Expand Up @@ -138,7 +138,7 @@
<Button Grid.Row="1" HorizontalAlignment="Right" Margin="2" Click="Remove_Click">Remove Helios Setup</Button>
</StackPanel>
<StackPanel Style="{StaticResource OutOfDateStyle}">
<TextBlock Margin="4" TextWrapping="Wrap">In order for Helios to interface with DCS Black Shark an updated Export.lua file must be installed. This will back up and existing Export.lua file and deploy the necessary Helios configuration.</TextBlock>
<TextBlock Margin="4" TextWrapping="Wrap">In order for Helios to interface with DCS Black Shark an updated Export.lua file must be installed. This will back up an existing Export.lua file and deploy the necessary Helios configuration.</TextBlock>
<Button Grid.Row="1" HorizontalAlignment="Right" Margin="2" Click="Configure_Click">Setup Black Shark</Button>
</StackPanel>
</StackPanel>
Expand Down
26 changes: 18 additions & 8 deletions Helios/Interfaces/DCS/Common/DCSConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,25 @@ public string ExportAppPath
if (pathKey != null)
{
pathKey.Close();

String path;
IntPtr pathPtr;
int hr = NativeMethods.SHGetKnownFolderPath(ref FolderSavedGames, 0, IntPtr.Zero, out pathPtr);
if (hr == 0)
return System.IO.Path.Combine(Environment.GetEnvironmentVariable("userprofile"), "Saved Games", "DCS.openbeta");
return System.IO.Path.Combine(Environment.GetEnvironmentVariable("userprofile"), "DCS");
}
else
{
pathKey = Registry.CurrentUser.OpenSubKey(@"Software\Eagle Dynamics\DCS World OpenBeta");
if (pathKey != null)
{
path = Marshal.PtrToStringUni(pathPtr);
Marshal.FreeCoTaskMem(pathPtr);
return System.IO.Path.Combine(path, "DCS");
pathKey.Close();
return System.IO.Path.Combine(Environment.GetEnvironmentVariable("userprofile"), "Saved Games", "DCS.openbeta");
}
else
{
pathKey = Registry.CurrentUser.OpenSubKey(@"Software\Eagle Dynamics\DCS World OpenAlpha");
if (pathKey != null)
{
pathKey.Close();
return System.IO.Path.Combine(Environment.GetEnvironmentVariable("userprofile"),"Saved Games", "DCS.openalpha");
}
}
}
}
Expand Down
36 changes: 18 additions & 18 deletions Helios/Interfaces/DCS/F14B/F14BInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public F14BInterface()
AddFunction(new Axis(this, BAROALTIMETER, "306", "306", 0.1d, 0.0d, 1.0d, "BAROALTIMETER", "Altimeter Pressure Setting"));
#endregion
#region RIO Altimeter
AddFunction(new Axis(this, BAROALTIMETER, "20306", "20306", 0.1d, 0.0d, 1.0d, "BAROALTIMETER", "Altimeter Pressure Setting"));
AddFunction(new Axis(this, BAROALTIMETER, "20306", "20306", 0.1d, 0.0d, 1.0d, "BAROALTIMETER", "Altimeter Pressure Setting (RIO)"));
#endregion
#region Gear
AddFunction(new PushButton(this, GEARHOOK, "497", "497", "GEARHOOK", "Launch Bar Abort", "1", "0", "%1d"));
Expand Down Expand Up @@ -214,8 +214,8 @@ public F14BInterface()
AddFunction(Switch.CreateToggleSwitch(this, COCKPITMECHANICS, "923", "923", "0", "Position 1", "1", "Position 2", "COCKPITMECHANICS", "Anti-Collision Lights", "%1d"));
#endregion
#region Light panel RIO
AddFunction(Switch.CreateThreeWaySwitch(this, COCKPITMECHANICS, "194", "194", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "COCKPITMECHANICS", "Red Flood Light", "%1d"));
AddFunction(Switch.CreateThreeWaySwitch(this, COCKPITMECHANICS, "159", "159", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "COCKPITMECHANICS", "White Flood Light", "%1d"));
AddFunction(Switch.CreateThreeWaySwitch(this, COCKPITMECHANICS, "194", "194", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "COCKPITMECHANICS", "Red Flood Light (RIO)", "%1d"));
AddFunction(Switch.CreateThreeWaySwitch(this, COCKPITMECHANICS, "159", "159", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "COCKPITMECHANICS", "White Flood Light (RIO)", "%1d"));
#endregion
#region DISPLAY Panel: Power
AddFunction(Switch.CreateToggleSwitch(this, VDI, "1010", "1010", "0", "Position 1", "1", "Position 2", "VDI", "VDI Power On/Off", "%1d"));
Expand All @@ -241,7 +241,7 @@ public F14BInterface()
#region ECMD Panel
#endregion
#region TACAN CMD
AddFunction(new PushButton(this, TACAN, "292", "292", "TACAN", "TACAN CMD Button", "1", "0", "%1d"));
AddFunction(new PushButton(this, TACAN, "292", "292", "TACAN", "TACAN CMD Button (RIO)", "1", "0", "%1d"));
AddFunction(new PushButton(this, TACAN, "135", "135", "TACAN", "TACAN CMD Button", "1", "0", "%1d"));
#endregion
#region TACAN Pilot Panel
Expand All @@ -251,10 +251,10 @@ public F14BInterface()
AddFunction(new PushButton(this, TACAN, "2115", "2115", "TACAN", "TACAN BIT", "1", "0", "%1d"));
#endregion
#region TACAN RIO Panel
AddFunction(new Axis(this, TACAN, "375", "375", 0.1d, 0.0d, 1.0d, "TACAN", "TACAN Volume"));
AddFunction(Switch.CreateToggleSwitch(this, TACAN, "373", "373", "0", "Position 1", "1", "Position 2", "TACAN", "TACAN Mode Normal/Inverse", "%1d"));
AddFunction(Switch.CreateToggleSwitch(this, TACAN, "372", "372", "0", "Position 1", "1", "Position 2", "TACAN", "TACAN Channel X/Y", "%1d"));
AddFunction(new PushButton(this, TACAN, "371", "371", "TACAN", "TACAN BIT", "1", "0", "%1d"));
AddFunction(new Axis(this, TACAN, "375", "375", 0.1d, 0.0d, 1.0d, "TACAN", "TACAN Volume (RIO)"));
AddFunction(Switch.CreateToggleSwitch(this, TACAN, "373", "373", "0", "Position 1", "1", "Position 2", "TACAN", "TACAN Mode Normal/Inverse (RIO)", "%1d"));
AddFunction(Switch.CreateToggleSwitch(this, TACAN, "372", "372", "0", "Position 1", "1", "Position 2", "TACAN", "TACAN Channel X/Y (RIO)", "%1d"));
AddFunction(new PushButton(this, TACAN, "371", "371", "TACAN", "TACAN BIT (RIO)", "1", "0", "%1d"));
#endregion
#region AN/ARA-63 Panel
AddFunction(Switch.CreateToggleSwitch(this, ILS, "910", "910", "0", "Position 1", "1", "Position 2", "ILS", "AN/ARA-63 Power Switch", "%1d"));
Expand All @@ -269,11 +269,11 @@ public F14BInterface()
AddFunction(Switch.CreateThreeWaySwitch(this, ICS, "2044", "2044", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "ICS", "ICS Function Selector", "%1d"));
#endregion
#region ICS RIO
AddFunction(new Axis(this, ICS, "400", "400", 0.1d, 0.0d, 1.0d, "ICS", "ICS Volume"));
AddFunction(Switch.CreateThreeWaySwitch(this, ICS, "402", "402", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "ICS", "ICS Function Selector", "%1d"));
AddFunction(Switch.CreateThreeWaySwitch(this, ICS, "381", "381", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "ICS", "XMTR SEL Switch", "%1d"));
AddFunction(Switch.CreateToggleSwitch(this, ICS, "380", "380", "0", "Position 1", "1", "Position 2", "ICS", "V/UHF 2 ANT Switch", "%1d"));
AddFunction(Switch.CreateThreeWaySwitch(this, ICS, "382", "382", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "ICS", "KY MODE Switch", "%1d"));
AddFunction(new Axis(this, ICS, "400", "400", 0.1d, 0.0d, 1.0d, "ICS", "ICS Volume (RIO)"));
AddFunction(Switch.CreateThreeWaySwitch(this, ICS, "402", "402", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "ICS", "ICS Function Selector (RIO)", "%1d"));
AddFunction(Switch.CreateThreeWaySwitch(this, ICS, "381", "381", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "ICS", "XMTR SEL Switch (RIO)", "%1d"));
AddFunction(Switch.CreateToggleSwitch(this, ICS, "380", "380", "0", "Position 1", "1", "Position 2", "ICS", "V/UHF 2 ANT Switch (RIO)", "%1d"));
AddFunction(Switch.CreateThreeWaySwitch(this, ICS, "382", "382", "-1", "Position 1", "0", "Position 2", "1", "Position 3", "ICS", "KY MODE Switch (RIO)", "%1d"));
#endregion
#region UHF ARC-159
AddFunction(Switch.CreateToggleSwitch(this, ARC159, "2035", "2035", "0", "Position 1", "1", "Position 2", "ARC159", "UHF ARC-159 Squelch Switch", "%1d"));
Expand All @@ -296,18 +296,18 @@ public F14BInterface()
#endregion
#region UHF/VHF/UHF Pilot/RIO Remote Display
AddFunction(new Axis(this, ARC159, "1031", "1031", 0.1d, 0.0d, 1.0d, "ARC159", "UHF Radio Remote Display Brightness"));
AddFunction(new Axis(this, ARC159, "406", "406", 0.1d, 0.0d, 1.0d, "ARC159", "UHF Radio Remote Display Brightness"));
AddFunction(new Axis(this, ARC159, "406", "406", 0.1d, 0.0d, 1.0d, "ARC159", "UHF Radio Remote Display Brightness (RIO)"));
AddFunction(new Axis(this, ARC182, "1030", "1030", 0.1d, 0.0d, 1.0d, "ARC182", "VHF/UHF Radio Remote Display Brightness"));
AddFunction(new PushButton(this, ARC159, "BIT_TEST", "BIT_TEST", "ARC159", "UHF Radio Remote Display Test", "1", "0", "%1d"));
AddFunction(new PushButton(this, ARC159, "405", "405", "ARC159", "UHF Radio Remote Display Test", "1", "0", "%1d"));
AddFunction(new PushButton(this, ARC159, "405", "405", "ARC159", "UHF Radio Remote Display Test (2)", "1", "0", "%1d"));
AddFunction(new PushButton(this, ARC182, "BIT_TEST", "BIT_TEST", "ARC182", "VHF/UHF Radio Remote Display Test", "1", "0", "%1d"));

#endregion
#region DECM Panel
AddFunction(new Axis(this, DECM, "9950", "9950", 0.1d, 0.0d, 1.0d, "DECM", "DECM ALQ-100 Volume"));
#endregion
#region RWR Control Panel ALR-67
AddFunction(new Axis(this, RWR, "16011", "16011", 0.1d, 0.0d, 1.0d, "RWR", "AN/ALR-67 Display Brightness"));
AddFunction(new Axis(this, RWR, "16011", "16011", 0.1d, 0.0d, 1.0d, "RWR", "AN/ALR-67 Display Brightness (RIO)"));
AddFunction(new Axis(this, RWR, "376", "376", 0.1d, 0.0d, 1.0d, "RWR", "AN/ALR-67 Display Brightness"));
AddFunction(Switch.CreateToggleSwitch(this, RWR, "2139", "2139", "0", "Position 1", "1", "Position 2", "RWR", "AN/ALR-67 Power", "%1d"));
AddFunction(new Axis(this, ICS, "2138", "2138", 0.1d, 0.0d, 1.0d, "ICS", "AN/ALR-67 Volume"));
Expand Down Expand Up @@ -373,8 +373,8 @@ public F14BInterface()
AddFunction(new PushButton(this, WEAPONS, "239", "239", "WEAPONS", "Emergency stores jettison", "1", "0", "%1d"));
AddFunction(new Axis(this, CLOCK, "1051", "1051", 0.1d, 0.0d, 1.0d, "CLOCK", "Clock Wind"));
AddFunction(new PushButton(this, CLOCK, "CLOCK_RESET", "CLOCK_RESET", "CLOCK", "Clock Timer Start/Stop/Reset", "1", "0", "%1d"));
AddFunction(new Axis(this, CLOCK, "1052", "1052", 0.1d, 0.0d, 1.0d, "CLOCK", "Clock Wind"));
AddFunction(new PushButton(this, CLOCK, "1053", "1053", "CLOCK", "Clock Timer Start/Stop/Reset", "1", "0", "%1d"));
AddFunction(new Axis(this, CLOCK, "1052", "1052", 0.1d, 0.0d, 1.0d, "CLOCK", "Clock Wind (2)"));
AddFunction(new PushButton(this, CLOCK, "1053", "1053", "CLOCK", "Clock Timer Start/Stop/Reset (2)", "1", "0", "%1d"));
#endregion
#region RIO TID
AddFunction(new PushButton(this, TID, "226", "226", "TID", "TID Non attack", "1", "0", "%1d"));
Expand Down
4 changes: 2 additions & 2 deletions Helios/Interfaces/DCS/F14B/F14BInterfaceEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<TextBox Grid.Column="1" Grid.Row="4" VerticalAlignment="Top" HorizontalAlignment="Left" Width="40"
MaxWidth="40" Text="{Binding ElementName=F14BPropertiesWindow, Path=Configuration.ExportFrequency}"/>
<TextBlock Grid.Column="1" Grid.Row="5" FontSize="10" FontStyle="Italic" TextWrapping="Wrap">
Number of times per second that intrument guages will be exported per second (min 4).
Number of times per second that instrument guages will be exported per second (min 4).
</TextBlock>
<Label Grid.Column="0" Grid.Row="6" HorizontalAlignment="Right" Content="Phantom Monitor Fix"/>
<CheckBox Grid.Column="1" Grid.Row="6" VerticalAlignment="Center"
Expand Down Expand Up @@ -144,7 +144,7 @@
</StackPanel>
<StackPanel Style="{StaticResource OutOfDateStyle}">
<TextBlock Margin="4" TextWrapping="Wrap">
In order for Helios to interface with DCS F-14B an updated Export.lua file must be installed. This will back up and existing Export.lua file and deploy the necessary Helios configuration.
In order for Helios to interface with DCS F-14B an updated Export.lua file must be installed. This will back up an existing Export.lua file and deploy the necessary Helios configuration.
</TextBlock>
<Button Click="Configure_Click" Grid.Row="1" HorizontalAlignment="Right" Margin="2">Setup DCS F-14B</Button>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion Helios/Interfaces/DCS/F14B/F14BInterfaceEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public F14BInterfaceEditor()
{
InitializeComponent();
Configuration = new DCSConfigurator("DCSF14B", DCSPath);
Configuration.ExportConfigPath = "Config\\Export";
Configuration.ExportConfigPath = "Scripts";
Configuration.ExportFunctionsPath = "pack://application:,,,/Helios;component/Interfaces/DCS/F14B/ExportFunctions.lua";
}

Expand Down
2 changes: 1 addition & 1 deletion Helios/Interfaces/DCS/FA18C/FA18CInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public FA18CInterface()
: base("DCS F/A-18C")
{
DCSConfigurator config = new DCSConfigurator("DCSFA18C", DCSPath);
config.ExportConfigPath = "Config\\Export";
config.ExportConfigPath = "Scripts";
config.ExportFunctionsPath = "pack://application:,,,/Helios;component/Interfaces/DCS/FA18C/ExportFunctions.lua";
Port = config.Port;
_phantomFix = config.PhantomFix;
Expand Down
4 changes: 2 additions & 2 deletions Helios/Interfaces/DCS/FA18C/FA18CInterfaceEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<TextBox Grid.Column="1" Grid.Row="4" VerticalAlignment="Top" HorizontalAlignment="Left" Width="40"
MaxWidth="40" Text="{Binding ElementName=FA18CPropertiesWindow, Path=Configuration.ExportFrequency}"/>
<TextBlock Grid.Column="1" Grid.Row="5" FontSize="10" FontStyle="Italic" TextWrapping="Wrap">
Number of times per second that intrument guages will be exported per second (min 4).
Number of times per second that instrument guages will be exported per second (min 4).
</TextBlock>
<Label Grid.Column="0" Grid.Row="6" HorizontalAlignment="Right" Content="Phantom Monitor Fix"/>
<CheckBox Grid.Column="1" Grid.Row="6" VerticalAlignment="Center"
Expand Down Expand Up @@ -144,7 +144,7 @@
</StackPanel>
<StackPanel Style="{StaticResource OutOfDateStyle}">
<TextBlock Margin="4" TextWrapping="Wrap">
In order for Helios to interface with DCS F/A-18C an updated Export.lua file must be installed. This will back up and existing Export.lua file and deploy the necessary Helios configuration.
In order for Helios to interface with DCS F/A-18C an updated Export.lua file must be installed. This will back up an existing Export.lua file and deploy the necessary Helios configuration.
</TextBlock>
<Button Click="Configure_Click" Grid.Row="1" HorizontalAlignment="Right" Margin="2">Setup DCS F/A-18C</Button>
</StackPanel>
Expand Down
Loading

0 comments on commit c9e3db3

Please sign in to comment.