Skip to content

Commit e7630a8

Browse files
committed
Merge branch 'next'
2 parents e710865 + 276788d commit e7630a8

18 files changed

Lines changed: 330 additions & 145 deletions

File tree

CHANGELOG.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# WASimCommander - Change Log
22

3+
## 1.3.1.0 (29-Nov-2024)
4+
5+
### WASimModule
6+
* Updated reference list of KEY event names for MSFS 2024 SDK v1.0.0 ([e1a0f865]).
7+
8+
### WASimClient
9+
* Key Event ID lookup is now performed locally instead of querying the server. ([e4609257])
10+
* Marked 'B' type (Input Events) variables as "settable." ([e66498b4])
11+
* MSFS 24 apparently has at least some support for using 'B' vars from within RPN calculator code in standalone modules. YMMV.
12+
* Building (not using) the client now requires MSFS 2024 SDK installed.
13+
14+
### WASimUI
15+
* 'B' and 'R' variable types are available in the various variable type selectors for experimentation. ([36e925c4])
16+
* Updated database of imported Event IDs and Simulator Variables from online SDK docs for MSFS 2020 and 2024 as of Nov-25-2024.
17+
* The data now also contains flags indicating if a variable/event is supported in FSX, FS20, & FS24 versions.
18+
19+
**[Full Change Log](https://github.com/mpaperno/WASimCommander/compare/1.3.0.0...1.3.1.0)**
20+
21+
[e1a0f865]: https://github.com/mpaperno/WASimCommander/commit/e1a0f865
22+
[e4609257]: https://github.com/mpaperno/WASimCommander/commit/e4609257
23+
[e66498b4]: https://github.com/mpaperno/WASimCommander/commit/e66498b4
24+
[36e925c4]: https://github.com/mpaperno/WASimCommander/commit/36e925c4
25+
26+
---
327
## 1.3.0.0 (15-Nov-2024)
428

529
### WASimModule
@@ -97,7 +121,7 @@
97121
* Add optional `create` flag and unit name to `VariableRequest()` c'tor overloads.
98122
* Added async option to `saveDataRequest()` which doesn't wait for server response (`saveDataRequestAsync()` for the C# version). ([82ea4252], [0a30646d])
99123
* Added ability to return a string value with `getVariable()` to make use of new WASimModule feature. ([8e75eb8c], [0e54794b])
100-
* The request updates paused state (set with `setDataRequestsPaused()`) is now saved locally even if not connected to server and will be sent to server upon connection and before sending any queued data requests.
124+
* The request updates paused state (set with `setDataRequestsPaused()`) is now saved locally even if not connected to server and will be sent to server upon connection and before sending any queued data requests.
101125
This allows connecting and sending queued requests but suspending any actual value checks until needed. ([bea8bccb])
102126
* The `setVariable()` method now verifies that the specified variable type is settable before sending the command to the server. ([576914a2])
103127
* Removed logged version mismatch warning on Ping response.
@@ -186,7 +210,7 @@ Updates for MSFS 2020 SU10 changes and new event trigger API for sending multipl
186210
* Added Key Event lookup names for new KEY_PROP_FORCE_BETA_* events.
187211
* Added Token variable name lookups for CIRCUIT_NAVCOM4_ON and BREAKER_NAVCOM4.
188212
* Remove usage of deprecated `send_key_event()` for `SendKey` command in favor of `trigger_key_event_EX1()`.
189-
* Module is now built with `/clang:-O1` optimization level (the newly-recommended `O3` level revealed a nasty MSFS memory corruption bug which
213+
* Module is now built with `/clang:-O1` optimization level (the newly-recommended `O3` level revealed a nasty MSFS memory corruption bug which
190214
should be fixed in SU11; I will have an update after SU11 release).
191215

192216
### WASimClient

build/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ if ($LastExitCode -ge 8) { Write-Output($LastExitCode); Exit 1 }
158158
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-net7-$Platform" "${csLibPath}\net7" *.dll *.pdb *.xml *.ini $copyOptions
159159
if ($LastExitCode -ge 8) { Write-Output($LastExitCode); Exit 1 }
160160
# .NET 8 (default Release build)
161-
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-$Platform" "${csLibPath}\net8" *.dll *.pdb *.xml *.ini $copyOptions
161+
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-net8-$Platform" "${csLibPath}\net8" *.dll *.pdb *.xml *.ini $copyOptions
162162
if ($LastExitCode -ge 8) { Write-Output($LastExitCode); Exit 1 }
163163
# .NET Framework
164164
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-netfw-$Platform" "${csLibPath}\net46" *.dll *.pdb *.xml *.ini $copyOptions

build/version.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
$VER_MAJOR = 1
33
$VER_MINOR = 3
4-
$VER_PATCH = 0
4+
$VER_PATCH = 1
55
$VER_BUILD = 0
66
$VER_COMIT = 0
77
$VER_NAME = ""

docs/version.Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# THIS FILE IS GENERATED BY A SCRIPT, CHANGES WILL NOT PERSIST. EDIT THE CORRESPONDING .in TEMPLATE FILE INSTEAD.
44

55
PROJECT_NAME = "WASimCommander"
6-
PROJECT_NUMBER = v1.3.0.0
6+
PROJECT_NUMBER = v1.3.1.0
77
PROJECT_BRIEF = "Remote access to the Microsoft Flight Simulator 2020 Gauge API."

src/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
indent_style=tab
44
indent_size = 2
55
insert_final_newline=true
6+
cpp_include_cleanup_excluded_files = MSFS_EventsEnum.h

src/WASimClient/WASimClient.cpp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,9 @@ prior written authorization from the authors.
2424

2525
#include <chrono>
2626
#include <condition_variable>
27-
#include <cstdio>
2827
#include <cstring>
29-
#include <ctime>
3028
#include <filesystem>
31-
#include <fstream>
32-
#include <future>
29+
#include <functional>
3330
#include <iomanip>
3431
#include <iostream>
3532
#include <list>
@@ -38,6 +35,7 @@ prior written authorization from the authors.
3835
#include <string>
3936
#include <sstream>
4037
#include <thread>
38+
#include <unordered_map>
4139

4240
#define WIN32_LEAN_AND_MEAN
4341
#include <Windows.h>
@@ -46,11 +44,13 @@ prior written authorization from the authors.
4644
#define LOGFAULT_THREAD_NAME WSMCMND_CLIENT_NAME
4745

4846
#include "client/WASimClient.h"
49-
//#include "private/wasimclient_p.h"
5047
#include "utilities.h"
5148
#include "SimConnectHelper.h"
5249
#include "inipp.h"
5350

51+
#include "MSFS_EventsEnum.h" // from MSFS2024_SDK, for key_events.h
52+
#include "key_events.h"
53+
5454
namespace WASimCommander::Client
5555
{
5656

@@ -2004,6 +2004,16 @@ HRESULT WASimClient::list(LookupItemType itemsType)
20042004

20052005
HRESULT WASimClient::lookup(LookupItemType itemType, const std::string &itemName, int32_t *piResult)
20062006
{
2007+
// Short-circuit Key Event ID lookups from local source
2008+
if (itemType == LookupItemType::KeyEventId) {
2009+
const int32_t keyId = Utilities::getKeyEventId(itemName);
2010+
if (keyId < 0)
2011+
LOG_DBG << "Key Event named " << quoted(itemName) << " was not found in local lookup table.";
2012+
else if (!!piResult)
2013+
*piResult = keyId;
2014+
return keyId < 0 ? E_FAIL : S_OK;
2015+
}
2016+
20072017
if (itemName.length() >= STRSZ_CMD) {
20082018
LOG_ERR << "Item name length " << itemName.length() << " is greater then maximum size of " << STRSZ_CMD-1 << " bytes.";
20092019
return E_INVALIDARG;

src/WASimClient/WASimClient.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,29 +79,29 @@
7979
<PropertyGroup Label="UserMacros" />
8080
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
8181
<LinkIncremental>true</LinkIncremental>
82-
<IncludePath>$(ProjectDir);$(SolutionDir)\shared;$(MSFS_SDK)\SimConnect SDK\include;$(IncludePath)</IncludePath>
82+
<IncludePath>$(ProjectDir);$(SolutionDir)\shared;$(MSFS_SDK)SimConnect SDK\include;$(MSFS2024_SDK)WASM\include\MSFS\Types;$(IncludePath)</IncludePath>
8383
<LibraryPath>$(MSFS_SDK)\SimConnect SDK\lib\static;$(LibraryPath)</LibraryPath>
8484
<CopyLocalDeploymentContent>true</CopyLocalDeploymentContent>
8585
<CopyLocalProjectReference>true</CopyLocalProjectReference>
8686
<TargetName>$(ProjectName)_d</TargetName>
8787
</PropertyGroup>
8888
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
8989
<LinkIncremental>false</LinkIncremental>
90-
<IncludePath>$(ProjectDir);$(SolutionDir)\shared;$(MSFS_SDK)\SimConnect SDK\include;$(IncludePath)</IncludePath>
90+
<IncludePath>$(ProjectDir);$(SolutionDir)\shared;$(MSFS_SDK)SimConnect SDK\include;$(MSFS2024_SDK)WASM\include\MSFS\Types;$(IncludePath)</IncludePath>
9191
<LibraryPath>$(MSFS_SDK)\SimConnect SDK\lib\static;$(LibraryPath)</LibraryPath>
9292
<CopyLocalDeploymentContent>true</CopyLocalDeploymentContent>
9393
<CopyLocalProjectReference>true</CopyLocalProjectReference>
9494
</PropertyGroup>
9595
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-DLL|x64'">
9696
<LinkIncremental>false</LinkIncremental>
97-
<IncludePath>$(ProjectDir);$(SolutionDir)\shared;$(MSFS_SDK)\SimConnect SDK\include;$(IncludePath)</IncludePath>
97+
<IncludePath>$(ProjectDir);$(SolutionDir)\shared;$(MSFS_SDK)SimConnect SDK\include;$(MSFS2024_SDK)WASM\include\MSFS\Types;$(IncludePath)</IncludePath>
9898
<LibraryPath>$(MSFS_SDK)\SimConnect SDK\lib\static;$(LibraryPath)</LibraryPath>
9999
<CopyLocalDeploymentContent>true</CopyLocalDeploymentContent>
100100
<CopyLocalProjectReference>true</CopyLocalProjectReference>
101101
</PropertyGroup>
102102
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-DLL|x64'">
103103
<LinkIncremental>false</LinkIncremental>
104-
<IncludePath>$(ProjectDir);$(SolutionDir)\shared;$(MSFS_SDK)\SimConnect SDK\include;$(IncludePath)</IncludePath>
104+
<IncludePath>$(ProjectDir);$(SolutionDir)\shared;$(MSFS_SDK)SimConnect SDK\include;$(MSFS2024_SDK)WASM\include\MSFS\Types;$(IncludePath)</IncludePath>
105105
<LibraryPath>$(MSFS_SDK)\SimConnect SDK\lib\static;$(LibraryPath)</LibraryPath>
106106
<CopyLocalDeploymentContent>true</CopyLocalDeploymentContent>
107107
<CopyLocalProjectReference>true</CopyLocalProjectReference>
@@ -252,10 +252,10 @@
252252
</ItemGroup>
253253
<ItemGroup>
254254
<ClInclude Include="..\include\client\enums.h" />
255+
<ClInclude Include="..\include\client\enums_impl.h" />
255256
<ClInclude Include="..\include\client\exports.h" />
256257
<ClInclude Include="..\include\client\structs.h" />
257258
<ClInclude Include="..\include\client\WASimClient.h" />
258-
<ClInclude Include="..\include\enums.h" />
259259
<ClInclude Include="..\include\enums_impl.h" />
260260
<ClInclude Include="..\include\global.h" />
261261
<ClInclude Include="..\include\WASimCommander.h" />

src/WASimClient_CLI/AssemblyInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ using namespace System::Security::Permissions;
2222
[assembly:AssemblyTrademarkAttribute(L"")];
2323
[assembly:AssemblyCultureAttribute(L"")];
2424

25-
[assembly:AssemblyVersionAttribute(L"1.3.0.0")];
26-
[assembly:AssemblyFileVersionAttribute("1.3.0.0")];
27-
[assembly:AssemblyInformationalVersionAttribute("1.3.0.0")];
25+
[assembly:AssemblyVersionAttribute(L"1.3.1.0")];
26+
[assembly:AssemblyFileVersionAttribute("1.3.1.0")];
27+
[assembly:AssemblyInformationalVersionAttribute("1.3.1.0")];
2828

2929
[assembly:ComVisible(false)];

src/WASimCommander.sln

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client", "client", "{0BFE83
3131
include\client\WASimClient.h = include\client\WASimClient.h
3232
EndProjectSection
3333
EndProject
34-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "private", "private", "{65FBCFE4-F383-4031-BF85-2D33E978AFA0}"
35-
EndProject
36-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "private", "private", "{BF3D1F07-C7B7-466E-B38F-4D504795FB89}"
37-
EndProject
3834
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WASimClient_CLI", "WASimClient_CLI\WASimClient_CLI.vcxproj", "{DAF5B792-C4E6-4E54-9CBF-0A0335E80306}"
3935
EndProject
4036
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Testing", "Testing", "{845BFBCA-6E0D-4938-AA53-BE186FFDEA50}"
@@ -44,6 +40,7 @@ EndProject
4440
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{397C8977-AEB9-4A40-A8AE-392CEF05C289}"
4541
ProjectSection(SolutionItems) = preProject
4642
shared\inipp.h = shared\inipp.h
43+
shared\key_events.h = shared\key_events.h
4744
shared\logfault.h = shared\logfault.h
4845
shared\SimConnectHelper.h = shared\SimConnectHelper.h
4946
shared\SimConnectRequestTracker.h = shared\SimConnectRequestTracker.h
@@ -236,8 +233,6 @@ Global
236233
EndGlobalSection
237234
GlobalSection(NestedProjects) = preSolution
238235
{0BFE8311-11B1-49DE-98C9-3C1F6218AE11} = {7419AC0A-8375-4271-A7D7-0E36309C40A3}
239-
{65FBCFE4-F383-4031-BF85-2D33E978AFA0} = {0BFE8311-11B1-49DE-98C9-3C1F6218AE11}
240-
{BF3D1F07-C7B7-466E-B38F-4D504795FB89} = {7419AC0A-8375-4271-A7D7-0E36309C40A3}
241236
{5B7D7234-D6C8-4D1F-B135-C5297D6476D8} = {845BFBCA-6E0D-4938-AA53-BE186FFDEA50}
242237
{523ABD54-4C1A-4F21-8977-5EFA5821F71D} = {845BFBCA-6E0D-4938-AA53-BE186FFDEA50}
243238
{C6D4303F-E717-4257-990B-2CAE894898A0} = {845BFBCA-6E0D-4938-AA53-BE186FFDEA50}

src/WASimModule/WASimModule.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
<ClInclude Include="..\include\enums.h" />
123123
<ClInclude Include="..\include\global.h" />
124124
<ClInclude Include="..\include\WASimCommander.h" />
125-
<ClInclude Include="key_events.h" />
125+
<ClInclude Include="..\shared\key_events.h" />
126126
<ClInclude Include="token_vars.h" />
127127
</ItemGroup>
128128
<ItemGroup>

0 commit comments

Comments
 (0)