Jump to content
The simFlight Network Forums

Throttle Key/Button Sensitivity


Recommended Posts

Hi, I'll copy the same post I leaved on P3D Froum, in case of someone else had the problem or if anyone have a clue. Thanks.

I use gamepad buttons to control throttle, but the problem also happens if I use the standard F2 & F3 keys.

I have a problem with the throttle sensitivity. After an hour or so, (never less than an hour) the throttle sensitivity reduces to more than a half. So, for example if you start the flight there are let’s say 10 increments from idle to full thrust, after an hour flying you’ll need 25-30 increments from 0 to 100.
It happens with every aircraft (default or not) except with Aerosoft Airbus, which I believe it has a custom throttle code for detents.
I tried default aircraft, PMDG NGXu, QW 787, VRS F-18...

The problem persists with and without any addons, with and without FSUIPC, tried “throttle increase” and “throttle decrease” P3D controls, I did the same through FSUIPC... no luck. I have no idea from where the problem could come from.

Using P3D 4.5 Hf3 (but it also happened with older versions).

The FSUIPC log does not show anything strange or relevant when it happens.

Any advice would be appreciated.

Thanks in advance

Link to comment
Share on other sites

Hi,

what you could do is activate in FSUIPC's Logging tab the Key and Buttons and Events (non axis) . With this you could see if really all key presses (incr/decr) are actually sent after 1 hour when it starts to don't work correct. Just to check what arrives of what the Keyboard maybe 'seems' to send.

Thomas

Link to comment
Share on other sites

31 minutes ago, Thomas Richter said:

Hi,

what you could do is activate in FSUIPC's Logging tab the Key and Buttons and Events (non axis) . With this you could see if really all key presses (incr/decr) are actually sent after 1 hour when it starts to don't work correct. Just to check what arrives of what the Keyboard maybe 'seems' to send.

Thomas

Thanks Thomas. I’ll do it, I’ll take a look if it gives me an idea of what is going on.

Link to comment
Share on other sites

3 hours ago, Joan A said:

I have a problem with the throttle sensitivity. After an hour or so, (never less than an hour) the throttle sensitivity reduces to more than a half. So, for example if you start the flight there are let’s say 10 increments from idle to full thrust, after an hour flying you’ll need 25-30 increments from 0 to 100.

The latter is more reasonable. Large increments are obtained by fast multiple clicking or repeating keys/buttons, which are interpreted as accelerations.  The typical small increment is 512 units for the full joystick range of -16384 to +16383,  so with 32768 units altogether there should be 64 steps altogether.  Not sure how you only get 10, though I suppose acceleration may account for it.

But I've no idea what could cause a change over time. See if the Logging shows anything changing, as Thomas suggests.

Pete

 

Link to comment
Share on other sites

Hi Pete, thanks. I explained myself wrong, just for comparing the proportion. In fact, the usual setting I use is “Throttle Increase” internal P3D with the Repeat slider in the middle, which gives me the typical 512 increments I guess. When the throttle decides to change the increments itself after an hour I can revert to the initial setting by putting the Repeat slider to the right. So, it is like P3D half-sizing the throttle steps after an hour. Really strange, I’ts driving me crazy. 
 

I’ll take a look at the log to see if there’s something that sheds some light on this.

Thanks again

Link to comment
Share on other sites

Ok, so it seems I solved the problem. I'm not sure what the culprit was because before logging the events I removed all asssignments from P3D and send those through FSUIPC. And voila, no problem after more than an hour. Then I saw that in the previous Standard.xml controls file there were double assignments for the same actions between two different controllers with different GUIDS. I always use the same controller, but sometimes P3D reads it as a Logitech model and other times as an Xbox controller. I was aware of that, the change is when I start the controller before starting P3D or starting it once P3D already started. Also, I came across the option of "USB Selective Suspend", which I did not know, and I disabled.

So could the two GUIDS and the double entries (two of them Throttle Inc and Dec) be the culprit here?
Could be that P3D read a different controller when W10 power off the USB (after an hour)? The controller still working but with another GUID, hence the increments change?

Thanks!

Link to comment
Share on other sites

1 hour ago, Joan A said:

So could the two GUIDS and the double entries (two of them Throttle Inc and Dec) be the culprit here?
Could be that P3D read a different controller when W10 power off the USB (after an hour)? The controller still working but with another GUID, hence the increments change?

I've no idea, but I do know that leaving controllers enabled in P3D is asking for trouble if you want to assign in FSUIPC.

If you prefer assigning in P3D then all FSUIPC calibration is doing is assigning whatever P3D reports.

Pete

Link to comment
Share on other sites

Hi, unfortunately the problem is back. No matter what I try the problem persists. One exact hour and the increments are changed for gamepad buttons and keyboard keys.
I tried to make an xml code to set the exact steps whe throttle lever position is inside a range, but as the GENERAL ENGINE THROTTLE POSITION is in percent and the values sent THROTTLE_SET are in 16383 range it's not as easy as I thought. 

So as a last resource, is there a possibility to set a Lua for exact steps when THROTTLE_INC is pressed? One additional problem is that I need the lua code to be made to use it with "flags" through LuaToogle because in my system the standard lua plugins stutter when the action is performed, something which does not happens with flags. Never mind, I came across a Lua plugin I use for Aerosoft rudder which works perfectly for that purpose. Then, I thought it could be modified to do the same but with throttle set steps.

Here is the rudder lua code which works ok:

Quote

 

-- USER ADJUSTMENT, AMOUNT TO MOVE RUDDER
local rudderStep = 2600 --2048--
-- END USER ADJUSTMENT

local rudderPos = 0

function centerRudder(flag)
    ipc.writeSW(0x0BBA, 0)
end

function moveRudder(flag)
    rudderPos = ipc.readSW(0x0BBA)
    -- RUDDER LEFT
    if flag == 2 then
        rudderPos =  rudderPos - rudderStep
        rudderPos = math.max(rudderPos, -16383)   
    -- RUDDER RIGHT
    else
        rudderPos =  rudderPos + rudderStep
        rudderPos = math.min(rudderPos, 16383)
    end
    ipc.writeSW(0x0BBA, rudderPos)
end

event.flag(1, "centerRudder") -- CENTER
event.flag(2, "moveRudder") -- MOVE LEFT
event.flag(3, "moveRudder") -- MOVE RIGHT

 

 

And here is the modified one which I tried with no luck. I used the Engine 1 offset to try, but the main idea is to couple both engines with the same flag.

Quote

 

-- USER ADJUSTMENT, AMOUNT TO MOVE Throttle
local ThrottleStep = 400
-- END USER ADJUSTMENT

local ThrottlePos = 0

function ThrottleCUT(flag)
    ipc.writeSW(0x088C, 0)
end

function moveThrottle(flag)
    ThrottlePos = ipc.readSW(0x088C)
    -- ThrottleDEC
    if flag == 2 then
        ThrottlePos =  ThrottlePos - ThrottleStep
        ThrottlePos = math.max(ThrottlePos, -4096)   
    -- ThrottleINC
    else
        ThrottlePos =  ThrottlePos + ThrottleStep
        ThrottlePos = math.min(ThrottlePos, 16383)
    end
    ipc.writeSW(0x088C, ThrottlePos)
end

event.flag(1, "ThrottleCUT") -- CUT
event.flag(2, "ThrottleDEC") -- THR INC
event.flag(3, "ThrottleINC") -- THR DEC

 

 

Any help wold be appreciated!

Link to comment
Share on other sites

Ok, revised code. Still no luck

Quote

-- USER ADJUSTMENT, AMOUNT TO MOVE Throttle
local ThrottleStep = 400
-- END USER ADJUSTMENT

local ThrottlePos = 0

function ThrottleCUT(flag)
        ipc.writeSW(0x088C, 0)
end

function moveThrottle(flag)
        ThrottlePos = ipc.readSW(0x088C)
        -- ThrottleDEC
        if flag == 2 then
            ThrottlePos =  ThrottlePos - ThrottleStep
                ThrottlePos = math.max(ThrottlePos, -4096)   
        -- ThrottleINC
        else
               ThrottlePos =  ThrottlePos + ThrottleStep
               ThrottlePos = math.min(ThrottlePos, 16383)
        end
        ipc.writeSW(0x088C, ThrottlePos)
end

event.flag(1, "ThrottleCUT") -- CUT
event.flag(2, "moveThrottle") -- THR INC
event.flag(3, "moveThrottle") -- THR DEC

 

Link to comment
Share on other sites

Ok, got it working finally! I really hope i do not get ever again the increments problem.

Quote

-- USER ADJUSTMENT, AMOUNT TO MOVE Throttle
local ThrottleStep = 400
-- END USER ADJUSTMENT

local ThrottlePos = 0

function ThrottleCUT(flag)
        ipc.writeSW(0x088C, 0)
        ipc.writeSW(0x0924, 0)
end

function moveThrottle(flag)
        ThrottlePos = ipc.readSW(0x088C)
        -- ThrottleDEC
        if flag == 2 then
            ThrottlePos =  ThrottlePos - ThrottleStep
                ThrottlePos = math.max(ThrottlePos, -4096)   
        -- ThrottleINC
        else
               ThrottlePos =  ThrottlePos + ThrottleStep
               ThrottlePos = math.min(ThrottlePos, 16383)
        end
        ipc.writeSW(0x088C, ThrottlePos)
        ipc.writeSW(0x0924, ThrottlePos)
end

event.flag(1, "ThrottleCUT") -- CUT
event.flag(2, "moveThrottle") -- THR INC
event.flag(3, "moveThrottle") -- THR DEC

 

Link to comment
Share on other sites

1 hour ago, Joan A said:

No matter what I try the problem persists. One exact hour and the increments are changed for gamepad buttons and keyboard keys.

What on Earth can change increments? There is an acceleration applied if INC controls are sent close together (that's a system which has been in FS since Bruce Artwick's days, before Microsoft), but I don't suppose you are doing something different after 1 hour. Nothing changing after an "exact hour"?  Seems very spooky!

1 hour ago, Joan A said:

Ok, got it working finally! I really hope i do not get ever again the increments problem.

Well, I can't see that being guaranteed since we don't know what is in your system which could be lying in wait for one exact hour then changing things. 😉

Pete

 

Link to comment
Share on other sites

7 minutes ago, Pete Dowson said:

What on Earth can change increments? There is an acceleration applied if INC controls are sent close together (that's a system which has been in FS since Bruce Artwick's days, before Microsoft), but I don't suppose you are doing something different after 1 hour. Nothing changing after an "exact hour"?  Seems very spooky!

Nothing, in fact, the last tests I opened P3D with no controller and tested standard F3,F2 and F1 to be recorded in the log and waited for one exact hour and voila the increments changed. Tested then the same keys which gave me the same entries that the first ones. Tried the same test with default "standard.xml" and "standard.xmlx", the same files with "read only", my own modified files with "read only", tried the three options INCREASE_THROTTLE, THROTTLE_INCR and THROTTLE_INCR_SMALL and the result is always the same.

Very strange, really, I never had this problem with FSX, P3D V3... and across the internet I found only two posts from years ago. So I believe it's something difficult to be tracked.

2013 https://www.flightsim.com/vbfs/showthread.php?279421-Throttle-unresponsive

2016 https://www.prepar3d.com/forum/viewtopic.php?t=119494

18 minutes ago, Pete Dowson said:

Well, I can't see that being guaranteed since we don't know what is in your system which could be lying in wait for one exact hour then changing things. 😉

I know, but I hope that instead of sending the THROTTLE INCR directly which even with the keyboard sends different steps, (I guess that smaller or higher depending on the time being pressed), sending an exact number of steps could bypass the culprit. I don't know, I'll try later a flight EBCI-LGAV with the NGXu and see if when on final approach I found the solution and get the throttles working as expected.

Thanks!

Link to comment
Share on other sites

Ok. I can confirm after one leg, (2 hours sim total) that the problem is gone. The solution was to send the exact steps through the Lua script.
I attach the Lua plugin in case someone else come across the problem in the future.

FSUIPC wins again! Thanks Pete

Throttle.lua

Link to comment
Share on other sites

  • 2 years later...

 

On 7/16/2020 at 9:19 PM, Joan A said:

Ok. I can confirm after one leg, (2 hours sim total) that the problem is gone. The solution was to send the exact steps through the Lua script.
I attach the Lua plugin in case someone else come across the problem in the future.

FSUIPC wins again! Thanks Pete

Throttle.lua 781 B · 1 download

Hi, I have the same problem although I use mouse throttle, where should I use this file you put here?

Link to comment
Share on other sites

1 hour ago, pejikhatar said:

I have the same problem although I use mouse throttle,

How have you assigned the throttle to your mouse? Are you using FSUIPC for this - if so, how? Could you please show me/attach  your FSUIPC ini file.

1 hour ago, pejikhatar said:

where should I use this file you put here?

Lua files go in the FSUIPC installation folder (or in the LuaFiles folder, if that is set). But I am not sure if you can use that lua if you are using the mouse for throttle, and I am not sure how this works. Could you explain further - or do you mean that you are just using the mouse to control the throttle in the VC?
The lua uses flags to control the throttle : flag 1 for cut, 2 for increment and 3 for decrement. FSUIPC doesn't handle mouse assignments (except for specific purposes such as mousewheel trim/move/look), so you cannot assign your mouse to set those flags...

John

Link to comment
Share on other sites

I use middle mouse scroll for throttle, I have FSUIPC but didn't used that to assign mouse, it's an option in p3d. I had the same problem with FSX too, I mean after about an hour throttle sensivity decreased no matter using mouse scroll or F2 or F3 and it gets worse as the time pass, I have to close the sim and lunch again each time and it's too frustrating. 

Link to comment
Share on other sites

24 minutes ago, pejikhatar said:

I have FSUIPC but didn't used that to assign mouse

As I said, you cannot assign to the mouse using FSUIPC, so I cannot help you with the mouse/throttle issue.

You can use the script available in this topic for the F2 and F3 keys. To do this, you need to save the Throttle.lua to your FSUIPC installation folder, and then assign the F2 and F3 keys to the control/event LuaSet Throttle with a parameter of 2 for inc and 3 for dec (and 1 for cut if you want to assign for that). You should also have the lua auto-started by adding it to the [Auto] section of your FSUIPC ini file - see the Advanced User guide if you don't know or are not sure on how to do this. You should also remove the key bindings in P3D/FSX if doing this. You can also select other keys instead, but whatever keys you use make sure they are not also assigned in the FS.

John

Link to comment
Share on other sites

you mean edit throttle.lua like this: 

event.flag(1, "ThrottleCUT") -- CUT
event.flag(2, "F3") -- THR INC
event.flag(3, "F2") -- THR DEC

do I need to do somthing via FSUIP while sim is running through the add-ons menu? 

I'm sorry I'm not an advanced user, I read page40 of user manual but I couldn't figured it out, should I just add [Auto.throttle.lua]? could you please write me the lines so I can paste them?

Edited by pejikhatar
Link to comment
Share on other sites

26 minutes ago, pejikhatar said:

you mean edit throttle.lua like this: 

event.flag(1, "ThrottleCUT") -- CUT
event.flag(2, "F3") -- THR INC
event.flag(3, "F2") -- THR DEC

No, you do NOT edit the lua script. just leave that as it is and place it in your FSUIPC installation folder and add the [Auto] section to your FSUIPC ini file (see below).
Then, start the FS, open up FSUIPC and assign the keys you want to use to  LuaSet Throttle as I said....if you do not know how to assign keys, please see the provided User guide.

28 minutes ago, pejikhatar said:

I'm sorry I'm not an advanced user, I read page40 of user manual but I couldn't figured it out, should I just add [Auto.throttle.lua]? could you please write me the lines so I can paste them?

No, add the following:

[Auto]
1=Lua Throttle

Please re-read that section, this is not that hard to understand, and it is clearly explained....I do not understand how you could think it would be "[Auto.throttle.lua]"....

Note that you need a registered/licensed version of FSUIPC to use lua and the assignment facilities.

Link to comment
Share on other sites

I did all you told me but when I press f2 or f3 nothing happens, I also delete these keys from p3d key binding first.

this is from ini:

[LuaFiles]
1=Throttle

[Auto]
1=Lua Throttle

[Keys]
11=113,8,L1:S,3,1126,0     -{F2: Press=LuaSet Throttle (Flag 3), Release=nothing: no action }-
13=114,8,L1:S,2,1126,0     -{F3: Press=LuaSet Throttle (Flag 2), Release=nothing: no action }-
 

Link to comment
Share on other sites

Please stop posting links (sharing?) to other comments in the same topic - use the "quote" mechanism to reference previous comments, i.e. select the text that you want to reference and then a 'Quote selection' box will appear which will quote the text in your new comment. Alternatively, you can copy/paste the text, and then format as a quote in the menu bar directly above the area where you enter your comment. This will make your messages far easier to understand (take  a look above!).

Please activate logging for Buttons and key operations and Debug/Trace Lua plugins (assuming you are using FSX or P3D). Then generate a short log file showing your issue, i.e. load an aircraft and press the F3 / F3 keys a few times, then exit FSUIPC and show me/attach (not paste contents!) your FSUIPC ini and log files.

I still don't even know what FS or version of FSUIPC you are using, but your files will tell me this...presume it is either FSX or P3D - if you are using MSFS (2020) then this lua script may not work (and you are also posting in the wrong forum...)

You can also take a look at the log file as well, or, better, open the logging console (check Send to console window in logging tab) when you do this to see the log in real-time - first check the lua is started and running without issues, and then that the key presses are triggering the lua moveThrottle function, and check if any throttle events are also sent. This should give you a clue as to why it isn't working, and if you post/attach those files here I can also take a look.

John

Link to comment
Share on other sites

1 hour ago, John Dowson said:

Please stop posting links (sharing?) to other comments in the same topic - use the "quote" mechanism to reference previous comments, i.e. select the text that you want to reference and then a 'Quote selection' box will appear which will quote the text in your new comment. Alternatively, you can copy/paste the text, and then format as a quote in the menu bar directly above the area where you enter your comment. This will make your messages far easier to understand (take  a look above!).

Please activate logging for Buttons and key operations and Debug/Trace Lua plugins (assuming you are using FSX or P3D). Then generate a short log file showing your issue, i.e. load an aircraft and press the F3 / F3 keys a few times, then exit FSUIPC and show me/attach (not paste contents!) your FSUIPC ini and log files.

I still don't even know what FS or version of FSUIPC you are using, but your files will tell me this...presume it is either FSX or P3D - if you are using MSFS (2020) then this lua script may not work (and you are also posting in the wrong forum...)

You can also take a look at the log file as well, or, better, open the logging console (check Send to console window in logging tab) when you do this to see the log in real-time - first check the lua is started and running without issues, and then that the key presses are triggering the lua moveThrottle function, and check if any throttle events are also sent. This should give you a clue as to why it isn't working, and if you post/attach those files here I can also take a look.

John

By activating logging for Buttons.. and Debug/.. now it's working fine, I unchecked them to see if it still works and yes still functional. I don't know what was the issue in the first place. by the way thank you for your time and respond, much appreciations. 

Link to comment
Share on other sites

Most probably the lua wasn't running initially as the [LuaFiles] section would only have been created the first time you ran FSUIPC and so the [Auto[ section would have not started the lua, and the 2nd time everything is correctly in place and so the lua was started.

Anyway, glad its working - hope it solves your issue...

John

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.