Jump to content
The simFlight Network Forums

Assign an axis movement to a button action


Recommended Posts

Hello everybody.

I'am using FSUIPC 4.955

The background is that I would like to use the Saitek Cessna Trim Wheels together with PMDG 737 NGX in FSX. Unfortunately the trim wheels are incompatible with PMDG cause PMDG uses another way to manage the trim wheel else than FSX GA.

I did not found any solution or tweak to resolve this problem.

My idea is to convert the axis change of the trim wheel into the corresponding button command of FSX, NUMPAD 1 or NUMPAD 7 for lever trim up/down.

How could I realize that with FSUIPC?

Thanks for help

Norbert

Edited by jauno
Link to comment
Share on other sites

8 hours ago, jauno said:

I am using FSUIPC 4.955

Sorry, that is well out of date. The supported version is 4.966c. Please update.

8 hours ago, jauno said:

My idea is to convert the axis change of the trim wheel into the corresponding button command of FSX, NUMPAD 1 or NUMPAD 7 for lever trim up/down.

How could I realize that with FSUIPC?

Use the right-hand side of the Axis assignments tab as explained in the user manual. 

Don't assigned to keypresses though unless they are unique to the add-on. Use the FS controls to which those key presses are assigned -- Elev Trim Up and Elev Trim Dn.

Pete

 

Link to comment
Share on other sites

Hello Pete

2 hours ago, Pete Dowson said:

Use the right-hand side of the Axis assignments tab as explained in the user manual. 

Don't assigned to keypresses though unless they are unique to the add-on. Use the FS controls to which those key presses are assigned -- Elev Trim Up and Elev Trim Dn.

This is right. But this works only with FSX airplanes and not within PMDG panes because PMDG doesn't use the FS commands for elevator trimming but an own algorithm. However the keyboard commands work. So the idea to work with the keyboard commands.

Lg Norbert

Link to comment
Share on other sites

19 minutes ago, jauno said:

PMDG doesn't use the FS commands for elevator trimming

PMDG normally provide a heap of "custom controls", as listed in the .h file withing the SDK subfolder of the installation. Any of those can be used in FSUIPC assignments by selecting <custom control> and providing the control number.

Pete

 

Link to comment
Share on other sites

I found the value of the PDMG custom control (=70310) for elevator trim as well as the parameters for <trim up> (=16384) and <trim down> (=8192)

At right hand side of axis assignment I can only send a control while entering or exiting a range not while moving in a range. But how can I send a control every time when I turn the trim wheel (up/down) within the range.

At left hand side I can only send axis values to an offset but I can't send controls with parameters as I want it to do.

Is there a way to realize this?

Norbert

 

Edited by jauno
Link to comment
Share on other sites

13 hours ago, jauno said:

At right hand side of axis assignment I can only send a control while entering or exiting a range not while moving in a range. But how can I send a control every time when I turn the trim wheel (up/down) within the range.

Well, unless you can get a similar effect by using all 10 ranges accommodated, the only way is to use a Lua plug in,. A simple one which keeps the previous value in a Global (via ipc.set) and which checks ehether the new one is higher or lower would do the job: just assign it to your axis using the normal left-hand side assignment. 

The Lua would receive the axis value in ipcPARAM, so it would look like this

prev = ipc.get("MyTrim")
if prev ~= nil and prev ~= ipcPARAM then
   if ipcPARAM > prev then ipc.control(70310, 16384)
   else ipc.control(70310,8192) end
end
ipc.set("MyTrim", ipcPARAM)

Try that. Save it into the Modules folder as, say, "mytrim.lua". The run the sim, then in Axis assignments assign your trimmer to "Lua mytrim".

Test it. Check the FSUIPC4.log afterwards in case I've made a mistake  (sorry, haven't got time to test it here at present).

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.