June 17, 201510 yr Hey guys, I'm currently working on my B738 home made cockpit based on the PMDG 737 NGXI already have a lot of controls working, but i'm currently stuck with the gear.It's frustrating due the lack of documentation but playing a bit with values I managed to make the gear move to the UP position SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_GEAR_LEVER,-1, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); and hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_GEAR_LEVER, "#70087"); That worked, however I'm unable to make the gear to go down, tried almost any value and it only seems to work with -1 and it makes it to go up.In the PMDG_NGX_SDK.h file the MAIN_GearLever variable is commented as // 0: UP 1: OFF 2: DOWN So I tried to directly change its value, didn't work either, I guess it is read-only. Any idea how can achieve this? Thanks in advance.
June 20, 201510 yr Author Never found a fix so I just hardcoded this by simulating a "G" keystroke, which switch the gear up/down
July 31, 201510 yr Commercial Member Hi, here is my lines for Gear handling 2447 GEAR_LEVER 2448 GEAR_LEVER_OFF 2449 GEAR_LEVER_UNLOCK if (var == 2447) { if (val == 1) { SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_GEAR_LEVER, MOUSE_FLAG_RIGHTSINGLE, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); return match; } } if (var == 2448) { if (val == 1) { SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_GEAR_LEVER, MOUSE_FLAG_LEFTSINGLE, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); return match; } } if (var == 2449) { if (val == 1) { SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_GEAR_LEVER, MOUSE_FLAG_LEFTSINGLE, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); return match; } } Roar Kristensen www.flightsim4fun.com P3Dv4 with Opencockpits hardware controlled by OC4BAv4 for immersive PMDG B737/777/747 flying XPLANE 11 with Opencockpits hardware controlled by OC4BA_XP for immersive B737 flying
Create an account or sign in to comment