Jump to content

Condition lever to keyboard


Babbo
 Share

Recommended Posts

Hello all!

Please accept excuses for bumping a frequently stressed theme. I've searched up and down the net, but was not able to find an answer to the following question: how to map a keyboard key to jointly move both condition levers? (I.e. not a quadrant, not a joystick, not the mouse - just the keyboard, precisely, two keys for both directions.)

Thanks a lot for any input!

Link to comment
Share on other sites

2 hours ago, Babbo said:

Hello all!

Please accept excuses for bumping a frequently stressed theme. I've searched up and down the net, but was not able to find an answer to the following question: how to map a keyboard key to jointly move both condition levers? (I.e. not a quadrant, not a joystick, not the mouse - just the keyboard, precisely, two keys for both directions.)

Thanks a lot for any input!

can't be done.

Link to comment
Share on other sites

... anyway, I tried it. So we may discuss the following script - for me it's running fine:

local CL_time
CL_DRef = "LES/saab/CL/manip_common"

create_command("FlyWithLua/LES/Saab/CL_increase",
               "Move condtion lever towards Max",
	       "CL_time = os.clock() + .1\nset(CL_DRef, get(CL_DRef) + .01)\nset(CL_DRef, math.min(get(CL_DRef),1))",
               "if os.clock() > CL_time then\nset(CL_DRef, (get(CL_DRef) + (os.clock() - CL_time) * .05))\nend\nset(CL_DRef, math.min(get(CL_DRef),1))",
               "")
			   
create_command("FlyWithLua/LES/Saab/CL_decrease",
               "Move condtion lever towards Min",
	       "CL_time = os.clock() + .1\nset(CL_DRef, get(CL_DRef) - .01)\nset(CL_DRef, math.max(get(CL_DRef),0))",
               "if os.clock() > CL_time then\nset(CL_DRef, (get(CL_DRef) - (os.clock() - CL_time) * .05))\nend\nset(CL_DRef, math.max(get(CL_DRef),0))",
	       "")

 

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.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...