Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NGX SDK, can't set the gear down

Featured Replies

Hey guys, I'm currently working on my B738 home made cockpit based on the PMDG 737 NGX

I 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.

  • Author

Never found a fix so I just hardcoded this by simulating a "G" keystroke, which switch the gear up/down

  • 1 month later...
  • 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

rmMShli.jpg?1 WylQl0J.jpg?3

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.