Jump to content
Sign in to follow this  
Guest Patrick_Waugh

Exchanging variables between C gauges and XML gauges

Recommended Posts

Guest dougfreeman

Hi, Sorry if this has been asked before but I have searched and not found the answer. Could anyone help me by giving example code of how to share variables between C and XML gauges. This is to allow complex calcs to be performed in C code and the results used in an XML gaugeMany thanks

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

>Hi, >Sorry if this has been asked before but I have searched and>not found the answer. >>Could anyone help me by giving example code of how to share>variables between C and XML gauges. This is to allow complex>calcs to be performed in C code and the results used in an XML>gauge>>Many thankshttp://forums.flightsim.com/dc/dcboard.php...sg_id=233&page=

Share this post


Link to post
Share on other sites

Thanks for the reference to my "mini-tip" Patrick!I've just added a "Part 2" to the post explaining how to use the execute_calculator_code(); function as an alternative method. :)


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
Guest dougfreeman

Many thanks for the rapid replies guy's. I'm sure I'll crack this now.CheersDoug

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Just read part 2 Bill, but not sure what you are trying to tell people when you say:

Note that the same structure may be made bi-directional, meaning that you can use XML to control the C variable, or use the C variable to control the XML variable.
as that function call will copies XML vars to the variable at the specified pointer, but not the reverse.If you are refering to Part I above, then you might want to make that clearer for the noobs. =)But who knows, maybe I have forgot something. =)Anyway, glad to point out your excellent tips that you took the time to make.

Share this post


Link to post
Share on other sites

>If you are refering to Part I above, then you might want to>make that clearer for the noobs. =)Thanks. That'll teach me to try writing a coherent explanation that early in the morning when I'm still barely awake! ;)BTW, if you ever feel like posting a "tip", it'd be most welcome.While this forum is much busier, at least "over there" I have some control over the posts, and can easily collate tips into a more digestable form for quicker reference. ;)


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
Guest Patrick_Waugh

Will do. Yes, it is a great place for that given that you can sticky them etc.Patrick

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