Jump to content
Sign in to follow this  
n4gix

CAS Message Text - XML

Recommended Posts

Nice example Bill :( However, I would like to point out this is one case where macros are not necessary to be used (in fact shouldn't be used :( if part of a big project).Let me explain:Say you have 100+ messages that display from multiple conditions. Probably the EICAS gauge would be duplicated in main panel/VC and maybe some subpanels; then the macro code and conditionals would be duplicated as well. The best in this case is to "build" the message via a local variable placed in the own gauge that manages the failure and refer to that variable in the CAS <FormattedText>For example, %@(L:ACBus Off,bool)%{if}AC BUS OFF\n%{end} where (L:ACBus Off,bool) condition is updated in another gauge, say ELECTRICS gauge.Notice that neither I use @Message(n) macros, but instead their direct meaning, is more clear to the user and saves some "extra" loading time.All this stated as my two cents in terms of code optimization :( Tom

Share this post


Link to post
Share on other sites
Nice example Bill :( However, I would like to point out this is one case where macros are not necessary to be used (in fact shouldn't be used :( if part of a big project).
Not too surprisingly, I fully agree that the use of <Macro>s in this case is not only "overkill" but actually very inefficient for the very reasons you explicated so well...However that said, the primary purpose of the example is to remove the "visual clutter" that obscures the actual simplicity of the <FormattedText> technique. By replacing all of the long and often complex "Conditional scripts" with a common length @Macro, the basic structure of the <String> is revealed more clearly! :(Thus, the otherwise hidden subtleties of things such as \{clr2} may be seen with greater clarity.In my actual gauge script I've in fact used L:vars for the conditions and placed the actual text in the <String> section. All the actual "math" for the conditions is in the master warn/caution gauge script, as it is in ACES Lear45 example.

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
The amount of <Shift> depends of the amount of textlines you want to have visible at one time on the Eicas. Say max lines visible is 10 and linewidth=15, then you have to shift 10*15 forth and back.Add a <Clip> to hide the text outside the MFD screen.Works very satisfactory.Hope it helps,Jan
Thanks, Jan. The idea of this followup to my own original post is to:a. illustrate clearly one easy method's principlesb. make use of the new forum software's ability to retain code/script formattingc. allow others (such as you and Tom) to introduce additions, expansions, and/or alternative suggestions :(

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