Sign in to follow this  
n4gix

Control External Device from within .gau file?

Recommended Posts

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
Help AVSIM continue to serve you!
Please donate today!

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

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

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!

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