June 3, 201214 yr Hi everyone, Working on interfacing my phidget and pokeys cards to work with NGX. MIP is soon finished but I have some problems with the afds annunciators and gear lever. My problem with afds annunciators is that I cannot determine if the annunciator is red or yellow. No matter how I look in the array it reports the same for both red and yellow. How can I get info from the SDK if the annunciators is red or yellow? And my problem with the gear lever is that nothing happens with the gear lever event. No problem at all with the other switches but gear lever just won't work. If anyone can point me in the right direction I would be very happy! Thanks a lot guys! Regards, Anders
June 3, 201214 yr I don't know about the afds but I also struggled with the gear lever. In the SDK it's not always easy to understand how to control things, like what parameters to set and what they will do, or if the control event should be regarded as a lever etc. I tried pretty much all combinations of setting EVT_GEAR_LEVER, EVT_GEAR_LEVER_OFF, EVT_GEAR_LEVER_UNLOCK with various results. I finally settled with emulated mouse clicks. I'm sure there must be a prettier way to do it but it seems to work. Gear UP: SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_GEAR_LEVER, MOUSE_FLAG_RIGHTSINGLE,SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); Gear OFF (when currently set to UP): SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_GEAR_OFF, MOUSE_FLAG_LEFTSINGLE,SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); Gear DOWN (regardless if the lever is in UP or OFF position): SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_GEAR_LEVER, MOUSE_FLAG_LEFTSINGLE,SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); Sleep(300); SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_GEAR_LEVER, MOUSE_FLAG_LEFTSINGLE,SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); EVENT_GEAR_LEVER is mapped to EVT_GEAR_LEVER and EVENT_GEAR_OFF is mapped to EVT_GEAR_LEVER_OFF via SimConnect_MapClientEventToSimEvent.
June 3, 201214 yr Author Thank you very much for the tip! Will try that until PMDG will fix the lever..must be something wrong in the SDK. Regards, Anders
Create an account or sign in to comment