Jump to content
Sign in to follow this  
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 .


Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

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.


Cheers, Andy.

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 !


Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

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


Guenter Steiner
--------------------------------------------------------------------------------------

Betatester for: A2A, LORBY, FSR-Pillow Tester
--------------------------------------------------------------------------------------

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 .


Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

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)


With kind regards

Roland Pohl
Vice chairman FSC e.V.

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 !

Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

Share this post


Link to post
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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...