Jump to content

Recommended Posts

Okay so I've pretty much finished making my MFD and it has 5 pages, so I need individual switches for me to switch to and from each page.Now I've had a problem, I set up the switches and they work but it's a little tricky and anoying. Why? Well to open one page you have to close another and some pages override others etc. it's a really difficult task to do.Now what I want/need is a way so that when I click one of the buttons to open one page I want that click to close all other pages and then open the page I need. Here's an example of one of my Buttons:---------------------------------------------------------------------(A:Circuit general panel on, bool)(L:MFD-ENG, bool)(L:MFD-ENG, bool) ! (>L:MFD-ENG, bool)---------------------------------------------------------------------This is the switch that opens the MFD-Engine page for me. Now what I want is something like a panel toggle in witch I can tell it to close the other pages and open the one I want:---------------------------------------------------------------------0 (>K:PANEL_ID_CLOSE) 2 (>K:PANEL_ID_CLOSE) 3 (>K:PANEL_ID_CLOSE) 4 (>K:PANEL_ID_CLOSE) 1 (>K:PANEL_ID_OPEN)Display/Hide Panel---------------------------------------------------------------------That's a toggle to go from Captains panel to FO's panel. What it does is it closes all the other panels up at the moment and then opens the FO panel.Is that possible?Also how do I determine which MFD page shows up when I start the plane, the default MFD page? Right now it is the ND page but IDK why?


Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

Share this post


Link to post
Share on other sites

Hello This is a rotary switch I use for MFD pages. The first code sets the opening page at panel load (must be in a visible gauge). The click opens one panel and closes the last in sequence. (L:MFDswitch, number) 0 == if{ 2 (>L:MFDswitch, number) }MFD Display(L:MFDswitch, enum) 4 == if{ 14 (>K:PANEL_ID_OPEN) 15 (>K:PANEL_ID_CLOSE) } (L:MFDswitch, enum) 3 == if{ 12 (>K:PANEL_ID_OPEN) 14 (>K:PANEL_ID_CLOSE) } (L:MFDswitch, enum) 2 == if{ 13 (>K:PANEL_ID_OPEN) 12 (>K:PANEL_ID_CLOSE) } (L:MFDswitch, enum) 1 - 1 max (>L:MFDswitch, enum)MFD Display(L:MFDswitch, enum) 2 == if{ 14 (>K:PANEL_ID_OPEN) 12 (>K:PANEL_ID_CLOSE) } (L:MFDswitch, enum) 1 == if{ 12 (>K:PANEL_ID_OPEN) 13 (>K:PANEL_ID_CLOSE) } (L:MFDswitch, enum) 3 == if{ 15 (>K:PANEL_ID_OPEN) 14 (>K:PANEL_ID_CLOSE) } (L:MFDswitch, enum) 1 + 4 min (>L:MFDswitch, enum) (L:MFDswitch, enum) shows knob animation.


Paul EGLD

Share this post


Link to post
Share on other sites

Why do you have so many separate gauges for one MFD?All the code should really be in one gauge, and you simply display one page at a time... :-hmmm


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

I think these might be screens not gauges ie. PFD, HSI, EICAS, FRONT CAMERA VIEW, etc. My code refers to this.


Paul EGLD

Share this post


Link to post
Share on other sites

Hey they're sepearte screens mate, all the code is in one gauge though called MFD.I had a rotory switch before but I didn't like the rotory because it aint like that on a C-17 so is there a why to do that open and close with non rotory switches? Also doesn't that code close the panel with the specified ID or can you use it to close the screens too? Because that's what I initially thought of doing but wasn't sure exactly how to.


Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

Share this post


Link to post
Share on other sites

K:PANEL_ID_OPEN/CLOSE is a window command... as in opening and closing a window that is tagged with the ID you pass.That's not a "single gauge" by any stretch of the imagination. Each individual panel (window) is a separate gauge as far as FS is concerned.You're slamming in some serious code overhead without even realizing it. Once a panel (window) is open, the code for any gauge in said panel (window) remains in memory and it's callbacks called as if the gauge was visible... even if it isn't.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites

Making a standard multipage display (MFD or whatever) in XML is simple in structure:-One gauge handles the whole set of pages.-Within this gauge, each page is represented by a parent element with a visible condition stored in a local var.-In the mouse area of the same gauge (or another one if page controlling is done in remote areas of the panel) those local vars that control boolean visibility of different pages are managed at once.For example (pseudocode) (L:EnginesVisible,bool)Background,etcNeefle, etcTape,etc (L:HydraulicsVisible,bool)Background,etcNeefle, etcTape,etc1 (>L:EnginesVisible,bool) 0 (>L:HydraulicsVisible,bool)0 (>L:EnginesVisible,bool) 1 (>L:HydraulicsVisible,bool)etc, etc, etc,In this case there is no need to call for different panel IDs, agreeing with what Ed and Bill stated.For complex multigauges that contain lot of calcs inside, a client-server approach is highly desirable (though I guess beyond the scope of this thread for discussion)Tom

Share this post


Link to post
Share on other sites

Even easier:Use the single (L:MFDswitch, enum) to determine which "set of Elements" is displayed at any time:(L:MFDswitch, enum) 0 == ...XML for this screen... (L:MFDswitch, enum) 1 == ...XML for this screen... (L:MFDswitch, enum) 3 == ...XML for this screen... et cetera...Then, for each mouse button, simply set the (L:MFDswitch, enum) as needed for that specific screen/page:3 (>L:MFDswitch, enum)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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