Skip to content

Fix SimConnect_AddToDataDefinition to change default datumType to 4 and datumId to 0xFFFFFFFF#8

Merged
AussieScorcher merged 1 commit intostopbars:mainfrom
bstudtma:fix-SimConnect_AddToDataDefinition
Aug 24, 2025
Merged

Fix SimConnect_AddToDataDefinition to change default datumType to 4 and datumId to 0xFFFFFFFF#8
AussieScorcher merged 1 commit intostopbars:mainfrom
bstudtma:fix-SimConnect_AddToDataDefinition

Conversation

@bstudtma
Copy link
Copy Markdown
Contributor

@bstudtma bstudtma commented Aug 24, 2025

Fixed defaults for SimConnect_AddToDataDefinition

Summary

Fixed defaults so to allow multiple AddToDataDefinition

Before this changed, multiple calls to AddToDataDefinition would overwrite each other even if for a different var. This fix will allow multiple vars for a single definition.

Changes Made

Synced defaults with C:\MSFS 2024 SDK\SimConnect SDK\include\SimConnect.h

Additional Information

This is blocking a feature branch I'm working on to allow dynamic structures.

Author Information

Discord Username: bstudtma


Checklist:

  • [ x] Have you followed the guidelines in our Contributing document?
  • [ x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Fixed defaults for SimConnect_AddToDataDefinition
Copilot AI review requested due to automatic review settings August 24, 2025 12:43
@bstudtma
Copy link
Copy Markdown
Contributor Author

This is needed for a bigger change I was working on... which you can check out here:

https://github.com/bstudtma/SimConnect.NET/blob/add-dynamic-structures/MyApp/Program.cs

Was trying to add support for getting structures dynamically and ran into this bug. The bug causes a single var to be returned even if multiple were added to the definition.

@AussieScorcher AussieScorcher merged commit 22e892d into stopbars:main Aug 24, 2025
2 checks passed
@bstudtma bstudtma deleted the fix-SimConnect_AddToDataDefinition branch August 24, 2025 13:21
@bstudtma bstudtma review requested due to automatic review settings March 23, 2026 22:50
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.

2 participants