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

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.