Jump to content
Sign in to follow this  
n4gix

Control External Device from within .gau file?

Recommended Posts

Guest newmav

I'm trying to insert my own code into a .gau file. It all compiles, but there is no effect. I naively assumed that after inserting the code into the sample attitude gauge that comes with the SDK, the .gau file would be read and executed cyclically. Is there a way to get MS FS to execute such code? Thanks for any help.

Share this post


Link to post
Share on other sites

Where did you put the code? Your best bet is within the gauge callback function, specifically, within the PANEL_SERVICE_PRE_UPDATE case.Doug

Share this post


Link to post
Share on other sites
Guest newmav

Thanks for your reply!I searched the Panels SDK documentation for PANEL_SERVICE_PRE_UPDATE and did not find a reference. Could you point me in the right direction as to its usage? Thanks again.

Share this post


Link to post
Share on other sites

Have a look at the source code for the FlightMap sub-gauge in the example code in the SDK. It uses a gauge callback, although the only case it uses is PANEL_SERVICE_PRE_DRAW. This case is only executed when the gauge is visible on the screen, which is why PANEL_SERVICE_PRE_UPDATE is more likely suitable for your purposes. It is executed at a rate of 18Hz, regardless of whether the gauge is visible or not.Doug

Share this post


Link to post
Share on other sites
Guest newmav

Thank you very much! I had went and deleted all the other gauges and was only messing with the attitude one for my .gau. This looks promising! Thanks again.

Share this post


Link to post
Share on other sites

Gee, I must have been sleeping and missed the new update... ;) Thanks for the reminder, Doug!


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