Jump to content
Sign in to follow this  
EmileB

PMDG NGX Lvars for CDU buttons

Recommended Posts

I recently figured out how to use LINDA Tracer and I am absolutely delighted with what a useful tool it is ! Thanks to LINDA Tracer I have managed to identify which LVars are associated with the PMDG NGX CDU buttons. But that's where the problem started. To test, I programmed one of them (for the "A" key) as a FSUIPC macro to be operated with a toggle on my CH TQ just for now. In FSX when I press the CDU A button with the mouse, I can see on the LINDA tracer console that the LVar jumps to 100 then back to 0 and an A appears in the CDU scratchpad. When I operate the CH TQ toggle though, the LVar also jumps to 100 and back to 0 but no A appears in the CDU scratchpad. The LVar involved, is called ngx_switch_573_a. Yes I am aware that the alphanumeric keys can be operated by holding the Tab key while pressing them, but this is just an easy one for testing purposes. The ones I'm most interested in, are the page shortcut keys such as INIT REF etc. Would anyone have an idea why this CDU key works from a mouse click but not from a direct LVar write through FSUIPC ? Perhaps this LVar only shows a status but doesn't actually operate the control associated with the CDU A key ? Sorry if this is perhaps not the right place to ask, but I already posted a question in the PMDG NGX forum which has been totally ignored. I would really appreciate a reply. Many thanks in advance. If I can put this issue to rest - even if it turns out that what I want to do, can't be done so I need to implement Plan B (Key2Mouse) - I will make a donation for your good work. You sure deserve it.


Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

Share this post


Link to post
Share on other sites

Hello Emile, this is absolutely the right place!It is nice to see people now starting to do their researches for LUA Vars... thats the intention of LINDA! You are on the right way, but not completely happy.png It depends from developer to developr if he uses LVars, if he uses controls, a mix of both or maybe anything strange stuff else.So, there's no reciept to say make this and this and then you get the functions. ou have to be like a detective, a hunter ... sitting there and observe and in the right moment: catch the function! laugh.png PMDG has a bit complicated and not so obvisious way to do things:Enable the FSX controls in the LINDA console and you will see next to the LVars also the FSX controls which been used. So, clicking on INIT REF will give you an output on the console of Control: 70178 - 536870912 <unknown> in this case, thats it:the function for LINDA is now

function NGX_FMC_InitRef ()	ipc.control(70178, 536870912)end

For other switches in the cockpit you can use the NGX_switch LVars AND FSX controls.So a switch has e.g. the parameters 0, 50 and 100 for off auto and high.The switch is moving with the LVar, but the function behind is not workingHave a look into the existing NGX LUA with the LINDA Editor. You can then read the LUA Vars for a switch and can say then in with state the switch is .... It sounds a bit complicated, but take a look into the exisitng LUAs via the "Edit module" and you will see many examples. Would be nice to get a list of FMC functions from you... we will implement it seen into the existing NGX module! Günter


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

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

Share this post


Link to post
Share on other sites
Would be nice to get a list of FMC functions from you... we will implement it seen into the existing NGX module! Günter
Hi Günter, Thanks ever so much for your reply ! I really appreciate it and this has given me enough information to carry on. Next month I'll turn 59 so the brain is not quite as fast absorbing new stuff as it used to be blush.png, but with reading up and checking out the existing modules I should get there. If I can manage to complete a list of CDU functions I would be very happy to send it to you somehow. I have just made a donation to the LINDA project, too.

Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

Share this post


Link to post
Share on other sites
Would be nice to get a list of FMC functions from you... we will implement it seen into the existing NGX module! Günter
Well, after an entire afternoon's work I have managed to identify the FSX controls for all the CDU buttons. And I have edited them into my installed actions.lua file. Tested a few on my CH TQ and they seem to work OK. I attach the lua file (saved as a text file since I'm evidently not permitted to upload .lua files) for your information. If you think it's useful, feel free to add it to the NGX module. Sadly, I won't be able to make use of it myself through LINDA. My replica CDU operates with a programmable keyboard encoder and since LINDA accepts input from joystick buttons but not from keystrokes (as far as I can see) I'll have to go with FSUIPC. But using LINDA has been a very worthwhile exercise for me and thanks again for making it available to the flightsim community Applause.gif .

Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

Share this post


Link to post
Share on other sites

Hello Emile, many, many thanks for your donation and of course also for the great work with the CDU functions.Will test them and include them in the next update! Regards,Günter


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

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

Share this post


Link to post
Share on other sites

Günter and ArtemBefore I start, I'd like to congratulate you on a fine and needed piece of work. For years I've worked to cobble together a number of joysticks, consoles, homemade panels, pedals, etc., and each time it required rewriting and/or modification of a variety of macros, lua subunits and ultimately the fsuipc.ini files. I could probably wallpaper my house with the numerous printouts I've generated while reconfiguring my hardware. I'm not a skilled programmer, so LINDA was a welcome change.I love LINDA.. (it's easy for me to say that, it's also my wifes name!!!) ... but.. I'll have to put off depending on it until the next version. I'm in the process of integrating PMDG 737NGX with my 737 hardware and hit a snag. I'm not financially able to go with the marvelous panels I see in cockpits built by various guys on the web.. so I've fabricated my own based on the handy Bodnar BU0836X Joystick Module (http://www.leobodnar.com/). It works fine with LINDA, but I have four of them to interface to my homemade EFIS, MCP and Overhead Panels. When you add in CH Yoke, CH Quadrant, CH Pedal and 2 Saitek boxes (Radio and MultiPanel) you can see the problem. I also programmed a LUA module to allow multiple layers of key assignments to the Quadrant and display an on-screen guide of the key assignments in effect at the time. You can see that my problem is having to give up one of my children to fit the 6 unit limit.Your program also works well with mouse macros. One of the first things I did upon getting my copy of PMDG's masterpiece was to work out all of the button and knob assignments on my units (EFIS, MCP, OVH) with mouse macros (and most worked well). Then came the first patch. They all changed (simple address changes, usually systematic but nevertheless changes). I redid them and moved on. Next patch.. same thing.. wow, this is a pain. Along came LINDA to save the pain... but I had to disconnect part of my overhead (1 of the BU0836X's). I'm also dealing with one of the issues that came up... dialing speed. Using either your lua offsets or mouse macros results in quite a lag when making a big heading, alitude or speed change (same issue in fsuipc.ini button programs). Your program is fine they just didn't provide 10x settings for critical instruments. I did find that using virtual offsets in the Saitek MultiPanel with SPAD worked well (FAST changes) but not all displays reflected the right values.All of this is just an extended attaboy (don't know that in Deutsch). Congratulations!!!Here's my question. All of the macros, I believe, point out guage locations. With each revision of the software they change.. usually just by a few bytes.. I haven't checked to see if they always move as a unit. I took my last set (after the most recent patch) and used a spreadsheet to parse out the locations in hex. Each is separated by 4 bytes and for the overhead I've provided a sorted list that seems similar to the L:Var lists I found on Pete Dowsons site. First, if these are useful to you in sorting out your Linda assignments I can provide more as I find them. (Eventually I'll do every switch or knob I can find) For now I have MCP, EFIS, OVH and some Main Panel.Second, are these the same as the L:Var assignments? Can they be used in lua subprograms.. as you have done? Third, is there a way to program buttons for a separate unit independent of LINDA while LINDA is in use to allow conditional programming?I'll await your response but attach a PDF (if possible) of the table I referred to. I can provide a spreadsheet separately by eMail if you wish. (or the MCRO files).Hope this is of help. (I can also provide photos of my cheapo panels if you'd like)I posted earlier on Pete Dowson's on the Mouse Macros. (http://forum.simflight.com/topic/69059-fsuipc-mouse-macros-for-pmdg-737ngx/page__p__429974__fromsearch__1#entry429974)Ed Fairchild

Share this post


Link to post
Share on other sites

oh, what a long post... ;-) just a little question: why have you gathered all the macros?Why don't you use our NGX module?All your macros are already in the NGX module .. without the danger that they change with every updateblink.png (sorry if this is maybe a dumb question, but I have read your post a bit fast - have to do it more detailed if theres more time...)


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

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

Share this post


Link to post
Share on other sites

Gunter,Günter,I'm retired with a lot of time on my hands;-) .. and I'm not too bright :-(.I started on PMDG issue + 1 day, before I even tried LINDA. I did them all in a spreadsheet from my early PMDG stuff back in XP. Just updated.Now that I've tried LINDA. you're right! I also dictate then punctuate, so rambling is easy!! Sorrry!!!!!Ed F.

Share this post


Link to post
Share on other sites
Whew.gifParty.giflaugh.png

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

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

Share this post


Link to post
Share on other sites
many, many thanks for your donation and of course also for the great work with the CDU functions.Will test them and include them in the next update!
Hi Günter, You're very welcome. I'm happy to contribute when I can. Hopefully they test out OK. As I can't use LINDA for my CDU, I have successfully made a Lua plug-in that will enable me to use the CDU controls via FSUIPC. This would have been SO much more difficult if you hadn't put me on the right track : thank you so much !

Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

Share this post


Link to post
Share on other sites

Hi Emile, Thank you very much for working on this CDU script it is very useful. I notice one slight problem though and I wonder if you noticed it too. The issue is that the number 9 key and LEGS key does not function at all for me, everything else does work perfectly though, have you come across this too?


Cheers, Andy.

Share this post


Link to post
Share on other sites
Hi Emile, Thank you very much for working on this CDU script it is very useful. I notice one slight problem though and I wonder if you noticed it too. The issue is that the number 9 key and LEGS key does not function at all for me, everything else does work perfectly though, have you come across this too?
Hi Andy, Sorry to hear you're having a problem but no, the 9 and LEGS keys work fine for me. Can't think of any reason for this that jumps off the page, so to speak. But I did notice once that when I loaded FSX from a fresh boot followed by a saved situation with the PMDG NGX, the first press on the LEGS button (even with the mouse) did not work. But then I pressed the FMC LSK to get past the initial CDU Menu screen and all was well, even after deliberately going back to the CDU Menu screen. Perhaps there's some kind of initialisation that the CDU has to go through but that's just uneducated guessing on my part Confused.gif . Hope you can get it sorted.

Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

Share this post


Link to post
Share on other sites

Hi Emile, Yeah I've bodged a fix by making a mouse macro just for the 9 and LEGS keys, strangely mouse macros made with the 2d FMC in the NGX cause an exception to be logged by FSUIPC and nothing happens. If I make the same macros in the VC then all is well and it works fine, so I've used this workaround for now. I checked the events via logging in FSUIPC and all was correct and in accordance with what you had posted too, so I'd ruled out an error there, very strange indeed. I'll have another play tomorrow and see if what you mention above makes any difference. It's a shame because everything else works absolutely perfectly, VRinsight has made a dll from the settings you found and from the stuff the LINDA team has found and every button and knob bar these two on the CDU2 work great. We even have everything on the MCP2 working direct without having to assign key presses, still no display sync yet that will have to wait for the SDK. Hopefully we will figure it out eventually, otherwise my bodge would require a registered version of FSUIPC for all VRi customers who want to use the NGX, or then again it could just be a problem local to my system, very strange.


Cheers, Andy.

Share this post


Link to post
Share on other sites

Hi Andy, Hope you'll get it sorted. Yes these niggles are enough to drive you insane sometimes mad.gif when everything else you've done, works fine ! As far as I know, a friend of mine has the VRInsight CDU II so he'll be keenly anticipating the interface to the PMDG NGX.


Cheers,
Emile Bax.


Boeing777_Banner_Pilot.jpg

Share this post


Link to post
Share on other sites

Hi Emile, We sussed it out eventually, it was a subtle typo in the script you posted here, you must have corrected it at some point at your end and forgot about it, all is working well now, thanks again.

function NGX_CDU_LEGS () --ipc.control(70184, 536870192) -- <<ERR ipc.control(70184, 536870912)endfunction NGX_CDU_9 () --ipc.control(70201, 536807912) --- <<ERR ipc.control(70201, 536870912)end

Cheers, Andy.

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