Jump to content
The simFlight Network Forums
Von Rondstadd

PMDG 737 NGX GEAR DOWN, UP, LOCKED QUESTION ??

Recommended Posts

Hi Pete,

I have the PMDG 737 NGX.

I want to use an lever from my Saitek Trottle quadrant for my gear !!

It has to have three positions - gear down - gear up - and gear locked (in the middle).

Is this possible and can you point me in the right direction how to do this??

Kind regards Robert

Share this post


Link to post
Share on other sites

It has to have three positions - gear down - gear up - and gear locked (in the middle).

Is this possible and can you point me in the right direction how to do this??

FS and therefore FSUIPC only supports Gear Up and Gear down. There's an example of exactly how to do that with a lever in the Axis assignments section of the User Guide.

I believe there are special control numbers assigned in the PMDG NGX to get the three positions instead of two. These are documented in the PMDG NGX SDK which was installed for you with their recent update. Let me see ... yes, there are these:

#define EVT_GEAR_LEVER (THIRD_PARTY_EVENT_ID_MIN + 455)

#define EVT_GEAR_LEVER_OFF (THIRD_PARTY_EVENT_ID_MIN + 4551)

#define EVT_GEAR_LEVER_UNLOCK (THIRD_PARTY_EVENT_ID_MIN + 4552)

The "THIRD_PARTY_EVENT_ID_MIN" value is defined as

#define THIRD_PARTY_EVENT_ID_MIN 0x00011000 // equals to 69632

which means their "OFF" control is 69632 + 4551 = 74183. You can send such controls via the Lua "ipc.control" function, so you'd need to make a little plug in and assign to that in the axis assignments, right-hand side -- as per the example for Gear Levers in the User Guide.

An alternative to Lua plug-ins you might find mouse macros work on the gear lever. Judging from another post recently, I think they did on the FS9 PMDG 747.

Examples of both techniques are found in the User Contributions subforum.

Regards

Pete

Share this post


Link to post
Share on other sites

I've created a macro file (.mcro) with the following contents


[macros]
1=NGX_GEAR_up
1.1=C70087, -2147483648
2=NGX_GEAR_off
2.1=C74184, 536870912
2.2=C74184, 131072
3=NGX_GEAR_down
3.1=C70087, 536870912
[/CODE]

You can then assign an axis range to each of these in FSUIPC

I copied the values from the Linda lua files which has been an excellent resource.

regards

Paul

Share this post


Link to post
Share on other sites

I've created a macro file (.mcro) with the following contents


[macros]
1=NGX_GEAR_up
1.1=C70087, -2147483648
2=NGX_GEAR_off
2.1=C74184, 536870912
2.2=C74184, 131072
3=NGX_GEAR_down
3.1=C70087, 536870912
[/CODE]

Interesting. The NGX SDK lists C74184 as "[color=#0000ff]EVT_GEAR_LEVER_UNLOCK"[/color]. Maybe that's why you need to send two of them with different parameters?

Might be interesting to try just a single [b][color=#0000ff]C74183[/color][/b] for the "gear off" position.

The parameter values are a little difficult to understand written in decimal too. If I use hexadecimal instead they don't look so bad:

[b][macros]

1=NGX_GEAR_up

1.1=C70087, x80000000

2=NGX_GEAR_off

2.1=C74184, x20000000

2.2=C74184, x00020000

3=NGX_GEAR_down

3.1=C70087, x20000000[/b]

According to the SDK, those single-bit values correspond to mouse actions, so:

[color=#0000ff]#define MOUSE_FLAG_RIGHTSINGLE 0x80000000

#define MOUSE_FLAG_LEFTSINGLE 0x20000000

#define MOUSE_FLAG_DOWN_REPEAT 0x00200000[/color]

There's not exactly a lot of explanation given in the SDK for the use of these mouse flags.

Regards

Pete

Share this post


Link to post
Share on other sites

thanks Pete,

These are pre-SDK, found by logging and trial and error by the Linda team. Now that the SDK is available I'm sure quite a lot of tidying up can be done. I agree, hex values are much better.

Paul

Share this post


Link to post
Share on other sites

I had the same problem, and was a little bit confused by the values from MAIN_GearLever variable // 0: UP 1: OFF 2: DOWN

the reply from a pmdg support ticket was:

"He is right that the MAIN_GearLever variable has 3 possible values,

0=up, 1=off, 2=down..

This variable is converted from the actual gear lever animation step,

which has much more intermediate positions. When he tries to set gear

lever to a "direct" position like 0..1..2, nothing useful happens

because this is interpreted as an animation step, not "up - off - down".

He should try using mouse click simulation instead, i.e. pass

MOUSE_FLAG_LEFTSINGLE or MOUSE_FLAG_RIGHTSINGLE instead of 0, 1, 2. This

is described in the SDK docs. Send EVT_GEAR_LEVER with a left- or

right-click parameter to move lever to UP or DOWN, and send

EVT_GEAR_LEVER_OFF with a left-click parameter to move it to OFF."

Works like a charm.

HTH,

Johan

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.