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.

PMDG 777 Flaps with Stream deck

Featured Replies

Hi folks, very new to all this scripting stuff, so used to downloading the scripts created by smarter guys than me (much appreciated by the way) but I have been unable to find anything to control the flaps on the PMDG 777 with my stream deck. I know I can map the flaps to my joystick and I have but I have problems with my hands and find it difficult to hit the buttons to lower and raise the flaps, thus the need for a button or buttons on my stream deck to use the flaps. I have already downloaded the fantastic profile and scrips by Guenseli from Flightsim.to (once again many thanks). However it does not contain a way to control the flaps, therefore I have decided to try create some extra buttons on my stream deck using AAO scripts but for the life of me I cant work out how to go about it , 

I have used AAO watch simulator events and got the info from there eg for flaps 1 position it came back 507204(>K:ROTOR BRAKE) and obviously increasing or decreasing ID numbers depending on flap position. So I tried to create a script using this information however no luck so far. I then looked in the PMDG SDK and found this.

#define EVT_CONTROL_STAND_FLAPS_LEVER                    (THIRD_PARTY_EVENT_ID_MIN + 507)            
#define EVT_CONTROL_STAND_FLAPS_LEVER_0                    (THIRD_PARTY_EVENT_ID_MIN + 5071)
#define EVT_CONTROL_STAND_FLAPS_LEVER_1                    (THIRD_PARTY_EVENT_ID_MIN + 5072)
#define EVT_CONTROL_STAND_FLAPS_LEVER_5                    (THIRD_PARTY_EVENT_ID_MIN + 5073)
#define EVT_CONTROL_STAND_FLAPS_LEVER_15                (THIRD_PARTY_EVENT_ID_MIN + 5074)
#define EVT_CONTROL_STAND_FLAPS_LEVER_20                (THIRD_PARTY_EVENT_ID_MIN + 5075)
#define EVT_CONTROL_STAND_FLAPS_LEVER_25                (THIRD_PARTY_EVENT_ID_MIN + 5076)
#define EVT_CONTROL_STAND_FLAPS_LEVER_30                (THIRD_PARTY_EVENT_ID_MIN + 5077)

Now I`m totally confused which method should i be using ROTOR BRAKE  or is it an EVENT? and why are the numbers different to those returned when using watch simulator events previously, I`m assuming it has something to do with the ID_MIN part and some calculation is being done to differentiate the different flap positions. I would really appreciate any help that you can give to solve my problem. Help with the syntax of a script to do this would be a god send lol.

TIA

Dale

  • Commercial Member
26 minutes ago, sharky44 said:

Now I`m totally confused which method should i be using ROTOR BRAKE  or is it an EVENT?

The EVENTS are the PMDG SDK default, that is what they recommend that you should use. The ROTOR_BRAKE codes are a work-around, derived from their behavior (=animation) logic. 

You can use both. The 777s SDK seems to be "in flux" still, so I would recommend sticking to the ROTOR_BRAKE for the time being. Otherwise the SDK events would be the first choice. They are in the AAO lists too, so you don't have to calculate the actual event ID.
The values that are sent to these events are derived from the mouse actions.

Here is what this looks like for flaps up / flaps down

50707 (>K:ROTOR_BRAKE)
and
50708 (>K:ROTOR_BRAKE)

or using the SDK events
16384·(>K:#70139)
and
8192·(>K:#70139)

[70139 is the result of THIRD_PARTY_EVENT_ID_MIN + 507)

Edited by Lorby_SI

LORBY-SI

  • Author

Thanks for the info, still a bit confused with the numbers on SDK events side of things but I`ll try out the ROTOR_BRAKE method first. Can I just clarify some things with you . The example you gave for flapsup/flapsdown

50707 (>K:ROTOR_BRAKE)

and

50708 (>K:ROTOR_BRAKE)

Will move the flaps to full down or full up? Or do they increment/decrement them?

Could I for example, for flaps 0 and flaps 1 use

507103 (>K:ROTOR_BRAKE)

and

507204 (>K:ROTOR_BRAKE)

I ask as those numbers were what appeared when I used watch simulator events.Also you mention AAO lists , which lists were you referring to? . I do apologise if I`m coming across as dim lol. I do appreciate your help.

  • Commercial Member
1 hour ago, sharky44 said:

Or do they increment/decrement them?

You could just try them, then you know... 🙂

Those are the up/down increments. Seemed logical for a StreamDeck profile?

1 hour ago, sharky44 said:

I ask as those numbers were what appeared when I used watch simulator events

Not really. The numbers passed through to the ROTOR_BRAKE are the mouse events that are performed on the lever. Mine are mouse wheel up and down.
The value is calculated from the ID of the control/lever/button plus a number between 1 and 9 for the mouse action. 

But. Aren't the default MSFS flaps events working in a PMDG plane?
Edit: they are. From my point of view there is no need for any ROTOR_BRAKE codes or the PMDG SDK in this case
1·(>K:FLAPS_DOWN)
1·(>K:FLAPS_UP)
Fully extend or retract the flaps.

1·(>K:FLAPS_INCR)
1·(>K:FLAPS_DECR)
Move the lever one notch at a time

On the StreamDeck you simply select Type "K:" and then type/copy&paste "FLAPS_DOWN" into the box. Set Event Value to 0 or 1, do not leave it empty. Repeat for the others as required.

 

1 hour ago, sharky44 said:

Also you mention AAO lists , which lists were you referring to?

While working on the StreamDeck, open the Script Editor in AAO. Press "Insert sim event". The dialog that appears is the list that I mean (=the same one that you get everywhere, for example when assigning buttons). Same for "Insert sim var".
Both lists can be flitered. Just enter the term you are looking for, like "flap" into the box and press "apply".  Left click-Right click on an event/variable to copy the name into the Windows clipboard, then you can insert it elsewhere with Ctrl&V

The script editor is also the place to try out my code from above, using the "Test" button.

Edited by Lorby_SI

LORBY-SI

  • Author

Thank you for your help the Flaps_Incr and Flaps_Decr worked great, just exactly what I needed. I was obviously over thinking it but I am determined to learn how to use your program to try create a custom setup on my system. Thanks again for walking me through it.

  • Commercial Member
11 minutes ago, sharky44 said:

Thank you for your help the Flaps_Incr and Flaps_Decr worked great, just exactly what I needed. I was obviously over thinking it but I am determined to learn how to use your program to try create a custom setup on my system. Thanks again for walking me through it.

When working with the StreamDeck I would recommend to keep the AAO Script Editor open at all times (and AAO connected to the sim, and you sitting in the cockpit). You can then pick events from the lists, and immediately test them, then copy the necessary parts over to the SD Actions. Additionally open the "Watch Simulator Variables" dialog, so you can check on the return values too.

Additionally, in MSFS there is a very helpful dialog in the Developer Mode: Tools->Behaviors. With that you can analyze the behavior code of the switches, buttons and levers in the cockpit (hover the mouse over them and press Ctrl-G), you see all the existing Input Events and all LVars with their current values. 

LORBY-SI

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.