Door Light inop

Peer support for Air Manager desktop users

Moderators: russ, Ralph

Post Reply
Message
Author
AlyMac
Posts: 32
Joined: Mon Apr 05, 2021 3:12 pm

Door Light inop

#1 Post by AlyMac »

Try as I might I cannot get the "Door Open" light to work in X-plane 11. Ive downloaded the hardware several times, checked the wiring but I cant see to get it to work. I am using the Stock - X-plane 11 Baron, Windows 10 and arduino mega. Alternator lights, oil pressure lights and gear lights are all ok.

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

Re: Door Light inop

#2 Post by Ralph »

You will have to check the dataref and see if it gives what you expect.

AlyMac
Posts: 32
Joined: Mon Apr 05, 2021 3:12 pm

Re: Door Light inop

#3 Post by AlyMac »

can you tell me which aircraft it was tested on?
Certainly although the light is clearly marked for use in "X-plane" - I have tried all the stock models and other payware aircraft and it doesnt work.
The switch has been bound through the x-plane menu to -
"Door#1" open - right through to "Door #9 open" and it doesnt work for me.

I have tried before to find these "Dataref" files within both the sim and the aircraft and its beyond me - I dont know where to look for them.

I bought AirMahanger because I know nothing of programming - Im a nuts and bolts guy Ralph - sorry.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Door Light inop

#4 Post by jph »

The existing XP code will always force a single state due to a minor typo.
Modify as follows -

Code: Select all

cabin_door_light = hw_output_add("Cabin door open light", false)

xpl_dataref_subscribe("sim/cockpit/warnings/annunciators/cabin_door_open", "INT", function(warning)
      if warning == 0 then hw_output_set(cabin_door_light, false)  
      else hw_output_set(cabin_door_light, true) end
    
end)
Joe. CISSP, MSc.

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Door Light inop

#5 Post by SimPassion »

jph wrote: Sat Jan 14, 2023 9:52 am The existing XP code will always force a single state due to a minor typo.
Modify as follows -

Code: Select all

cabin_door_light = hw_output_add("Cabin door open light", false)

xpl_dataref_subscribe("sim/cockpit/warnings/annunciators/cabin_door_open", "INT", function(warning)
      if warning == 0 then hw_output_set(cabin_door_light, false)  
      else hw_output_set(cabin_door_light, true) end
    
end)
Sorry Joe, I don't see any issue in the original coding, apart being badly awake, which could occurs in anyway .. :lol:

Code: Select all

cabin_door_light = hw_output_add("Cabin door open light", false)

xpl_dataref_subscribe("sim/cockpit/warnings/annunciators/cabin_door_open", "INT", function(warning)
    hw_output_set(cabin_door_light, warning == 1)
end)
When "warning" will be 1, the "warning == 1" check will be equal to true
and when "warning" will be 0, the "warning == 1" check will be equal to false

so, the original coding will work the same way as your suggested script part , though without the need to add any additional line, hope I still stand for correct !?
 

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Door Light inop

#6 Post by jph »

Ah, yes, thanks Gilles, I overlooked the logical comparison. :) doh.
Much appreciated.
Joe
Joe. CISSP, MSc.

Post Reply