Skip to content

Commit

Permalink
Merge pull request #241 from calibx/develop
Browse files Browse the repository at this point in the history
3.0.0
  • Loading branch information
calibx committed Feb 29, 2024
2 parents edc85b5 + 00ea7cc commit 45a0554
Show file tree
Hide file tree
Showing 84 changed files with 19,238 additions and 2,269 deletions.
59 changes: 58 additions & 1 deletion MsfsPlugin/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ csharp_prefer_static_local_function = false:warning
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async

# Code-block preferences
csharp_prefer_braces = true:warning
csharp_prefer_braces = when_multiline:warning
csharp_prefer_simple_using_statement = false:warning

# Expression-level preferences
Expand Down Expand Up @@ -204,3 +204,60 @@ dotnet_diagnostic.CA1060.severity = none
dotnet_diagnostic.CA2101.severity = none

dotnet_diagnostic.IDE0058.severity = none
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
csharp_style_prefer_tuple_swap = true:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_prefer_readonly_struct = true:suggestion
csharp_style_prefer_readonly_struct_member = true:suggestion
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
csharp_style_prefer_switch_expression = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_extended_property_pattern = true:suggestion

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_coalesce_expression = true:warning
dotnet_style_null_propagation = true:warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
dotnet_style_prefer_auto_properties = true:warning
dotnet_style_object_initializer = false:suggestion
dotnet_style_prefer_collection_expression = true:suggestion
dotnet_style_collection_initializer = true:warning
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:warning
dotnet_style_prefer_conditional_expression_over_return = true:warning
dotnet_style_explicit_tuple_names = true:warning
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:warning
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_readonly_field = true:warning
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
dotnet_code_quality_unused_parameters = all:warning
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:warning
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:warning
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_property = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_event = false:warning
Binary file not shown.
10 changes: 1 addition & 9 deletions MsfsPlugin/MsfsPlugin/MsfsApplication.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
namespace Loupedeck.MsfsPlugin
{
using System;

public class MSFSApplication : ClientApplication
{
public MSFSApplication()
{

}

protected override String GetProcessName() => "FlightSimulator";

protected override string GetProcessName() => "FlightSimulator";
}
}
23 changes: 10 additions & 13 deletions MsfsPlugin/MsfsPlugin/MsfsPlugin.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
namespace Loupedeck.MsfsPlugin
{
using System;

using Loupedeck.MsfsPlugin.msfs;
public class MSFSPlugin : Plugin
{
public override void Load()
{
this.Info.Icon16x16 = EmbeddedResources.ReadImage("Loupedeck.MsfsPlugin.Resources.16.png");
this.Info.Icon32x32 = EmbeddedResources.ReadImage("Loupedeck.MsfsPlugin.Resources.32.png");
this.Info.Icon48x48 = EmbeddedResources.ReadImage("Loupedeck.MsfsPlugin.Resources.48.png");
this.Info.Icon256x256 = EmbeddedResources.ReadImage("Loupedeck.MsfsPlugin.Resources.256.png");
Info.Icon16x16 = EmbeddedResources.ReadImage("Loupedeck.MsfsPlugin.Resources.16.png");
Info.Icon32x32 = EmbeddedResources.ReadImage("Loupedeck.MsfsPlugin.Resources.32.png");
Info.Icon48x48 = EmbeddedResources.ReadImage("Loupedeck.MsfsPlugin.Resources.48.png");
Info.Icon256x256 = EmbeddedResources.ReadImage("Loupedeck.MsfsPlugin.Resources.256.png");
MsfsData.Instance.plugin = this;
DataTransferOut.loadEvents();
}

public override void Unload()
Expand All @@ -20,14 +19,12 @@ public override void Unload()
}


public override void RunCommand(String commandName, String parameter)
{
public override void RunCommand(string commandName, string parameter)
{ }

}
public override void ApplyAdjustment(string adjustmentName, string parameter, int diff)
{ }

public override void ApplyAdjustment(String adjustmentName, String parameter, Int32 diff)
{
}
public override Boolean UsesApplicationApiOnly => true;
public override bool UsesApplicationApiOnly => true;
}
}
45 changes: 42 additions & 3 deletions MsfsPlugin/MsfsPlugin/MsfsPlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit3TestAdapter.4.5.0\build\net462\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.4.5.0\build\net462\NUnit3TestAdapter.props')" />
<Import Project="..\packages\NUnit.4.0.1\build\NUnit.props" Condition="Exists('..\packages\NUnit.4.0.1\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -49,6 +51,12 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\MSFS SDK\SimConnect SDK\lib\managed\Microsoft.FlightSimulator.SimConnect.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=4.0.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.4.0.1\lib\net462\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunit.framework.legacy, Version=4.0.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.4.0.1\lib\net462\nunit.framework.legacy.dll</HintPath>
</Reference>
<Reference Include="PluginApi, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Loupedeck\Loupedeck2\PluginApi.dll</HintPath>
Expand All @@ -62,9 +70,10 @@
<ItemGroup>
<Compile Include="encoder\SimRateEncoder.cs" />
<Compile Include="encoder\BarometerEncoder.cs" />
<Compile Include="encoder\VorObiEncoder.cs" />
<Compile Include="encoder\VSpeedAPEncoder.cs" />
<Compile Include="encoder\SpeedAPEncoder.cs" />
<Compile Include="encoder\HeadignAPEncoder.cs" />
<Compile Include="encoder\HeadingAPEncoder.cs" />
<Compile Include="encoder\ElevatorTrimEncoder.cs" />
<Compile Include="encoder\DefaultEncoder.cs" />
<Compile Include="encoder\AltitudeAPEncoder.cs" />
Expand All @@ -77,23 +86,29 @@
<Compile Include="encoder\SpoilerEncoder.cs" />
<Compile Include="event\Binding.cs" />
<Compile Include="event\BindingKeys.cs" />
<Compile Include="event\Notifiable.cs" />
<Compile Include="event\INotifiable.cs" />
<Compile Include="folder\AirlinerDynamicFolder.cs" />
<Compile Include="folder\APDynamicFolder.cs" />
<Compile Include="folder\ATCDynamicFolder.cs" />
<Compile Include="folder\CockpitViewFolder.cs" />
<Compile Include="folder\DefaultFolder.cs" />
<Compile Include="folder\NavDynamicSFolder.cs" />
<Compile Include="folder\NavDynamicFolder.cs" />
<Compile Include="folder\ComDynamicSFolder.cs" />
<Compile Include="folder\ComDynamicFolder.cs" />
<Compile Include="folder\LightsDynamicFolder.cs" />
<Compile Include="input\ap\APMultiInputs.cs" />
<Compile Include="input\debug\MobiflightCnxStateInput.cs" />
<Compile Include="input\debug\SimCnxStateInput.cs" />
<Compile Include="input\debug\DebugInput.cs" />
<Compile Include="input\debug\AircraftInput.cs" />
<Compile Include="input\light\LightsDisplay.cs" />
<Compile Include="input\light\LightsMultiInputs.cs" />
<Compile Include="input\misc\AutoTaxiInput.cs" />
<Compile Include="input\misc\IconInput.cs" />
<Compile Include="input\misc\GearInput.cs" />
<Compile Include="input\misc\EngineInput.cs" />
<Compile Include="input\misc\MiscInput.cs" />
<Compile Include="input\misc\ParkingBrakeInput.cs" />
<Compile Include="input\DefaultInput.cs" />
<Compile Include="input\misc\FuelDisplay.cs" />
Expand All @@ -104,9 +119,20 @@
<Compile Include="input\misc\RPMInput.cs" />
<Compile Include="input\misc\PitotInput.cs" />
<Compile Include="input\nav\AltitudeInput.cs" />
<Compile Include="input\misc\WeatherDisplay.cs" />
<Compile Include="input\nav\VerticalSpeedInput.cs" />
<Compile Include="input\nav\SpeedInput.cs" />
<Compile Include="input\nav\HeadingInput.cs" />
<Compile Include="msfs\DataTransferIn.cs" />
<Compile Include="msfs\DataTransferOut.cs" />
<Compile Include="msfs\DataTransferTypes.cs" />
<Compile Include="msfs\mobi\FSUIPCOffsetType.cs" />
<Compile Include="msfs\mobi\Log.cs" />
<Compile Include="msfs\mobi\ProgressUpdateEvent.cs" />
<Compile Include="msfs\mobi\SimConnectCache.cs" />
<Compile Include="msfs\mobi\SimConnectDefinitions.cs" />
<Compile Include="msfs\mobi\WasmModuleClient.cs" />
<Compile Include="msfs\mobi\WasmModuleClientData.cs" />
<Compile Include="msfs\SimConnectDAO.cs" />
<Compile Include="msfs\MsfsData.cs" />
<Compile Include="Properties\Resources.Designer.cs">
Expand All @@ -115,10 +141,13 @@
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="tools\DebugTracing.cs" />
<Compile Include="tools\DecimalValueAdjuster.cs" />
<Compile Include="tools\ImageTool.cs" />
<Compile Include="tools\ConvertTool.cs" />
<Compile Include="MSFSApplication.cs" />
<Compile Include="MSFSPlugin.cs" />
<Compile Include="Unittests\ConvertToolTest.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="PluginConfiguration.json" />
Expand All @@ -132,13 +161,15 @@
<EmbeddedResource Include="Resources\DefaultProfile30win.lp4" />
<EmbeddedResource Include="Resources\DefaultProfile40win.lp4" />
<EmbeddedResource Include="Resources\DefaultProfile50win.lp4" />
<None Include="packages.config" />
<None Include="Resources\LoupedeckPackageRazor.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Resources\LoupedeckPackage.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<EmbeddedResource Include="Resources\DefaultProfile20win.lp4" />
<EmbeddedResource Include="Resources\msfs2020_eventids.cip" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\off.png" />
Expand Down Expand Up @@ -204,7 +235,7 @@
<PostBuildEvent>$(ILMergeConsolePath) /out:$(OutDir)/bin/win/MSFSPlugin.dll $(OutDir)MSFSPlugin.dll $(OutDir)fsuipcClient.dll</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>xcopy "C:\MSFS SDK\SimConnect SDK\lib\SimConnect.dll" "." /Y
<PostBuildEvent>xcopy "%25MSFS_SDK%25SimConnect SDK\lib\SimConnect.dll" "." /Y
if $(ConfigurationName) == Release (
powershell Remove-Item 'archive' -Recurse -Force
powershell New-Item -Path 'archive\bin\win' -ItemType Directory -Force
Expand All @@ -222,6 +253,14 @@ if $(ConfigurationName) == Release (
powershell Copy-Item 'MSFSPlugin.dll' -Destination '%25USERPROFILE%25\AppData\Local\Loupedeck\Plugins\MSFS'
powershell Copy-Item 'Microsoft.FlightSimulator.SimConnect.dll' -Destination '%25USERPROFILE%25\AppData\Local\Loupedeck\Plugins\MSFS'
powershell Copy-Item 'SimConnect.dll' -Destination '%25USERPROFILE%25\AppData\Local\Loupedeck\Plugins\MSFS'

)</PostBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.4.0.1\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.4.0.1\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.4.5.0\build\net462\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.4.5.0\build\net462\NUnit3TestAdapter.props'))" />
</Target>
</Project>
3 changes: 2 additions & 1 deletion MsfsPlugin/MsfsPlugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("4.3.0.7478")]
[assembly: AssemblyVersion("2.4.0")]
[assembly: AssemblyVersion("3.0.0.0")]

2 changes: 1 addition & 1 deletion MsfsPlugin/MsfsPlugin/Resources/LoupedeckPackage.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type: plugin4
name: MSFS
displayName: Microsoft Flight Simulator
version: 2.4.0
version: 3.0.0
author: CaliBx
copyright: CaliBx

Expand Down
2 changes: 1 addition & 1 deletion MsfsPlugin/MsfsPlugin/Resources/LoupedeckPackageRazor.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type: plugin4
name: MSFS
displayName: Microsoft Flight Simulator
version: 2.4.0
version: 3.0.0
author: CaliBx
copyright: CaliBx

Expand Down
Loading

0 comments on commit 45a0554

Please sign in to comment.