Jump to content

Archived

This topic is now archived and is closed to further replies.

EmileB

Read values from and write values to FSX

Recommended Posts

Guys, I hope someone can help me with this one. What I would like to do, is read a value from FSX (PMDG NGX add-on), add an increment or decrement, and then write it back to FSX. Examples :- read the HDG value set in the MCP, add 10 to it or subtract 10 from it, write HDG value back to FSX.- read the ALT value set in the MCP, add 1000 to it or subtract 1000 from it, write ALT value back to FSX. This would allow me full use of the double-deck rotary switches on my "functional MCP". How would I do this in a Lua script ? In actions.lua I found the FSX controls involved with single increments or decrements for CRS, SPD, HDG and ALT but these are only single actions. If, for example, ATC commands to climb from FL150 to FL350 I am turning the knob like an Amsterdam organ grinder rolleyes.gif ... Thanks for any help Praying.gif .

Share this post


Link to post
Share on other sites

I've been very busy beta testing for VRi lately, so my recollection may be a bit vague. The latest LINDA NGX module should have fast Inc and dec commands already included for the MCP dials, i.e. something like HDG-Inc-fast or similar, I'm writing this on my iPad so I'm not sure of the exact verbiage used for those functions, but they are there I think, unless the beta I tried hasn't been released yet by Artem, I seem to remember him making a public announcement in the last 4 or 5 days though, or then again I could have dreamt it, lol.

Share this post


Link to post
Share on other sites

Thanks Andy, for pointing me in the right direction Applause.gif . There are some "fast" functions in the current actions.lua file for the PMDG NGX though not for the MCP dials that I could see. But I just managed to tweak the CRSL fast increase and decrease Lua script that I cobbled together using that file as an example for testing purposes, and it now works a treat dance.gif ! Expanding it to the rotaries for SPD, HDG and ALT should now be a piece of cake. Another thing learned. This whole business of learning to play around with Lua a bit can be frustrating, but it's also fun IMHO !

Share this post


Link to post
Share on other sites

Emile, it depends on the Addon (and to our personal taste if it necessary) if we implement fast rotations or not.PMDG have implemented in the Addon fast rotations, means you can see it in the VC when you rotating the knob fast, that its dials speeding up. But you have to be sure, that you assign via LINDA your (e.g.) HDG_inc to both: normal speed and fast speed!!!!If you don't do that and dial fast, then you get a far slower rotation speed, simply because fast dial is not assigned. On my side I have no problem with the dialing speed in the NGX... However to answer your question:just insert a double function: e.g. function bla bla_fast () HDG_inc () HDG_inc ()end so you have twice the rotation speed ...

Share this post


Link to post
Share on other sites

Thanks a lot, Günter : yes the double function seems to work fine. In fact I run it via a "DO loop" four times which gives me nice instant 10x increments (just as if you turn the outer knob of the double-decker rotary)smile.png .

Share this post


Link to post
Share on other sites

Hi,and make sure not to enable FixControlAccel in FSUIPC, FixControlAccel=Yes in your FSUIPC.ini disables the acceleration when you change values.Maybe this has also effect on rotating knobs (not really sure about this)

Share this post


Link to post
Share on other sites
Hi,and make sure not to enable FixControlAccel in FSUIPC, FixControlAccel=Yes in your FSUIPC.ini disables the acceleration when you change values.Maybe this has also effect on rotating knobs (not really sure about this)
Thanks Roland, good point, I have that option disabled anyway as I've had no need for it. I might enable it temporarily just to see if it does make a difference !

Share this post


Link to post
Share on other sites

×
×
  • Create New...