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 .


Cheers,
Emile Bax.

ugcx_banner.png&key=01b5683e492e3b742827

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.

ugcx_banner.png&key=01b5683e492e3b742827

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, Hifi, Simstarter, AivlaSoft, LORBY 
--------------------------------------------------------------------------------------

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.

ugcx_banner.png&key=01b5683e492e3b742827

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.

ugcx_banner.png&key=01b5683e492e3b742827

Boeing777_Banner_Pilot.jpg

Share this post


Link to post
Share on other sites

  • 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.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    42%
    $10,670.00 of $25,000.00 Donate Now
×
×
  • Create New...