Jump to content
Sign in to follow this  
rcbarend

Problem with Light Switch Gauge

Recommended Posts

Guest FS-boy

I've programmed a gauge that has several toggle switches that turn the various light buses on and off. The toggle switches for strobe, beacon, and nav lights work as intended, however, the toggle switches for the landing lights and the taxi lights don't. The landing lights and taxi lights are "stuck" in the on position. I've inserted a MAKE_STRING macro in my code to print out the values of LANDING_LIGHTS and TAXI_LIGHTS token variables. These variables will momentarily change to 0.0 when I "click" the switch, but they immediately change back to 1.0. This doesn't happen with my other light switches. What's going on? I looked in the aircraft.cfg file to see if there were any obvious conflicts, no joy. I came up empty handed when I did a search in this forum. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

My conclusion would be that there is another gauge in your panel (or XML code in that aircraft model) that forces these light switches as well (based on some condition).There are a lot of gauges around that control one or more lightswitches, e.g. to switch effects on/off.To verify this:1. Try your gauge in one of the default panels, since the default panels do not contains such control gauges.I'm sure your problem is gone now.If 1. helps:2. In the aircraft you are testing with: disable some gauges successively, and find out which gauge conflicts with your switch.You still have this problem with even all other gauges disabled, the conflicting code must be in the aircraft .mdl itself.Rob Barendregt

Share this post


Link to post
Share on other sites
Guest FS-boy

Rob, Thanks! I was so focussed on my 2-D panel that I completely overlooked the virtual panel section. Sure enough, I loaded several XML special effects gauges in the virtual panel section. Once I disabled the special effects gauges, my light switch gauge worked perfectly. I'm totally unfamiliar with XML special effects gauges, is it relatively easy to edit the XML script and change the special effect "activater" from taxi lights or landing lights to something else? The SDK version that I have documents 10 different electrical buses, however, I thought I read on this forum that one could actually define up to 18 buses. If so, I would like to change the special effects gauges that use the landing lights (buse 5) and taxi lights (buse 6) to something like buse 17 and buse 18 if I could. Any thoughts on my propose solution?

Share this post


Link to post
Share on other sites

Hi,I'm afraid your mixing up a few things :-)There are 10 (1 - 10) different light switches (which you call busses), that you can command from a gauge via events..And in the light section of the aircraft.cfg you can define 19 (00 - 18) different relations (lines) between such a switch type, an effect or an effect position.So:light** = y, .....where "**" is the line number and "Y" is the switch type."**" must be unique (00 - 18), whereas "y" can be used in multiple lines. Iow: you can couple one light switch to more then one effect (and/or effect position)Rob

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...