Jump to content
Sign in to follow this  
klipper08

Reliable way to run exactly one instance of a dll gauge

Recommended Posts

I would like to run only one instance of a gauge server (dll) in a model that has a VC and 2d panel. I've found that I need to have an entry for the gauge in both the 2d section and VC section of panel.cfg in order for it to run when either the 2d panel or VC is selected. If I put the gauge in both the 2d section and VC section of panel.cfg in FSX, I get either one or 2 instances running depending on whether the users selects the 2d panel or VC.Is there a way I can configure the panel.cfg so that only 1 instance of the gauge will run regardless of how the user uses the 2d panel or VC?

Share this post


Link to post
Share on other sites
I would like to run only one instance of a gauge server (dll) in a model that has a VC and 2d panel. I've found that I need to have an entry for the gauge in both the 2d section and VC section of panel.cfg in order for it to run when either the 2d panel or VC is selected. If I put the gauge in both the 2d section and VC section of panel.cfg in FSX, I get either one or 2 instances running depending on whether the users selects the 2d panel or VC.Is there a way I can configure the panel.cfg so that only 1 instance of the gauge will run regardless of how the user uses the 2d panel or VC?
As far as I know, you're wrong. If you use the same gauge in the 2D and the VC, FSX loads it only once. There is 1 gauge loaded.I'm almost sure about this.Eric

Share this post


Link to post
Share on other sites

It should only be in the VC section. 2D gauges are only active when their window is open whereas VC gauges are always active.Fred

Share this post


Link to post
Share on other sites
I would like to run only one instance of a gauge server (dll) in a model that has a VC and 2d panel. I've found that I need to have an entry for the gauge in both the 2d section and VC section of panel.cfg in order for it to run when either the 2d panel or VC is selected. If I put the gauge in both the 2d section and VC section of panel.cfg in FSX, I get either one or 2 instances running depending on whether the users selects the 2d panel or VC.Is there a way I can configure the panel.cfg so that only 1 instance of the gauge will run regardless of how the user uses the 2d panel or VC?
DLL's never, ever load multiple instances of the DLL itself. Are you certain this is happening?

Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
DLL's never, ever load multiple instances of the DLL itself. Are you certain this is happening?
I'm quite certain it's happening. I have a log file showing two callbacks for every 18 hz tick. I suppose it's possible that the same instance is being called twice but it looked like the data context was different. I worked around it by only allowing one callback to run per tick.I'll look further into Fred's suggestion of defining only a VC gauge.Thanks.

Share this post


Link to post
Share on other sites
I'm quite certain it's happening. I have a log file showing two callbacks for every 18 hz tick. I suppose it's possible that the same instance is being called twice but it looked like the data context was different. I worked around it by only allowing one callback to run per tick.I'll look further into Fred's suggestion of defining only a VC gauge.Thanks.
Ahha... you're mistaking multiple gauges as multiple DLLs. Not true, my friend.Each physical gauge entry in a panel, be it 2D or VC will create an individual gauge. Nature of the 'beast'. So if you're declaring the gauge in a 2D panel and also declaring it in the VC... then indeed there are physically two of the gauge, not one.

Ed Wilson

Mindstar Aviation
My Playland - I69

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