Jump to content
Sign in to follow this  

Recommended Posts

Guest herbie49

I have made an overlay window panel which (if activated) blackens (=overlays with a black rectangle) the gauges I want to have Off when the master battery switch is Off.And I need that because appearantly these gauges to not react to the master battery switch position properly.I would like to make a XML gauge that automatically opens/closes that new window based on the position of the master battery switch. So no manual switch, just an invisible gauge. Can somebody tell me how to make it? help is much appreciated.

Share this post


Link to post
Share on other sites

Hi,Not tested, but you could try:(A:GENERAL_PANEL_CIRCUIT_ON,bool) ! if{ X (>K:Panel_id_Open) } els{ X (>K:Panel_id_Close) }Or(A:MASTER_BATTERY,bool) ! if{ X (>K:Panel_id_Open) } els{ X (>K:Panel_id_Close) }X=your panel idHope it helps,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Hi Jan,Bad advice ...LOLThis introduces that bl**dy "continuous event" problem.This is better ... (A:ELECTRICAL MASTER BATTERY,bool) (G:Var2) == ! (G:Var1) 10 < || if{ (G:Var1) ++ (>G:Var1) (A:ELECTRICAL MASTER BATTERY,bool) if{ "x" (>K:PANEL_ID_CLOSE) } els{ "x" (>K:PANEL_ID_OPEN) } } (A:ELECTRICAL MASTER BATTERY,bool) (>G:Var2) (During the first 10 schedules it forces the window to the correct position, to override the window status definition in the .flt file; after that only when the MasterBattery changes)Cheers, Rob

Share this post


Link to post
Share on other sites
Guest herbie49

Hi Rob,I just can't get it to work. I made everything you said I write the panel ident number in the gauge same as in the panel.cfg also in the panel.cfg it looks like this:[Window09]file=dark.bmp file_1024=dark.bmp size_mm=1280,960window_size_ratio=1.000 position=0visible=1ident=10005window_size= 1.000, 1.000window_pos= 0.000, 0.070gauge00=herbie!Battery, 0,0Now when I toggle the battery switch the main panel is closed but window09 is still open! and the main panel is:[Window00]file=B747dlx5.bmp size_mm=1280window_size_ratio=1.000 position=0visible=1ident=MAIN_PANELwindow_size= 1.000, 1.000window_pos= 0.000, 0.070 so I don't know what is wrong

Share this post


Link to post
Share on other sites

Hi,Just tested the code and it works ok for me.Maybe try another ident nr.I used 38. (A:ELECTRICAL MASTER BATTERY,bool) (G:Var2) == ! (G:Var1) 10 < || if{ (G:Var1) ++ (>G:Var1) (A:ELECTRICAL MASTER BATTERY,bool) if{ 38 (>K:PANEL_ID_CLOSE) } els{ 38 (>K:PANEL_ID_OPEN) } } (A:ELECTRICAL MASTER BATTERY,bool) (>G:Var2) Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest herbie49

Hi Jan,I'm stupid because I put the ident number in the xml file like this if{ "10005" (... ) and not if{ 10005 (... ). I know I have done something wrong but didn't know what.Now it is working I'm very happyThanks for the help to you all.

Share this post


Link to post
Share on other sites

Glad it works now, so the work wasn't for nothing :-)And Jan, I hope you knew about this "continuous event" problem, and what it causes ??Cheers, Rob

Share this post


Link to post
Share on other sites

Still busy cleaning up things with Doug's gauge!Jan"Beatus Ille Procul Negotiis"

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...