Nick Dobda

Throttle Manager.Lua - FSUIPC

Recommended Posts

In another thread I came across the function of a Throttle Manager.Lua for FSUIPC that people were raving about.

I went around to try and get it to work, but have been un-successful. I am coming here because it appears that there are several of you that have this script working. 

I went here and followed the instructions:

http://forum.simflight.com/topic/69388-throttle-manager-to-allow-axis-forwardreverse-toggle/

Below are the three setting windows in FSUIPC... seems easy enough, but it doesn't translate to functioning in the cockpit. Can someone compare their setting with what I have and let me know what I'm doing wrong? Thanks!


http://s625.photobucket.com/user/luckyleaf6/media/AXIS_2.jpg.html

http://s625.photobucket.com/user/luckyleaf6/media/BUTTON_2.jpg.html

http://s625.photobucket.com/user/luckyleaf6/media/CALIB_2.jpg.html

Share this post


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

Adding to the knowledge  

I had the button assigned to "Lua ThrottleManager" when it should be "LuaToggle Throttle Manager"

This kinda fixed, but I have a twist-

I only want my single throttle to control BOTH throttles. It appears that you must assign a value to the "parameter" which only allows one parameter. When I toggle on the reverse, the reverse functions correctly on whichever parameter is assigned. The non-assigned parameter still functions as a throttle.

Does anyone have this LUA script running successfully where you control both throttles with a single lever? 

Share this post


Link to post
Share on other sites

Wow, it appears that in meddling with things I put myself into a world of hurt. my EZDok seems to have stopped loading, as well as the FSUIPC.

When I start up FSX, neither load and neither are available on the add-ons menu.

gasp. Anyone have any ideas so somehow get these things to start loading again?

Share this post


Link to post
Share on other sites

OK folks, and sorry to the moderators as this saga contiunes.

I accidentally deleted the DLL FSUIPC file which controls both the initialization of EZDok and FSUIPC.

I restored that and am back in business.


The question at hand is still as follows:

The Throttle Manager.Lua appears to have been written for two axis's. I have both throttles tied to one axis on my hardware.

The way the code is written, the LUA needs two axes.

Sifting through the FSUIPC threads, I came across a person trying to do the same thing I am 

*******

Just change the lines to both refer to the same button, so that the button does both things. i.e.

 

                                            16=PA,20,CL1:T,1

                                            17=PA,20,CL1:T,2

********

I'll have to edit the FSUIPC configuration code to do this... does anyone know what I am talking about?

 



 

Share this post


Link to post
Share on other sites

My current FSUIPC file shows this:

 

[Axes.NGX]
RangeRepeatRate=10
0=1Z,256,D,9,10,0,0
1=1U,256,F,66534,0,0,0
2=1V,256,F,66382,0,0,0

[Buttons.NGX]
4=R1,2,C65607,0
5=R1,3,C65615,0
6=P1,20,CL1:T,1                               <-----------I suspect this line needs to be fiddled with
7=P1,22,C65853,0
16=P1,13,K187,8
17=P1,12,K123,10
18=P1,18,K71,11
20=P1,17,K71,8
21=P1,11,C66372,0

[Keys.NGX]
2=78,8,65595,0
4=77,8,65597,0
6=188,8,65601,0
7=83,8,65557,0
8=46,8,65745,0
9=45,8,65739,0

[LuaFiles]
1=ThrottleManager

[Auto]
1=Lua ThrottleManager
 

note my arrow... I think this needs duplicated or something... does anyone understand this?
Thank you!


 

Share this post


Link to post
Share on other sites

Incredible - I figured it out. If anyone is interested in how to do it, post a message here and I'll explain what I did. 

I will explain when I get time (probably tomorrow) - I've already blown half my sunday away from my family to figure this out.

 

Share this post


Link to post
Share on other sites

Hi Nick,

It would be great to see how you sorted it out, i can not get it to work on my side.

Share this post


Link to post
Share on other sites

I will give an explanation tomorrow at work if that's ok. My kids are going buck wild and I cant get enough time to logically and clearly explain how to do it.

To clarify, I have three axis available on my logitec pro flight yoke. I have axis one assigned to BOTH throttles (move one lever it moves BOTH levers in the NGX), one axis controls flaps, and one the spoilers. 
The script is written with the intent that TWO throttle axis are used. I've figured out the way to tie the two axis together so that both reverse thrusters are run of the single throttle. 

It makes the reverse thrust adjustable, instead of full on or full off as I had it before.
 

Youll also need a registered version of FSUIPC and a logon to that first site I referenced. 

Share this post


Link to post
Share on other sites

Here is what I use for four engines.  One buttons controls the initiation of reverse and each axis controls reverse for its respective engines.

5=P6,31,CL1:T,1     -{LuaToggle ThrottleManager}-
6=P6,31,CL1:T,2     -{LuaToggle ThrottleManager}-
7=P6,31,CL1:T,3     -{LuaToggle ThrottleManager}-
8=P6,31,CL1:T,4     -{LuaToggle ThrottleManager}-

Rename ThrottleManager.txt to ThrottleManager.lua in the modules foler.  Now start FS up and select the aircraft you want to apply the LUA to. Open FSUIPC>Buttons tab, Profile specific.  Press whatever button you want to assign to initiate the LUA.  Assign FS Control, you will find the LuaToggle Throttle Manager.  Assign Parameter "1".  Exit flight sim and open FSUIPC.ini.  Locate the Assignment.  Should look something like 5=P6,31,CL1:T,1     -{LuaToggle ThrottleManager}-.  Now copy paste that for each engine you want to enable for.  Change the "5" to "6" or whatever the next assignment number should be and the "T,1" to "T,2".  And so on for each engine.  Start up FS and verify the installation worked.  Hope this helped.   Its an awesome tool.  The only addon I can't get it to work on is the PMDG 747v2.  It overboosts the engine in reverse to some ridiculous factor and you'll almost instantly lose control of the aircraft.  It does work in Idle reverse however.

Share this post


Link to post
Share on other sites

Yes the program itself as is works for two axis. If you want more (4 for a 747) you'll have to do some tweaking. In my case I wanted one axis to control two engines, which requires a workaround. In short you have to assign another button to reverse the second axis, then assign the first button to trigger the second button. So they all work off one axis, one button.

Share this post


Link to post
Share on other sites

William,

Were you trying to get this to work with one axis? Otherwise, the instructions included in the post are straightforward and I would say read them carefully and it should work.

If you're trying to make them work off one axis, that will require some additional instruction.

Share this post


Link to post
Share on other sites

Ok, so I'll post what I found so that this thread can be archived in case anyone in the future wants to do what I did.

These instructions are for allowing the button below the detent on a single Saitek quadrant lever to be used to toggle whether the lever acts toward forward or reverse thrust, and applies it to TWO throttles.

*This requires a registered version of FSUIPC and a login to the SimFlight Forum.

1) Go to this website, login and download the three files in the first post.
http://forum.simflight.com/topic/69388-throttle-manager-to-allow-axis-forwardreverse-toggle/

2) Follow steps 1 & 2.

3) Open FSUIPC and go to "axis assignment"
--   "MOVE" "LEVER",
--   select "Send direct to FSUIPC Calibration"
--   and check the first two boxes and assign them as  "Throttle 1" and "Throttle 2" - should look like this when done:

http://s625.photobucket.com/user/luckyleaf6/media/AXISW.jpg.html

4) Follow step 4 and 5 of the original instructions, placing a "1" in the parameter box on step 5.

Now, when you do this you'll see that when you enter back in to the cockpit, when you pull the throttle down and switch to reverse mode, the throttle #1 will properly reverse and you will be controlling the reverse thrust levers. Throttle #2 will be controlling forward thrust. This is because in Step 5 we assigned "1" as the parameter to be acted on - that is throttle 1 uses the LuaToggle ThrottleManager script. Parameter 2 (the second throttle) has nothing assigned so it just goes forward. And this is where the problem is with this script.

To solve this you need an available button on your hardware. I used the detent botton on my #2 axis which I use for flaps. I have no use for it. However before we fix the problem, we have to take a look at the FSUIPC configuration file.

Open the file and take a look for this segment of code:

[Buttons.NGX]
4=R1,2,C65607,0
5=R1,3,C65615,0
6=P1,20,CL1:T,1                               <-----------
7=P1,22,C65853,0
16=P1,13,K187,8
17=P1,12,K123,10
18=P1,18,K71,11
20=P1,17,K71,8
21=P1,11,C66372,0

Note my assignment 6... this is the code for my throttle detent.

Now, go back into FSUIPC and repeat step 5 with your spare button (in my case the detent on my lever 2). Place a "2" in the parameter box. Now this will add another line to your FSUIPC configuration file. My new file looked like this:

[Buttons.NGX]

4=R1,2,C65607,0

5=R1,3,C65615,0

6=P1,20,CL1:T,1

7=P1,22,C65853,0

16=P1,13,K187,8

17=P1,12,K123,10

18=P1,18,K71,11

20=P1,17,K71,8

21=P1,11,C66372,0

22=P1,10,CL1:T,2

 

NOTICE, there is a new line - 22... this is the new assignment. Note I previously had nothing assigned to the detent button on my axis 2. If you are re assigning an existing button a new line will not pop up. Some creativity and research might be necessary to further understand which code refers to which button you are assigning.

In my case, I had to manually modify the line for button 22 to read

22=P1,20,CL1:T,2

When you detent throttle 1 it will now press the button (button #20) for both 1 and 2, so you can now have reverse throttle for both engines controlled with one axis.

ITs still a bit confusing, but if you have a logical /analytical brain you should be able to figure it out. If not... it might be a little (a lot) confusing.


Hope this helps.



 

Share this post


Link to post
Share on other sites

I don't know if anything has changed....but all I had to do was ensure that the one axis controls throttle 1 and throttle 2, and then set a keystroke or joystick button to LUAToggle.... and it worked.  No fumbling with 'tricking' multiple axes or reloading keys or editing the ini beyond the first entry.

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