Jump to content

Writing Datarefs


Recommended Posts

Hi, Here is the mail I've sent to Javier R. ; he hasn't answer me, he's to busy I think. So I post a copy here and expect somebody can help me :

I’m the lucky owner of your excellent plane (Jetstream) since few months. I really love it, so I’m  working on it to modelized some parts of panels on other screens with a very good application who is Air Manager of siminnovations.com. This allows to draw panels on an other machine of the network to have only exterior view on the main computer (perfect to make a cockpit). 
A lua script allows to send or recover data to X-plane to move switches on the drawn panel. My first project is to make the overhead panel.
So, to do that, I need all datarefs of the plane. I've found lot of them in "jetstream32.acf" and  "cockpit.obj", I've transferred them in dataref tool (like dataref editor) to see how they work. 
But I have problem to write some of them…
All my switches are totaly functional except some.  The recusant are :  
- "sim/cockpit2/switches/panel_brightness_ratio" on offset 4    for flood light          [0.,0.,0.,1.]
- "sim/cockpit2/switches/instruments_brightness_ratio" on offsets 3, 5 and 8  (not sure, I’m not ahead)   for cabin light, galley light and read 
- "J32/IGNSwitchLeft"     (the Right IGN is functional….  I don't know why there is a difference between)
- "J32/left_cp_lt",  "J32/right_cp_lt" ,  "J32/center_cp_lt",  "J32/instrum_cp_lt"  and  "J32/roof_cp_lt »      dials for modulate the instrument and panels lights
For these datarefs, I can’t write a value in. For exemple, when I move the flood switch on (on my drawn panel), it should send a « 1.0 » FLOAT value to panel_brightness_ratio [3], 
but this dataref stays to « 0.0 » 
On the contrary, when I switch it from X-Plane, it sends the good value to my script and my switch moves.
By the way, when I write the float value directly in dataref editor, the value stays to zero.
So, I imagine that you have put a condition to can write them, when creating.  If don’t, the other solution is I haven’t all datarefs in my list, and I tried to use the bad ones (but I don’t think it’s that).

If someone has an idea about this problem and can help me on that, I'll be thankful.

Link to comment
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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...