Jump to content

Brake script help


dehman137

Recommended Posts

Hey everyone. So my rudder pedals have a glitch where when I shift to the left it triggers the left toe brake. As you can imagine this makes it frustrating for takeoff. So as a result I thought Id write a script that disables the toe brakes once I set the throttle above 50%. Heres a general idea with what I got:

 

 

AceXML Document

brakes_fix.xml

0.000,0.000

1,1

 

 

(P:GENERAL ENG THROTTLE LEVER POSITION, enum) abs 50 > == if{ (>A:TOE BRAKES AVAILABLE, bool) } els{ (>A:AP_PANEL_ALTITUDE_HOLD, bool) }

 

 

As you can tell Im not very experienced with scripting and would love some help.

 

Thanks guys,

 

dEHmAN137

Link to comment
Share on other sites

I don't know about code and what not, but perhaps you are not placing your foot on the pedal right and accidentally and unknowingly activating the differential brakes. This has happened to me a few times if my foot wasn't on the pedal correctly.

 

Something else that might be going on is that your pedals are biting the dust. Or you could try saving a default flight on the ground in a powered off state. I'm not sure if that will help or not though.

 

What type of pedals are these? Have you looked at your control assignments and made sure everything was okay? There is a file (which the name escapes me atm) that stores control assignments that could be backed up and redone via the Sim again to see if that helps. I think this file is called control/s something and it might be in your documents folder for FSX. I'm on my laptop now so I would have to check on my desktop. It might even be called flightcontrols something. Everything.exe could find it.

Link to comment
Share on other sites

<br />
    (P:GENERAL ENG THROTTLE LEVER POSITION, enum) abs 50 > == <br />
      if{ (>A:TOE BRAKES AVAILABLE, bool) } <br />
      els{ (>A:AP_PANEL_ALTITUDE_HOLD, bool) }<br />

 

Hmmm.... where to start ?

 

Lots of things wrong, but most important: A:TOE BRAKES AVAIBLE is NOT settable according to my documentation (FSXA SDK).

So the (corrected) expression if{ 0 (>A:TOE BRAKES AVAILABLE, bool) } won't compute.

 

Apart form that, I don't understand the els{} expression.

Also, even if the expression would compute, the toe brakes would be disabled forever once you get 50%+ throttle, as there's no code to set it back when you lower the throttle.

 

Some other coding errors as well, but not relevant in the scope of this thread.

 

Anyway, you'll have to fix your pedals in another way.

 

Wim

b727fcaptain.jpgx701captain5.jpg
Link to comment
Share on other sites

I have CH Pro Pedals and just disabled the toe brakes axis in the controller settings screen in FSX. Job done.

Tim Wright "The older I get, the better I was..."

Xbox Series X, Asus Prime H510M-K, Intel Core i5-11400F 4.40GHz, 16Gb DDR4 3200, 2TB WD Black NVME SSD, 1TB Samsung SATA SSD

NVidia RTX3060 Ti 8Gb, Logitech Flight Yoke System, CH Pro Pedals, Acer K272HL 27", Windows 11 Home x64

Link to comment
Share on other sites

Another script idea I had was the same concept but with the "TOGGLE_TOTAL_BRAKE_FAILURE" event. I was able to get it to work, however being a toggle script it constantly swaps from on to off. Do you know of a way to automatically assign it on by default? Heres the script I had worked out:

 

 

1 (A:Turb eng1 N1, percent) abs 90.5 >

(>K:TOGGLE_TOTAL_BRAKE_FAILURE)

Link to comment
Share on other sites

Not an easy one, as KEY_TOGGLE_TOTAL_BRAKE_FAILURE doesn't have a simulation variable that shows the current status (AFAIK).

 

Try a local variable L:Brake_Failure_Status which you update every time you toggle.

One can safely assume that "total brake failure" will be OFF when starting a flight.

Once you have that working, you can write conditionals on when (and when not) you need to apply the key event.

 

Wim

b727fcaptain.jpgx701captain5.jpg
Link to comment
Share on other sites

found a combination that worked! Pretty simple script setup but it works well. I'll post it below for anyone who may be interested in it(that is if they have the same problem with their brakes as me):

 

 

AceXML Document

brakes_fix.xml

0.000,0.000

1,1

 

 

 

1 (L:Brake_fix, bool) 1

1 (A:Turb eng1 N1, percent) abs 90 >

(>K:TOGGLE_TOTAL_BRAKE_FAILURE)

(L:Brake_fix, bool) ! (>L:Brake_fix, bool)

1 (L:Brake_fix, bool)

1 (A:Turb eng1 N1, percent) abs 90 > 1

(>K:TOGGLE_TOTAL_BRAKE_FAILURE)

(L:Brake_fix, bool) ! (>L:Brake_fix, bool)

 

 

 

Thanks for the help everyone!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...