Jump to content
Sign in to follow this  
bcs112

Can't engage AIRSPEED_HOLD (C++)

Recommended Posts

Hi all,I recently ran into a very strange bug in my panel and I couldn't find a solution so far. Maybe someone else also had this problem before and this rings a bell ?Description of the set-up- I have a panel with one big C/C++-multigauge with something like 90 gauges inside- Panel has both a CPT and a FO view- I re-use some of the same gauges in both views, e.g. my autopilot and Autothrottle gauges, other gauges are separate since they are also independent in real lifeProblem- The problem I have has to do with the autothrottle gauge, this gauge has a SPD mode which will ARM the FS AUTOTHROTLE and will also activate the AIRSPEED_HOLD mode of the autopilot- This works fine when I am in CPT view- This also works fine when I engage SPD mode in CPT view and then switch to FO view- The mode does however not work when I first (so before ever having engaged SPD mode) switch to FO view and then engage SPD mode. When I do that, AIRSPEED_HOLD mode will not be engaged and will for the rest of the session be impossible to engage !I have no idea why this is happening ! Does FSX not like you to use the same gauge in different panels (think this problem also occurs when using the same gauges in the VC) ? Does it create 2 instances of the same gauge maybe ? But why does it work then if I engage SPD mode before switching panels ? Is it because we I didn't touch the gauge before creating a second copy of it, both copies are not linked anymore ?Does this problem ring a bell with anyone? Any suggestions are very welcome !Kind regards,Bj


simcheck_sig_banner_devteam.jpg

 

Bj

Share this post


Link to post
Share on other sites

Here's what I found, apparently you can't use the same gauge twice but you have to create 2 separate gauges using the same callbacks...Bj


simcheck_sig_banner_devteam.jpg

 

Bj

Share this post


Link to post
Share on other sites
Guest jimcooper1

If your CPT seat has an Autothrottle Arm switch but the FO seat does not then the SPD Hold will not work in the FO seat until the AutoThrottle has been armed from the CPT seat.RegardsJim

Share this post


Link to post
Share on other sites
Guest JeanLuc_

Maybe you could take advantage to build a dummy gauge, and log in a file the events you are receiving from the gauge callback upon its life. This surely will tell you more about what exactly is called and instanciated by FS. It has not changed since FS9, and in fact, they corrected a bug in their events system in FSX (hence some gauges failing on CONECT_TO_WINDOW, it was simply not correct in FS9 and now right in FSX).But in short, a gauge includes both a common block, and instanciated blocks. Your gauge serves as a template to create instances of your gauges. Some events are related to the gauge template (few of them), and most of the events are related to the gauge instance.It is a little like:class myGauge;and FS does this:gaugeInstance1 = new myGauge; // one instance in the main panelgaugeInstance2 = new myGauge; // one instance in a popup windowetc...Easy to figure out what events goes where in logging them.Hope this helps!

Share this post


Link to post
Share on other sites

Thx Jean-Luc,I removed all the code from the main callback in the FO gauge and created separate gauges. That solved the problem for now ;)Kind regards,Bj


simcheck_sig_banner_devteam.jpg

 

Bj

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