Jump to content
Sign in to follow this  
nickpike

Doug's Debugger

Recommended Posts

Hi,I tested Doug's new gauge and i have a question about the log file.Probably there is something wrong in my code.Here is the log: 11117 KEY_FLAPS_UP 0 11117 KEY_AP_ALT_VAR_SET_ENGLISH 35000 11117 KEY_THROTTLE_SET 16000 11117 KEY_YAW_DAMPER_ON 0 11117 KEY_FUEL_SELECTOR_2_SET 6This is constantly repating.Does theat mean a fault?Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Hi Jan,Which new gauge of which Doug ???EDIT:Seen it now.. You mean the Event Logger of DOug Dawson :-)I'll check it out myself...Seems like a very handy debug tool.About your question: if this is constantly repeating (every gauge schedule cycle), there IS something wrong with your code :-).(this is called the "continuous event" problem, causing problems with FS9' multi-keystroke commands like ShiftE - 2.)General rule for a gauge: ONLY give an event when it needs to be given; i.o.w., always check the current status/position BEFORE issuing an event.Which can be done for all the events in your code example.Cheers, Rob

Share this post


Link to post
Share on other sites

Jan,If these commands are constantly repeating, then you should look at your code. When key_events repeat like this it can affect the ability to properly set autopilot values (course and heading will increment by 10 rather than 1, altitude select will increment by 1000 rather than 100). In addition, you will find it impossible to toggle a second exit, or select an individual engine other than Engine 1. I have found that xml gauges are a little more forgiving than C gauges when it comes to the effects on the autopilot, but any command that constantly repeats will prevent the matching of Key_Select_2 with the command it is intended to be matched with.Edit:The other thing to consider here is frame rates. All these repeating commands come at a cost of cpu time.Regards,Doug

Share this post


Link to post
Share on other sites

Doug and Rob,Thanks for your very quick responses!I tested the gauge 2 seconds and 15 minutes later answers..So i have to look why these commands are constantly send.Nice job for a nice evening!Btw. no problems with selecting autopilot stuff; framerates is another thing!!Just ordered a new computer.Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Heh Doug ..A very nifty gauge indeed :-)Allready testing it ...Cheers, RobEDIT:Works great...This certainly beats my usual "Shift-E 2" test that I use to find these faulty gauges.

Share this post


Link to post
Share on other sites

Hi,Could find the offenders quite easy.They were between tags.Putting them in a click event was the solution.Very useful,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

This is an excellent gauge. i knew I had some cycling code but had difficulty finding it. This gauge allowed me to 'home-in' on my radio where I was constantly setting the active frequency. The offending code has been corrected. Great work Doug. Another beauty.Nick.

Share this post


Link to post
Share on other sites

Hallo all,Is it also possible to monitor L:Var's?Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest bartels

I don't think the gauge does this. It is however possible do read a list of all L: variables from C gauges.ID testid=0;FLOAT64 value=0;PCSTRINGZ temp=NULL;...testid=0;while((temp=get_name_of_named_variable(testid++))){ value=get_named_variable_value(testid); //do something with temp (name of L: var) and value (value of L:var)}READ: beginning with testid=0 you can cycle through all available L:vars, if no further L:vars are available get_name_of_named_variable() returns NULL.Arne Bartels

Share this post


Link to post
Share on other sites

Jan,As fate would have it, I was just working on something for that (monitoring L:Vars) earlier today. Once I get it working I will mail it to you.Cheers,Doug

Share this post


Link to post
Share on other sites

Doug,That would be great, cause i suspect i have a lot of bad codes!I was able to find the wrong K-events, but still have the suspicion of much more wrong codes because of bad FPS!Thanks,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Jan,Let me know if the gauge does what you need. It can certainly be expanded. If you didn't mind giving up the space on the screen, it could be configured to display several L:Vars at once, rather than one at a time. If you were looking for a text file, like the event logger produces, I could do that too, although such a file would likely get very large, very quickly, even if it only picked up values when they changed.Doug

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

>Jan,>>Let me know if the gauge does what you need. It can certainly>be expanded. If you didn't mind giving up the space on the>screen, it could be configured to display several L:Vars at>once, rather than one at a time. If you were looking for a>text file, like the event logger produces, I could do that>too, although such a file would likely get very large, very>quickly, even if it only picked up values when they changed.>>Doug I'd like to log selected L:Variables from my XML test gauges. Ron

Share this post


Link to post
Share on other sites

Ron,How many are you looking at logging at once? Doesn't really matter to me , so I might as well build in the required capacity.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  

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