BaobobMiller Posted November 3, 2011 Report Posted November 3, 2011 (edited) Hello all- Here I have uploaded (attached) a zip file with two scripts in it. The scripts are my attempt at making all the "broken" knobs and switches in the Duke Turbine. assignable to hotkeys and buttons through FSUIPC. Please understand I had never seen lua until two nights ago when I came across another post in this forum dealing with the oil doors... or was it the ignition switches. I would really appreciate it if someone who actually knows lua could take a look at them and give me some feedback or point out mistakes. So far they work fine on my system and anyone who wants them is welcome to download them and use them... improve them... etc. I am in no way claiming any kind of copyright protection or anything. I was just frustrated that I has to use a mouse to fly the plane. Thanks Bao UPDATE I have added version 1.1 to the downloads to address some bugs that I found in a few of the "cycle" routines. I left the 1.0 versions of the files in case I accidentally messed up something else while I was editing. Incidentally Some of you may have noticed an incorrect parameter in the first release as well feel free to take a look, and as always... feel free to make changes, redistribute, etc. just please add your name to any changes you make so we can keep track of "who knows how to do what". DukeLUAs.zip DukeLUAs_V1.1.zip Edited November 11, 2011 by BaobobMiller
Pete Dowson Posted November 3, 2011 Report Posted November 3, 2011 I would really appreciate it if someone who actually knows lua could take a look at them and give me some feedback or point out mistakes. They look pretty good. Thanks for the contribution. Since you asked, the only thing i would consider doing, just to make them a little more efficient, would be to use "elseif" for each alternative test on ipcPARAM after the first, so the value doesn't have to be uselessly compared with every possibility. In other words, instead of if ipcPARAM == ... then .... end if ipcPARAM == ... etc, you do if ipcPARAM == ... then ... elseif ipcPARAM == ... etc with one 'end' after the last alternative. Regards Pete
BorisTheSpider Posted November 8, 2011 Report Posted November 8, 2011 Thanks so much for these. I was trying to kludge the oil doors (cowl flaps on the piston) and found your scripts. I have yet to test anything other than the oil doors / cowl flaps, but I have one small fix. When the cowl flaps were in the fully open position, calling the increment position functions (parameters 49 or 59 for left and right respectively) was cycling them back to closed. Not sure why. The fix was simply to test for them being set to 2 and then if they are already set to 2 set val=2 again so the writeLvar doesn't set them back to 0. Like this: if ipc.readLvar(LVarSet) == 2 then val = 2 end Thanks again, I'll test some more functions soon. Paul
peter er Posted November 9, 2011 Report Posted November 9, 2011 Hallo Bao, Thank you for your two Zip-Files. I did test them, and they are wonderful, ( please lett us kow if you do any other Lua-scripts for the Duke or any other plane, I am very interestid) Thank you best regards Peter
BaobobMiller Posted November 11, 2011 Author Report Posted November 11, 2011 An updated version of the two scripts has been added (right next to the first one in the first post for this thread. just a few bug fixes. but they are important fixes depending on how you are using the scripts there have been no changes in functionality so just replacing the files in you modules folder will do the trick. (No need to reconfigure your hot keys and switches in other words.) Bao
simonissell Posted January 7, 2012 Report Posted January 7, 2012 Thanks for these scripts, very very useful! Has anyone worked out how to get the Autopilot VS buttons working (VS, Up and Down)? I've be messing around with lua today but can't get them to work. About all I've managed to do is get the VS button animation to play, but the actual vertical speed is not displayed. Regards, Simon
Alpaslan Posted March 14, 2012 Report Posted March 14, 2012 I unzip the folder, and copied two files into modules folder. But I don't see lua in FSUIPC button and switches menu..Am I doing something wrong here ? need help please.
texfly Posted October 21, 2012 Report Posted October 21, 2012 Great stuff. I have modified the code and added few functions...all works! I have a question: I would like to have a LED ON (GoFlight module) when, for example, the ignition switch is AUTO. I have the instruction gfd.SetLights(GFT8, 0, 7) but I'm not sure how to read that specific value (Ignition switch status). Thanks for the help.
Cleaner Posted December 28, 2016 Report Posted December 28, 2016 Using BaobobMiller lua scripts I have programmed buttons on my joystick like this TY BaobobMiller.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now