Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello guys,

I now tried some hours figuring out how I can program the encoder on my throttle to get a greater range when changing the heading.

On standard values via the settings inside the simulator I have to turn it kinda a hundred times to have a full 360 degree change.

May someone help me out please?

cheers

Posted

What FS and version of FSUIPC are you using? What ecent/control are you assigning to for this?
Does your rotary have one button in each direction, or two (fast & slow) in each direction?

FSUIPC provides additional controls for faster heading bug changes:
    Heading Bug Dec Fast
    Heading Bug Inc Fast
You can just assign to those rather  than the standard inc/dec controls.

However, it is more common to want to be able to use both fast and slow increments and decrements. There are various ways to achieve this, depending on your rotary type (2 or 4 button). If you have a 4-button rotary, it will show one button for slow rotation in each direction, and another for fast rotation. Just assign the slow button to the standard controls, and the fast button to the fast controls.

If you have a 2-button rotary, with a single button in each direction, then there are a couple of ways to achieve this. The first is to use a lua script to convert your rotary movement to set virtual fast/slow buttons, depending on the speed that you turn the rotary. A lua script is provided for this, which you can use/adjust for your device, called Rotaries.lua - from the Lua Plug-ins manual:

Quote
rotaries.lua This uses the HID features of the com library to implement fast and slow turning button results for rotary encoders which otherwise only indicate one button press/release for each direction.

The second method is to assign the rotary buttons to both standard and fast controls, and then use an offset condition to determine which control to use. The offset condition can be based on another button press or a key press, so that when you turn the rotary on its own you get slow movement, and when you turn it and the defined button or key is also being pressed/held down, then the fast controls are used - or vica versa.

You can also achieve finer control by using offset 0x07CC with the offset controls Offset UWord Increment and Offset UWord Decrement (or the cyclic ones), which allow you to define the actual inc/dec delta values to use (the standard ones use 1, the fast ones use 10).

John

Posted (edited)
1 hour ago, John Dowson said:

What FS and version of FSUIPC are you using? What ecent/control are you assigning to for this?

I am using FSUIPC7 with the MSFS2020 (Microsoft Store Version) and would it assign to Heading Bug Dec / Inc or Heading Bug Dec / Inc Fast.

1 hour ago, John Dowson said:

Does your rotary have one button in each direction, or two (fast & slow) in each direction?

It is a single button encoder with a push function. (Virpil VPC MongoosT-50CM3)

1 hour ago, John Dowson said:

However, it is more common to want to be able to use both fast and slow increments and decrements.

That sounds great. It would be nice when I have the fast inc when pushing the encoder and the fine adjustment without pushing the encoder.

1 hour ago, John Dowson said:

The offset condition can be based on another button press or a key press, ...

This is by far the best option. Unfortunately I have no idea how to achieve such thing.
I read the "Advanced User Manual" but I do not have a clue where to paste these commands in the .ini file.

May you have a template or something like a video? I really want to learn how to use FSUIPC more efficient.

Cheers

Edited by Phipanjo
Posted
8 minutes ago, Phipanjo said:

I am using FSUIPC7

Then you posted in the wrong forum - there is a specific sub-forum for FSUIPC7/MSFS - I will move this topic to that sub-forum.

10 minutes ago, Phipanjo said:

It would be nice when I have the fast inc without pushing the encoder and the fine adjustment when pushing the encoder.

How does this work exactly? Is this a sticky button, i.e. when you push the encoder you get a button press, and when you press again a release? Or do you hold it pressed and rotate?
Does FSUIPC register a button number when you press the encoder?

14 minutes ago, Phipanjo said:
1 hour ago, John Dowson said:

The offset condition can be based on another button press or a key press, ...

This is by far the best option. Unfortunately I have no idea how to achieve such thing.
I read the "Advanced User Manual" but I do not have a clue where to paste these commands in the .ini file.

So you would like to achieve this on the button press of the encoder?
I can help you with this. If you can assign your rotary to the fast inc/dec controls and check that is working, then show me your FSUIPC7.ini file and let me know the button number on the encoder push, then I can let you know how to use an conditional assignment for this.

John

Posted (edited)
9 minutes ago, John Dowson said:

Then you posted in the wrong forum - there is a specific sub-forum for FSUIPC7/MSFS - I will move this topic to that sub-forum.

Ah sorry, kinda used the first possibility to create the thread.

9 minutes ago, John Dowson said:

How does this work exactly? Is this a sticky button, i.e. when you push the encoder you get a button press, and when you press again a release? Or do you hold it pressed and rotate?

It is a momentary push button. I would hold it down while turning the encoder.

9 minutes ago, John Dowson said:

Does FSUIPC register a button number when you press the encoder?

Yes, I can assign it like every other button in FSUIPC.

9 minutes ago, John Dowson said:

So you would like to achieve this on the button press of the encoder?

Yes, when I hold the encoder down it should let me change the heading bug in fast increments by turning the encoder and without holding the encoder down it should let me change the heading bug in normal, "slow" increments.

9 minutes ago, John Dowson said:

I can help you with this. If you can assign your rotary to the fast inc/dec controls and check that is working, then show me your FSUIPC7.ini file and let me know the button number on the encoder push, then I can let you know how to use an conditional assignment for this.

Nice! Thank you very much, John! When I am at home I will get on it!

Cheers

Edited by Phipanjo
Posted
Just now, Phipanjo said:

Yes, when I hold the encoder down it should change the heading bug in fast increments and without holding the encoder down it should let me change the heading bug in normal, "slow" increments.

9 minutes ago, John Dowson said:

I can help you with this. If you can assign your rotary to the fast inc/dec controls and check that is working, then show me your FSUIPC7.ini file and let me know the button number on the encoder push, then I can let you know how to use an conditional assignment for this.

Nice! Thank you very much, John! When I am at home I will get on it!

Ok, but if you want fast when you hold the encoder in, you want to assign to the standard controls first, not the fast one. When you do this. you will find the corresponding entries in your FSUIPC7.ini that will look something like this (the index numbers [12,13], device letter [A] and button numbers [1,2] will be different):
    12=PA,1,C65879,0 -{HEADING_BUG_INC}-
    13=PA,2,C65880,0 -{HEADING_BUG_DEC}-

To make these conditional on the rotary NOT being pressed, you would need to add a compound button condition to those assignments (see page 21 if the Advanced User guide) so that they are only triggered when the encoder isn't pressed in. Assuming the encoder push registers button 5, on the same device (A in this example), then you would change those assignment lines as follows:
    12=CP(-A,5)A,1,C65879,0 -{HEADING_BUG_INC}-
    13=CP(-A,5)A,2,C65880,0 -{HEADING_BUG_DEC}-

You can then manually add the fast controls, by duplicating those lines, changing the index number (must be unique!) and the control number, resulting in the following:
    12=CP(-A,5)A,1,C65879,0 -{HEADING_BUG_INC}-
    13=CP(-A,5)A,2,C65880,0 -{HEADING_BUG_DEC}-
    
14=CP(+A,5)A,1,C1025,0 -{heading bug inc fast}-
    15=CP(+A,5)A,2,C1024,0 -{heading bug dec fast}-

Just give it a try and let me know if you have any problems.

Also, please note that when editing the FSUIPC7.ini file, either do this with FSUIPC7 not running, or if it is running then open the button assignments window before editing, and when you have saved the changes, click on Reload all buttons to load the changes.

John

Posted
1 hour ago, John Dowson said:

Just give it a try and let me know if you have any problems.

Thank you very very much, John! This is great. Works like a charme.
Now it starts to be more clearly how to add these modifiers. Now I only have to learn what they do exactly.

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.