Jump to content
The simFlight Network Forums

Key press assigned to axis range - repeat rate


Recommended Posts

Hi,

I've assigned a key press to an axis range with the key press to be held while travelling through the defined axis range.

So far so good.

However, compared to what happens when I just press and hold the key on the keyboard, the repeat rate when using the axis seems to be a lot lower.

Is there any possibility to adjust this rate or is the concept so entirely different that something like a "repeat rate" does not apply when using a key press on an axis?

Thanks

Link to comment
Share on other sites

I've assigned a key press to an axis range with the key press to be held while travelling through the defined axis range.

So far so good.

How have you done that?

However, compared to what happens when I just press and hold the key on the keyboard, the repeat rate when using the axis seems to be a lot lower.

I'm really not understanding what you've done, so I can't comment. Can you expand?

Regards

Pete

Link to comment
Share on other sites

How have you done that?

I'm really not understanding what you've done, so I can't comment. Can you expand?

Regards

Pete

Hi Pete,

no problem. I'll try to be more clear.

What I did is:

In FSUIPC axis assignment, I use one of my CH throttle quadrant axes and set up a "From To" range.

In the "Control sent when range is entered", I choose "Key Press/hold", and in the "Parameter" field, I entered the code, e. g. 113 for F2.

Doing so, my expectation is that once I'll enter the set up range with the respective throttle lever, it will act as if I was pressing and holding the F2 key.

Perhaps a little background on what I'm basically trying to achieve:

The PMDG NGX does not play well with a reverser axis assigned through FSUIPC. In order to mimick the reverser axis behavior, I tried to set up an axis that just acts as if holding down the F2 key when entering a certain range, bringing the reverser levers into full reverse and holding them there, and cutting the levers back to idle when leaving this range.

What I did appears to work, but compared to just pressing and holding the F2 key using the keyboard, the reverser levers in the NGX are moved at a slower rate when using the F2 keypress through the axis assignment.

There may be better ways to achieve this or even make the reverser axis work with the NGX. If that's the case, please enlighten me. If not, well - I just wondered how to increase the speed at which the reversers travel into reverse up to the level that can be experienced when using the keyboard instead of the axis assignment.

Link to comment
Share on other sites

Doing so, my expectation is that once I'll enter the set up range with the respective throttle lever, it will act as if I was pressing and holding the F2 key.

Why not check the "repeat whilst in range" option provided, instead, and use the "Key Press and Release" control instead? Come to that, since the F2 keypress is assigned in FSX to "throttle_decr", why not assign to that with repeat action enabled? This would also allow separate reversers for each engine if you wished, using the throttle1_decr and throttle2_decr controls. (I've just tried that and it works okay on the NGX).

Incidentally, I assume you've ruled out having a reverse zone on your throttle axes? That works okay too with the NGX -- I've tried it here using both direct assignments to FSUIPC and to the FS throttle controls. The NGX really doesn't seem very different in these respects to any other aircraft.

What I did appears to work, but compared to just pressing and holding the F2 key using the keyboard, the reverser levers in the NGX are moved at a slower rate when using the F2 keypress through the axis assignment.

Right. so it sounds like repeats are generated -- maybe I do that. I really can't tell without checking. but if so then the repeat rate should be the same as assigning a keypress from a button. Can you compare it please? If it's the same then I know where to look in my code. The repeat rate for your keyboard is set somewhere entirely outside anything FSUIPC has anything to do with, so you can't really compare it.

There may be better ways to achieve this or even make the reverser axis work with the NGX.

The reverser axis built into FSUIPC uses direct control into the simulation engine, which is why it doesn't work on the NGX. But all of the normal FS throttle controls seem to work fine.

You could also look at the User Contributions subforum, check out the thread entitled "Throttle Manager to Allow Axis Forward/Reverse Toggle".

For a dedicated axis you could of course do something a lot simpler than that. The axis can be assigned directly to a small Lua plug-in which simply converts the axis value (the ipcPARAM value in the plug-in) from the +16384 to -16384 range into the 0 to -4096 range needed by the aircraft for reverse (i.e a simple newval = (ipcParam - 16384) / 8 ), then sends it on as the parameter to a throttleN_set control (for separate reversers N=1 or 2) or the throttle_set control for one reverser for both engines.

Regards

Pete

Link to comment
Share on other sites

Hi Pete,

thanks for your (as always :smile: ) comprehensive answer.

I did have two of my quadrant buttons assigned to separate reversers which worked, but in the heat of a landing it was just too much fumbling, so I decided to go for a solution using a single axis for both reverses (although I do have two separate axes assigned to the throttles).

I like your Lua suggestion; going to try this one.

Thanks a lot!

Regards

Dave

Link to comment
Share on other sites

Hi Pete,

sorry to bother you again. I'm too dumb to do the Lua solution.

I understand the calculation you posted, and I understand that I need to do something like ipc.control(<axis throttle set code>, newCalculatedValue) in the script.

However, how would I assign this script to the respective axis? I only found that I could assign lua scripts to an axis as actions when travelling through certain ranges?

Thanks

Dave

Link to comment
Share on other sites

However, how would I assign this script to the respective axis? I only found that I could assign lua scripts to an axis as actions when travelling through certain ranges?

The Lua controls are assignable in the axis assignment section on the left. Select "FS control" not "direct to FSUIPC calibration" -- this isn't a control which is calibrated.

Pete

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.