Sign in to follow this  
n4gix

XML - KEY BRAKES function

Recommended Posts

The variables file for XML states that KEY BRAKES is in percentage (up to 32K) and suggests that it is possible to apply the brakes as a percentage. You certainly cannot do this in C as a key_event - they're either on or off. Can someone confirm the ability to apply XML brakes as a percentage? I know nothing about XML and I'd rather have an answer to this before I spend time learning how to program an XML brake gauge that talks to a .gau file.MTIA.-Dai

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi, not tested,You can try:range (>K:AXIS_LEFT_BRAKE_SET) range (>K:AXIS_RIGHT_BRAKE_SET) range = 0 - 16384 (+ or -)Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi JanThe problem is, I don't know how to create XML gauges and I was trying to avoid hitting that learning curve if I couldn't achieve what I wanted at the top of it; hence why I asked if XML will set brakes by percentage.-Dai

Share this post


Link to post
Share on other sites

Hi Dai,What Jan said, is correct (I use that in my Taxispeed gauge).However, there's a little problem with these SET events.When FS9/FSX detects these proportional brake events (either from a gauge or from your toebrake pedals), it disables the normal brake events (like ".", "F11" an "F12" for the rest of the flight.Not a problem if the user has toebrake pedals, but if he hasn't (and a gauge issues these events) he suddenly finds that his brake commands aren't working anymore :-(.By the way: you'll find the learning curve for XML-style gauges a lot less than C/C++ gauges :-)Cheers, Rob Barendregt

Share this post


Link to post
Share on other sites

>Hi Jan>>The problem is, I don't know how to create XML gauges and I>was trying to avoid hitting that learning curve if I couldn't>achieve what I wanted at the top of it; hence why I asked if>XML will set brakes by percentage.Er, Dai you do know that you can "send XML commands" using execute_calculator_code, right? ;)

Share this post


Link to post
Share on other sites

@Rob>However, there's a little problem with these SET events.I saw that you'd mentioned that in a much earlier post. Provided that I can still detect the key_event it shouldn't prove a problem... should it?@Bill>Er, Dai you do know that you can "send XML commands" using execute_calculator_code, right? You can? :( I'd got it in my head that was a read-only function. Wait one..... nope. I've just re-read your flightsim.com posting and to this idiot, it still seems to be read-only. You wouldn't care to elaborate, would you? I'll accept words of two syllables... :)-Dai

Share this post


Link to post
Share on other sites

Well, it figures you would ask. Unfortunately, it's been several years since I learned about it, and since I never had any use of it, I've forgotten the details now myself.I remember that Arne Bartels was the first to show it's syntax and use, but I cannot locate the post now... ;(

Share this post


Link to post
Share on other sites

As in:"Something like this? Tested, and working...execute_calculator_code("(>K:SOUND_TOGGLE)", NULL, &return_value, NULL);The return value is zero. It would presumably be non-zero if the event somehow failed when called."http://www.fsdeveloper.com/forum/archive/i...php?t-2945.htmlGoogle scores again! Actually it was a long shot that surprised the #### out of me when it paid off!!! You wouldn't like to add it to your flightsim tutorial before we lose it again.... would you? .-Dai

Share this post


Link to post
Share on other sites

DARN! Now I remember!Notice that no one bothered to reply to the truly idiotic question that the last person posted. If he couldn't see that the entire thread WAS the answer to his question, why bother pointing out the obvious? :)Thanks. I'll updated the "sticky" immediately!---------------------This method is much easier to use that the method described in the previous post. (Thanks to Doug Dawson for this bit of brilliant insight!):To SEND a command with this method, use the following format:execute_calculator_code("(>K:SOUND_TOGGLE)", NULL, &return_value, NULL);The pointer &return_value is nomally "0" (zero).If you need to pass a value for a SET type event, simply use the same syntax used in an XML gauge by prefixing the command with the value (which can itself be another XML variable as shown below):execute_calculator_code("(A:Plane heading degrees gyro,degrees) (>K:HEADING_BUG_SET)", NULL, &return_value, NULL);

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