Jump to content
The simFlight Network Forums

MSFS - Disable all controller input whilst in autopilot


Adamski

Recommended Posts

https://www.nzfsim.org/?smd_process_download=1&download_id=3241

AP-Freeze-500-200.jpg?dl=1

I have an X-56 stick/throttle combo and often find that when panning around in external view (taking screenshots) I can't help moving the stick slightly - disturbing (or even de-activating) the autopilot.

Also - my X-56 suffers from [the dreaded] "throttle creep", which is particularly bothersome with the FBW A32NX when it drifts out of one of the detents.

These scripts are an attempt to lock/disable all flight controls (including throttle) when the autopilot is active.

1) AP_Freeze_ON
=======================
Checks to see which A/P is enabled (GEN or FBW).
If either is enabled, all controls axes are disabled (Offset 0x310A set to 255).

2) AP_Freeze_OFF
=======================
Resets/enables all controls axes (Offset 0x310A set to 0).

The scripts are mapped to separate switches on the throttle base, using the FSUIPC "Button & Switch Assignments":

BUTTON 1 (toggles freeze to ON):
Control sent when button pressed:  Lua AP Freeze On
Control sent when button released: Lua Kill AP Freeze OFF

BUTTON 2 (toggles freeze to OFF):
Control sent when button pressed:  Lua AP Freeze OFF
Control sent when button released: Lua Kill AP Freeze On

IMPORTANT:
For FSUIPC to be able to read the status of the FBW autopilot, the following two lines need to be added - either to
fsuipc.ini or (if using profiles) to your FBW profile. Make backups of the original files!

[LvarOffsets]
1=A32NX_AUTOPILOT_1_ACTIVE=UB0x66C0

After the first run, the size/position of the windows can be changed in the [ExtWindow] entry (x,y,size x,size y).

[ExtWindow]
Fixed Window Freeze ON=[30,30,130,56]
Fixed Window Freeze OFF=[30,100,130,56]

DISCLAIMER
This is my first ever foray into LUA programming (!), so these scripts may be far from perfect - please use at your own risk!

CREDITS
1) John Dowson for his patience.
2) Jason Fayre (the original author of the MyDisplay.lua script that was a starting point for mine.
3) Pete Dowson for the original FSUIPC. I can't imagine running any sim without it.

=======================================================================
Adamski_NZ
www.nzfsim.org

  • Like 1
Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.