- Messages
- 2,168
- Country

As long as you're ok with people being able to take your code without permission. Sure.IMHO if your gauge can be written in html/js, you'll be better off getting up to speed with the new framework the clinging to C++.
Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.
By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

As long as you're ok with people being able to take your code without permission. Sure.IMHO if your gauge can be written in html/js, you'll be better off getting up to speed with the new framework the clinging to C++.

I thought there was a way to encrypt the JS code, am I wrong?As long as you're ok with people being able to take your code without permission. Sure.

nice...As long as you're ok with people being able to take your code without permission. Sure.


you need to change accordingly to get FSX work in MSFS, see careful in SDK sample, you will notice slight different on "EventHandler" between FSX and MSFS. the code inside Eventhandler still same schema as FSXThank you for the detailed example & walkthrough! This is fantastic & answers my question about overriding events.
Sorry to go back to event triggers, another useage issue - In my test I'm just working with the gauge API, here is a simple extract of my useage (so far MYEVENT_DOOR is called succesfully upon clicking the door handle). As you can see sim events work fine but no luck passing in my custom event ID
Code:const int MYEVENT_DOOR{ 0x11011 }; const int MYEVENT_TEST{ 0x11010 }; static void FSAPI EventHandler(ID32 event, UINT32 evdata, PVOID userdata) { printf("Event Handler called\n"); switch (event) { case MYEVENT_TEST: printf("Test event called\n"); case MYEVENT_DOOR: printf("Success! Door event called \n"); //trigger_key_event(KEY_TOGGLE_NAV_LIGHTS, 1); //This works, toggles the nav lights on/off //trigger_key_event(MYEVENT_TEST, 1); //This does not work break; default: printf("Default called\n"); break; } }
Is this invalid? I thought maybe calling a custom event inside the handler might not be allowed, however putting the trigger_key_event call inside the pre_update loop also did not work. Once I resolve this I will begin exploring SimConnect more thoroughly with your example
Cheers

Thanks guys for all the clarifications; after studying the Simconnect samples it's all making sense now.
One final question I have; in the docs it says I can build SimConnect modules as a Web Assembly Module by simply including SimConnect.h in the WASM project. In practice however, if I make a new project configured as a WASM project, my VS does not find or recognize the <windows.h> include, breaking most of the SimConnect functionality. If I follow the steps to make a new SimConnect project however (using the provided property sheet) it of course works fine, but obviously there's no access to the panel SDK.
Could I make this work by tweaking the includes/dependencies or are they simply not designed to be used together in the same solution/project?
In the docs it states "WebAssembly modules can use SimConnect internally, provided as part of the SDK. It is only required to inlcude "simconnect.h"." But I've seen threads about how to access LVARS from SimConnect, and it didn't look as simple as being able to call from both API in the same project. Can anyone confirm?
