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.

1) In gauges.h I have declared the new events:
Code:// Third parties can use custom events in this range to communicate between 3D VC's and 2D C++ gauges. #define THIRD_PARTY_EVENT_ID_MIN 0x00011000 #define THIRD_PARTY_EVENT_ID_MAX 0x0001FFFF // Third party events const int KEY_PHI_MODE_INC = 0x11000; const int KEY_PHI_MODE_DEC = 0x11001;
Code:// GAUGE_KEY_EVENT_HANDLER static void FSAPI EventHandler(ID32 event, UINT32 evdata, PVOID userdata) { switch(event) { case KEY_NULL : break; case KEY_PHI_MODE_INC: HomingState++; if(HomingState>4) HomingState=0; break; case KEY_PHI_MODE_DEC: HomingState--; if(HomingState<0) HomingState=4; break; default: break; } }
@Tom
So if i understand correctly, the K: part == KEY_ in the gauges.h and EVENT_ANY == the remaining characters of KEY_EVENT_ANY?
In this thread, Post #13, Virtuali "suggests" that what we're attempting, i.e., using the (>K:0x11000) method, should work:
http://www.fsdeveloper.com/forum/showthread.php?t=20738&postcount=13
Sadly though, even after someone commented that "it doesn't work" Virtuali never replied to that observation...![]()

Yes, at first sight seems pretty logical that it should work, unless you know how it is internally managed.![]()
Tom
Ok so where can i find this events class that so i can use left/right click to trigger my event?
Just to be crystal... it's supposed to work. It's documented in the SDK as supported in that manner. So... snarky replies aside... it's not unreasonable to expect it to function as documented. Logic has nothing to do with it.


typedef void (*GAUGE_KEY_EVENT_HANDLER) (ID32 event, UINT32 evdata, PVOID userdata);
void FSAPI MyEventHandler(ID32 eventID, UINT32 evdata, PVOID userdata)
{
switch (eventID)
{
case 0x11000:
// do something with evdata
switch (evdata)
{
case 0:
// do something
break;
}
break;
}
}
<EventID>0x11000</EventID>

Lol!
Anyways....You guys are considerably more experienced than i am....Now that this method has been screwed do you have any other ideas for handling this? Maybe something like a mdl parser or something like that.....


I see what you are suggesting, Tom.
The C gauge can monitor for change in a custom L:var, such as:
(L:18152,enum)
then generate a C event such as
send_key_event(0x18152,enum)
where enum is the value to be passed after evaluating (L:18152,enum)
It is this latter that would be passed along the m-p connection to the remote a/c's C gauge, and acted on locally.
const int AC_SWITCH = 70000;
[I]void FSAPI EventHandler(ID32 event, UINT32 evdata, PVOID userdata)
{
switch(event)
{
case AC_SWITCH:
switch (evdata)
{
case 0:
break;
case 1:
break;
case 2:
break;
etc etc
[/I]
