February 23, 20251 yr 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!
February 23, 20251 yr 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 February 23, 20251 yr by Lorby_SI LORBY-SI
February 23, 20251 yr Commercial Member Seems to work fine for me. My test went like this: I loaded the default 737 in XP, this seems to use the same datarefs 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) Now I changed the Main Panel brightness Result: the value changed accoringly in the observer On the StreamDeck I created a TextGauge 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. I repeated the test for indexes 1,2,3 - they all worked correctly. Edited February 23, 20251 yr by Lorby_SI LORBY-SI
February 23, 20251 yr 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