You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix for #8
- Added new client data zone for string data
- SimConnect now properly loads the string data from the var
- Data is properly stored in the new data zone
* Improved functionality of string SimVars
* Increased string data area size to maximum
* write SimVar when string-value has changed
* added some debug output
* fixed some compiler warnings
* Separated handling for "regular" float SimVars and
"new" string SimVars
* Added AddString command to readme
* Review changes:
* Refactoring RegisterSimVar function into two separate functions. One for floats, one for strings
* Removing first WriteSimVar function call when registering a simvar
* Removing unused variables
---------
Co-authored-by: Roderick Griffioen <[email protected]>
The "SimVars.Add." command needs to be extended with a gauge calculator scipt for reading a variable, like shown in the table. Each added variable needs 4 reserved bytes to return its float value in the LVars channel. The bytes are allocated in the order of the LVars being added. The first variable starts at offset 0, the second at offset 4, the third at offset 8 and so on. To access each value, the external SimConnect clients needs a unique DataDefinitionId for each memory segment. It is recommended to start with ID 1000.
38
+
The "SimVars.Add." command needs to be extended with a gauge calculator script for reading a variable, like shown in the table. Each added variable needs 4 reserved bytes to return its float value in the LVars channel. The bytes are allocated in the order of the LVars being added. The first variable starts at offset 0, the second at offset 4, the third at offset 8 and so on. To access each value, the external SimConnect clients needs a unique DataDefinitionId for each memory segment. It is recommended to start with ID 1000.
38
39
39
40

40
41
42
+
**MF.SimVars.AddString.**
43
+
The "SimVars.AddString." command works similar to the "SimVars.Add." command but the string result of the gauge calculator script is used. The size of a single string can be up to 128 bytes, which allows handling a total of 64 string variables. The first variable starts at offset 0, the second at offset 128, the third at offset 256 and so on. To access each value, the external SimConnect clients needs a unique DataDefinitionId for each memory segment. It is recommended to start with ID 10000.
44
+
41
45
**MF.Clients.Add.**
42
46
The default channels are reserved for communication with the MobiFlight client. But they can be used to request additional channels for other SimConnect clients as well. If another client wants to use the WASM module for variable access, it can register itself with the command ```MF.Clients.Add.MyClientName``` using the default command channel. The WASM module then creates the new shared memory channels "MyClientName.LVars", "MyClientName.Command", "MyClientName.Response" and informs the client with ```MF.Clients.Add.ClientName.Finished```.
0 commit comments