Skip to content

Change add client response and correct area ids#5

Merged
DocMoebiuz merged 1 commit intoMobiFlight:mainfrom
Koseng:NewClientResponse
Apr 3, 2022
Merged

Change add client response and correct area ids#5
DocMoebiuz merged 1 commit intoMobiFlight:mainfrom
Koseng:NewClientResponse

Conversation

@Koseng
Copy link
Collaborator

@Koseng Koseng commented Mar 5, 2022

Simplify response when adding a new client. The client does not need to know the WASM internal used IDs for the ClientDataAreas.

Old Response:
{"Name": "MyGreatClient", "SimVars": 3, "Command": 4, "Response": 5}

New Response:
MF.Clients.Add.MyGreatClient.Finished


Change default DataAreaIDs for Mobiflight ClientDataAreas back to the original values. (In the end it doesn't matter, the IDs don't need to be the same on WASM and on external SimConnect client side).

Now in the PR:
SimVar = 0
Command = 1 (SimVar+1)
Response = 2 (Command+1)

Before it was by mistake:
SimVar = 0
Command = 2
Response = 1

Attached debug wasm
MobiFlightWasmModule.zip
.

@DocMoebiuz DocMoebiuz merged commit fe692e9 into MobiFlight:main Apr 3, 2022
@cpuwolf
Copy link
Contributor

cpuwolf commented Apr 25, 2022

That is great. The client does not need to know the WASM internal used IDs

@Koseng
Copy link
Collaborator Author

Koseng commented Apr 25, 2022

Hi yes,
the relevant identifiers across different simconnect clients in regard to DataAreas is the string identifier.
The mapped numeric ids are only a local optimization on each client and do not matter across clients.
Slowly discovering the wonders of simconnect...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants