Jump to content
The simFlight Network Forums

Covert Axis to buttons - without ranges


Recommended Posts

Hi Guys,

I've managed to setup everything in the past in all my hardware, but I'm stuck on one change I was thinking of doing.

I have the Saitek Cessna trim wheel, and I want to convert it from an axis to Trim up/down. The reason being that it's not motorized, so if I use the trim buttons on my yoke, it doesn't move. But if I make the wheel work like buttons, I won't know the difference and there will be no "jump" in trim when I use the wheel.

Now normally I would create a whole series of ranges, like my cowl flaps lever, and my gear lever etc, and that works fine.

But this axis is so big that I don't want to have to create 32,000 ranges to make it work. I was hoping to just overlap the whole range of movement, and tell it UP movements should be X button, and DOWN movements should be Y button etc.

Here's my screenshots of what I was trying to do:

https://dl.dropbox.com/u/29331868/Screenshots/TrimDown.jpg

https://dl.dropbox.com/u/29331868/Screenshots/TrimUp.jpg

It doesn't trigger the trim event, or any other button I assign. I suspect I am doing it wrong or this feature only works with small ranges when they are actually entered or exited not when they are moved within.

Would appreciate if anyone can point me in the right direction to convert the axis to buttons along it's whole range.

many thanks

Link to comment
Share on other sites

It doesn't trigger the trim event, or any other button I assign. I suspect I am doing it wrong or this feature only works with small ranges when they are actually entered or exited not when they are moved within.

Correct, as in fact it states on the screen.

The only way to do which you want is to use a Lua plug in which converts the change in axis value to a Trim Inc or Dec. Here's an example:


function checkvalue(val)
if prev ~= nil then
if val > prev then ipc.control(65615)
elseif val < prev then ipc.control(65607)
end
end
prev = val
end

event.param("checkvalue")
[/CODE]

Save this as, "trimwheel.lua", in the Modules folder and add this to your INI file:

[Auto]

1=Lua trimwheel

Run FS and assign your axis, in the normal FS controls assignment on the left, to "Luavalue trimwheel".

Regards

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.