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.

Format for Dataref Array - Xplane Streamdeck

Featured Replies

I am trying to work out the format for reading a dataref value from XPlane into my Streamdeck. The dataref is sim/cockpit2/electrical/panel_brightness_ratio and the index is 2. If i put sim/cockpit2/electrical/panel_brightness_ratio[2] it doesn't seem to work. I also tried sim/cockpit2/electrical/panel_brightness_ratio, 2

Thanks!

  • Commercial Member

Sorry, no idea. Should be "sim/cockpit2/electrical/panel_brightness_ratio[n]" 

What aircraft are you doing that with? Are you sure about the index? Did you try the Dataref observer in AAO, can you see the value there (Scripting->Watch datarefs)?

 

 

Edited by Lorby_SI

LORBY-SI

  • Commercial Member

Seems to work fine for me. 

My test went like this:

  1. I loaded the default 737 in XP, this seems to use the same datarefs
  2. Then I entered the individual datarefs of this array into the observer like this:
    (DREF:sim/cockpit2/electrical/panel_brightness_ratio[n])
    n going from 0 to 3
    Result: they all show values (0.008000)
  3. Now I changed the Main Panel brightness
    Result: the value changed accoringly in the observer
  4. On the StreamDeck I created a TextGauge
  5. For Variable 1 I chose "DREF" and entered this into the box:
    sim/cockpit2/electrical/panel_brightness_ratio[0]
    Result: the TextGauge action shows the value of the Dataref.
  6. I repeated the test for indexes 1,2,3 - they all worked correctly.
     

Edited by Lorby_SI

LORBY-SI

  • Author

Many thanks for the quick and thorough response. Have got it working now using your format.

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.