Jump to content
The simFlight Network Forums

Possible : blocking throttle lever input ?

Recommended Posts

Hi Pete,

A short while ago I posted about issues with my motorized tq using Fs2Phidgets and the Ifly 737.

I had jerky zigzagging lever movements.

Yesterday I found out that when I disconnect the usb cable from my joystick card ( connected to the hardware levers ) immediately the motorized tq has smooth moving kevers.

So the input from my hardware levers conflict with the Ifly AT.

Fs2Phidgets reads the AT values either directly from Fsuipc or I can use Ifly2Fsuipc ( different offsets ) in between.

That is working fine.

The Ifly AT has a problem with input signal from my hardware levers.

Is there a way I can block my levers inputs directly in Fsuipc when turning on the AT , so I do not have to disconnect the joystick cable ?

Or have Fsuipc drive a relay to disconnect the levers inputs to the Fs pc when the AT is being turned on ( Inalso have the CpFlight mcp and mipboard ).

Thanks in advance,


Link to comment
Share on other sites

Is there a way I can block my levers inputs directly in Fsuipc when turning on the AT , so I do not have to disconnect the joystick cable ?


Of course. Provided, that is, the throttles are assigned in FSUIPC, or, if the interface is such that the throttles are driven directly via offsets, provided you can change those offsets.


Offset driven (skip if using normal assignments)


If they are driven via the normal throttle offsets, 088C, 0924, 09BC and 0A54, then those must be changed to 089A, 0932, 09CA and 0A62 respectively. If this can't be changed then there's no easy way, because the 088C etc set are the true FS throttles.


Either way, need Lua plug-in:


You need a plug-in running which keeps the throttle disconnect flags (in offset 310A) when the A/T is enabled, but clears them when it isn't. I can't help directly with that because I don't know how the iFly A/T is flagged -- you'd need to find out.  But assuming it is via an offset the your plug-in would be structured something like this (where I'm dealing with the default FS A/T indication):

ATstate = false function checkDiscon()    discons = ipc.readUW(0x310A)    if ATstate then        discons = logic.Or(discons, 0xC0C8)    else        discons = logic.And(discons, 0x3F37)    end    ipc.writeUW(0x310A, discons) end function setATstate(off,val)    ATstate = val ~= 0    checkDiscon() end event.offset("DW", 0x0810, "setATstate") event.timer(5000, "checkDiscon") 



Start at the end. The offset event says call "setATstate" whenever the FS offset for "AT Arm" changes. That function simply records this and then calls the function "checkDiscons" to see whether the disconnect flags in offset 310A need changing.


The timer event merely calls the "checkDiscons" function every 5 seconds to ensure the flags stay as we want them -- FSUIPC clears the disconnects at 8-12 second intervals to make sure users aren't stuck forever with a disconnected device.


Note that this logic is grossly oversimplified. The offset 0810 is simple "AT Arm". It doesn't necessarily mean the AT is engaged. To detect that in default FS aircraft you'd also need to check for all these A/P and A/T functions:


Airspeed hold

Mach hold

RPM (N1) hold



It isn't worth me showing that level of complication here because it will probably be all different on the iFly.


When you've got a Lua working (test by assigning a button or keypress to it so you can load and test whilst getting it working), you simply need to get it loaded automaticaly -- use an [Auto] section in the INI file, as described in the dox.




If this is beyond you, or more than you need, then, again if throttles are assigned in FSUIPC, you could simply use the "Throttles off/Throttles on/Throttles toggle" assignable controls in conjunction with or separately to your A/T controls, as you wish.




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.