Jump to content
The simFlight Network Forums

lua for mcppro and 747 pmdg fs9


arcadeair

Recommended Posts

This is my first lua, it show on the mcppro from goflight the information from the 747 pmdg for fs9, this is the first version

Thank you for your contribution. It looks useful. did you find the PMDG offsets yourself?

Just one comment, hopefully helpful to you. I see that all your events call the same function:

event.gfd(lemcppro,"checkallinputs")
event.offset(0x622e,"UW","checkallinputs")
event.offset(0x62AD,"UW","checkallinputs")
event.offset(0x621E,"UW","checkallinputs")
event.offset(0x6230,"UW","checkallinputs")
event.offset(0x62BE,"UW","checkallinputs")
event.offset(0x62BF,"UW","checkallinputs")
event.offset(0x62C1,"UW","checkallinputs")
event.offset(0x621D,"UW","checkallinputs")

That function does this right at the start:

function checkallinputs(model, unit)
		-- retrieve al the values associated with this mode.unit
mngspeed=0
gfd.GetValues(model, unit)

When that function is called because of a change in one of the offsets, the "model" will be the offset and the unit will be the value in that offset. Therefore when you do "gfd.GetValues" the results will be, er, unpredictable.

Luckily it doesn't matter because you don't use any of the values you get from the device in any case -- I assume all the buttons and knobs are assigned more directly?.

You could remove the event.gfd which isn't needed, and the gfd.Getvalues, and maybe re-head the function:

function checkallinputs()

though perhaps the name "checkallinputs" is then also inappropriate? Maybe "checkpmdgoffsets"?

Best Regards

Pete

Link to comment
Share on other sites

HI Pete,

Yes, but founding pmdg offsets would be easily with your wonderful tool, fsinterrogate, thanks for all you made for the fs community ;)

and yes some code are garbage from your gfdisplay original example tool, some cleaning may be necessary in future version

Best regards

Jean Michel

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.