Sign in to follow this  
JYW

[RELEASED]: FSL A320 - LUA script for custom key assignment of all autopilot controls

Recommended Posts

Hi all,

 

If like me, you were dying to be able to assign keyboard commands to all of the FCU (AP) functions on your FSL A320, you can now do so.  :smile:

 

I have created a LUA file, that can be used with the registered version of FSUIPC.   It allows key assignment to all FCU controls.  It was created with FSX:SE but should also work fune with P3D (as long as you have Registered FSUIPC.

 

I would like to thank @Guensli, for locating all of the ipc.control parameters (for his LINDA project).  His doing so, is the only reason I have been able to make the LUA script, for keyboard assignment use.

 

LUA script:-   https://dl.dropboxusercontent.com/u/110364712/FSL_AP.zip

 

To use the LUA script:-

 

  • Extract the Zip and place the file "FSL_AP.lua" into your Root / Modules folder.
  • Load FSX/P3D in the FSL A320 and open FSUIPC, and go to the Keys assignment tab.
  • Choose each desired key command and in the drop down list, scroll to "LUA FSL_AP".
  • Now (important), in the following 'Parameter' field of FSUIPC, enter the number as shown in the list* below, for the chosen FCU command. (Don't forget to hit 'Confirm' for each one in FSUIPC!).

Come out of FSUIPC and you're done.

 

*You might want to print off, or note down the Parameter values below, so you have them to hand when you're in FSUIPC.

 

All FCU functions will work, and as you will see the button animations in the VC also work too. :smile:

 

Enjoy.

 

NB. AP Disconnect is not included because the default sim key assignment works for this (AP MASTER) in the FSL A320.

 

========================

 

Parameter List

 

Parameter 10: Spd Knob +
Parameter 11: Spd Knob -
Parameter 12: Hdg Knob +
Parameter 13: Hdg Knob -
Parameter 14: Hdg Push (Managed / LNAV)
Parameter 15: Hdg Pull (Selected / HDG SEL)
Parameter 16: Alt Knob +
Parameter 17: Alt Knob -
Parameter 18: Alt Push (VNAV)
Parameter 19: Alt Pull (FLCH)
Parameter 20: VS Knob +
Parameter 21: VS Knob -
Parameter 22: VS Push (Level Off)
Parameter 23: VS Pull (Vertical Speed)
Parameter 24: LOC
Parameter 25: AP1
Parameter 26: ATHR
Parameter 27: APPR
 

Share this post


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

If like me, you were dying to be able to assign keyboard commands to all of the FCU (AP) functions on your FSL A320, you can now do so. :smile:

 

I have created a LUA file, that can be used with the registered version of FSUIPC. It allows key assignment to all FCU controls. It was created with FSX:SE but should also work fune with P3D (as long as you have Registered FSUIPC.

Thanks very much Bill! I very much prefer to use key combinations for airspeed, heading, altitude, VS instead of the

mouse w/ scroll wheel.

 

Question: If I assign the key commands, using LUA, in a profile specific to the FSL A320, can I use the same key commands

that I already use for another aircraft? For example I use ctrl-Shft-2 to increase airspeed in MCP (autopilot) window for two PMDG

aircraft (each with its own aircraft-specific profile) but I don't use LUA for them. Can I assign Ctrl-Shft-2 to

increase airspeed (autopilot window) using LUA on the FSL A320?

 

Thanks again!

 

Mike

Share this post


Link to post
Share on other sites

Yes, Mike

Thank you! Just set it up and it works fine, except for some reason I can't get CTRL-SHFT-, to decrease heading --

maybe some conflict w/ "," for tiller on/off? But CTRL-SHFT-3 works fine for same function.

 

Mike

Share this post


Link to post
Share on other sites

You're welcome.

 

You can also have a look at LINDA, which makes the assigning maybe a bit easier .... ;)

http://www.avsim.com/forum/424-linda/

 

Thanks Guenseli - as LINDA is focussed around hardware, I thought this "pure LUA" :smile: would be easier for users who specifically want to use keyboard assignments.

 

Thank you! Just set it up and it works fine, except for some reason I can't get CTRL-SHFT-, to decrease heading --

maybe some conflict w/ "," for tiller on/off? But CTRL-SHFT-3 works fine for same function.

 

Mike

 

I suspect that particular command is conflicting with the FSL's tiller assingment Mike.

 

Another possibility - do you have this key combination assigned in the sim (FSX/P3D) itself? ... as that would cause a conflict.

TO ALL USERS OF THIS LUA:-

 

The Parameter number of "Heading Pull" on the FSL, is actually 49 and not 15 as shown above!  Sorry!

Share this post


Link to post
Share on other sites

A very, very odd request !

If by chance, anyone downloaded the LUA script that I made and shared in the first post of this thread, could you kindly send it to me (by PM) as I lost it and don't want to have to make it from scratch !!

Thanks if anyone can 'save my skin' here ..... :)

Share this post


Link to post
Share on other sites

Hello Bill,

Thank you very much for your work. I didn't come to avsim for many months and just found this topic today. Did you get your lua script? I clicked the link in the first post but the website said that the file is not found. If you have the file, can you please share it again?

Thank you very much.

Share this post


Link to post
Share on other sites
9 hours ago, Uncensor said:

Hello Bill,

Thank you very much for your work. I didn't come to avsim for many months and just found this topic today. Did you get your lua script? I clicked the link in the first post but the website said that the file is not found. If you have the file, can you please share it again?

Thank you very much.

Hi Uncensor,

The link in the first post was my link, to my dropbox  :)    But unfortunately the file got deleted from there, and I'd also got a new HD at some point and had lost the LUA file for the FSL !  :(    No-one has sent me the file, unfortunately.

I tried making a new one afresh a few days ago but it did not work in the A320 for some reason (maybe a new version of the FSL?  Not sure....).

I ended up following a post on the FSL forum where you can get all of the FCU commands assigned to keyboard controls, without needing to use a LUA file, MCRO, etc.     It's by using the custom commands function in FSUIPC, along with the code 66587, and then a parameter for each control.   The list of parameters are included in an Excel spreadsheet within this post on the FSL forum (you'll need to be a member there to see it, I think) :-

https://forums.flightsimlabs.com/index.php?/topic/10548-some-early-parameters-for-those-of-us-using-hardware-controls/

It is somewhat complex and longwinded to set up but one done, it works like a dream!   There is no LUA file etc, all of the assignments are included in the standard FSUIPC.ini file, once set up.

Best of luck in getting it set up.

Share this post


Link to post
Share on other sites
13 hours ago, JYW said:

Hi Uncensor,

The link in the first post was my link, to my dropbox  :)    But unfortunately the file got deleted from there, and I'd also got a new HD at some point and had lost the LUA file for the FSL !  :(    No-one has sent me the file, unfortunately.

I tried making a new one afresh a few days ago but it did not work in the A320 for some reason (maybe a new version of the FSL?  Not sure....).

I ended up following a post on the FSL forum where you can get all of the FCU commands assigned to keyboard controls, without needing to use a LUA file, MCRO, etc.     It's by using the custom commands function in FSUIPC, along with the code 66587, and then a parameter for each control.   The list of parameters are included in an Excel spreadsheet within this post on the FSL forum (you'll need to be a member there to see it, I think) :-

https://forums.flightsimlabs.com/index.php?/topic/10548-some-early-parameters-for-those-of-us-using-hardware-controls/

It is somewhat complex and longwinded to set up but one done, it works like a dream!   There is no LUA file etc, all of the assignments are included in the standard FSUIPC.ini file, once set up.

Best of luck in getting it set up.

Hi Bill,

Thank you very for the link. I'll check their forum.

  • Upvote 1

Share this post


Link to post
Share on other sites
11 hours ago, Uncensor said:

Hi Bill,

Thank you very for the link. I'll check their forum.

No problem.

What you're looking for in that linked thread is the Excel spreadsheet of parameters for the controls.

You would then go into FSUIPC (registered) as normal to the Keys page (or buttons if you prefer) and then select your chosen key command, and then from the drop down list, choose the very first entry;  <custom_controls>   ...... this brings up a pop-up box where (for all assingments you make) you enter 66587.

You then consult the spreadsheet for the command you are wanting to assign and enter the given code in the parameters box.

That's it!

However.......... you will notice that some of the commands in the spreadsheet have two values.   Where this is the case, you simply enter the first value in the main parameter box, and then click on the second box (worded something like "Command for when key is released", and enter the 66587 number again, followed by the second number from the parameters spreadsheet.

It sounds a lot more complicated than it is in reality.   :)

Share this post


Link to post
Share on other sites

Hi Bill et al.

I am trying to connect physical switches and buttons to the virtual switches and buttons in FSX Steam / FSLabs A320 by using FSUIPC. Unfortunately the mouse macros seem not to work so I consider to use LUA scripts. As I am currently totally blank on how to do that I would be very interested in

  1. getting your script as a fast starter (unfortunately the link above is dead) 
  2. a list of all the custom controls and parameter for the A320
  3. and (if I may dream) any hint or link to a detailed tutorial for dummies

Thanks a lot for any help!

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