Hello and help!

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

Message
Author
judevine
Posts: 12
Joined: Thu Feb 25, 2021 2:15 pm

Hello and help!

#1 Post by judevine »

Hello all,

I'm Joe and i'm new here. I discovered Air Manager just recently and am trying my hand at learning the coding to develop a panel for my JustFlight Archer 3 on Xplane.

I have started work on the warning panel (I am using 4.0BETA27) and I have hit a wall that is driving me nuts. I am not familiar with LUA so have been picking it up as I go.

one particular subscription is causing me issues;

xpl_dataref_subscribe("thranda/TCAS/AnnLtA", "FLOAT[400]", callback_lights)
connecting to

-- Alternator
function callback_lights(on)
visible(image_alternator, on[5])
end

I can set it manually in the bottom right window and my light comes on as I hoped, but it won't connect to the sim. Other lights I have coded without this dataref array subscription work (bar one, scratching my head on that too) but I would like this one to work as I can then make the annunciator test button work properly too! I am not sure why they have 400 values as only 9 are needed.

in the viewer window I can see the dataref but it says unsubscribed? the ones that work all show subscribed so I reckon that's where the disconnect lies, I just don't know why it hasn't subscribed properly. Any hints or tips would be gratefully received.

thanks,

Joe

User avatar
Ralph
Posts: 7924
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Hello and help!

#2 Post by Ralph »

Are you sure that a float array of 400 is correct?

judevine
Posts: 12
Joined: Thu Feb 25, 2021 2:15 pm

Re: Hello and help!

#3 Post by judevine »

Hello,

thanks for the reply, very much appreciated.

I thought it looked odd, but that's what I can find using the datareftool. It does seem odd, both for the number in the array and the use of float (although I think that may be a variable brightness thing) but it's the only one I can find that references all of the annunciator lights.
image.png
cheers,
Joe

judevine
Posts: 12
Joined: Thu Feb 25, 2021 2:15 pm

Re: Hello and help!

#4 Post by judevine »

just a quick screenshot with most of the code and pages I referred to.

cheers
Joe
image.png

stickandrudder
Posts: 44
Joined: Tue Sep 18, 2018 11:25 am

Re: Hello and help!

#5 Post by stickandrudder »

Hi and welcome :)
Is it only index 5 you are strugling with? Or is it the whole array?


IIRC my first post on the forum was also about thranda annunciator lights, but that was the PC12 :D

stickandrudder
Posts: 44
Joined: Tue Sep 18, 2018 11:25 am

Re: Hello and help!

#6 Post by stickandrudder »

judevine wrote: Thu Feb 25, 2021 3:34 pm
I thought it looked odd, but that's what I can find using the datareftool. It does seem odd, both for the number in the array and the use of float (although I think that may be a variable brightness thing) but it's the only one I can find that references all of the annunciator lights.
They use floats to fade in and out the lights, atleast in the PC12

judevine
Posts: 12
Joined: Thu Feb 25, 2021 2:15 pm

Re: Hello and help!

#7 Post by judevine »

Hi there,

All of them!It seems to be the subscribe thing is the issue, I just can't work it out. If I find a non Thranda dataref (some of them use standard ones) then it works fine, but I really feel this array could make it easier if I can work out how to subscribe to the thing!

Cheers
Joe

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Hello and help!

#8 Post by Keith Baxter »

Hi,

Sorry I cannot help but...

Oh WOW. Just learned of the DRT new interface.

OH when you change dataref types you have to shut down both AM and Xplane.
Dit you do that??

Keith
Last edited by Keith Baxter on Thu Feb 25, 2021 4:10 pm, edited 1 time in total.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

judevine
Posts: 12
Joined: Thu Feb 25, 2021 2:15 pm

Re: Hello and help!

#9 Post by judevine »

the DRT has been awesome, god knows how I would have tracked these things down otherwise!

Joe

stickandrudder
Posts: 44
Joined: Tue Sep 18, 2018 11:25 am

Re: Hello and help!

#10 Post by stickandrudder »

Try the the thranda annun test dataref, just to se if you are able to connect with it

Post Reply