FS9. FSX & P3D CTD Guide - NEW!
FSX / P3D Configuration Guide - UPDATED!
Simulation's Premier Resource!
AVSIM is a free service to the flight and simulation communities. Please help us keep it that way. Donate what you can today! Thank you for your support!
Reverse thrust SaitekFSUIPC LUA
11 replies to this topic
Posted 15 March 2012 - 03:52 AM
Hey guys, this is in regards to reverse thrust. As of now my Saitek throttles are set up to do reverse thrust by the use of the button when the lever is fully pulled back. (Ex. Throttle pulled back and pressing button, under button assignments of FSUIPC (Throttle 1 Decrease) Repeat when held is ticked) (When button is released "Throttle 1 Cut")My question, is there a way to gradually reduce reverse thrust back to idle, rather than how it performs right now (The revesers stow too fast and end up generating forward thrust)? Maybe when the button is released it could command idle reverse, then go to Idle? I asked this question over at FSUIPC forums and Pete told me to create an LUA script. I tried an example he provided however I am still not happy with how they perform. Does anyone have any experience here, and could perhaps help me out on this. If I can get this to work, it would make my day!Thanks guys, Angelo.
Please donate today!
Posted 15 March 2012 - 05:32 PM
Of course there is, but not without a sacrification:1) assign a separate axis to the reverser axis2) split the throttle axis into two ranges, throttle and reverser.If you want to get a smooth reverse back, you need an axis.EDIT: Or... I just have to think about this for a while: it should be possible with a Lua plugin, basically telling it to repeat the incr command at very slow rate...EDIT2: The question here is though, if it can be stopped at idle. How do you program lua to slow repeat, and that until the cut range. Hmmm.....
Posted 16 March 2012 - 01:21 AM
Okay this is what Pete recommended, but it still idles too soon before the engines can wind down.while true do throttle1 = ipc.readSW(0x088c) if throttle1 >= 0 then break --exit when no more reverse end ipc.control(65964) --65964 = throttle1 incr. Use 65965 for smaller increment ipc.sleep(10) -- adjust for speed of increase. 10mSecs = 100 per secondend
Posted 16 March 2012 - 04:11 AM
65965, what should I do, increase or decrease this value? Should I do adjust that in conjunction with the ipc.sleep?
Gonna try it in the evening, but I guess you could adjust it with the ipc.sleep, increas the number, and you'll get a slower repeat rate, or you can use the 65965 command to use the inc small command.
Posted 16 March 2012 - 03:43 PM
Pete said, learn and DIY.But as I feel generous, and thankful for your brief description of the yoke, this should do it quite well:Throttle1, set this Lua for "when button released" action:while true do throttle1 = ipc.readSW(0x088c) if throttle1 >= 0 then break --exit when no more reverse end ipc.control(65964) --65964 = throttle1 incr. Use 65965 for smaller increment ipc.sleep(500) -- adjust for speed of increase. 10mSecs = 100 per secondendAnd Throttle2:while true do throttle2 = ipc.readSW(0x0924) if throttle2 >= 0 then break --exit when no more reverse end ipc.control(65969) --65969 = throttle1 incr. Use 65965 for smaller increment ipc.sleep(500) -- adjust for speed of increase. 10mSecs = 100 per secondendSave both as separate Lua files of course, and assign them to respective commands for throttle 1 and 2 buttons on the saitek below-axis-buttons.[attachment=40124:Clipboard01.jpg]I hope though that you really do go through learning lua programming, as it's really helpful to achieve many custom things in the simulator, making it way more real than we're used to.Combine that with Linda and it's power, and that's it.I'm definitely into really understanding it.
Posted 16 March 2012 - 05:12 PM
Hey Kosta thank you so much for your help, and in breaking it down for me. I gave those PDF's a read through, there were just so many numerical values I didn't know where to start.I can't wait to get home and try these vales.On a side note I'm getting some replacement parts from PFC to stiffin up my rudder pedals.How is your yoke decision coming along.Thanks again,Angelo
Posted 16 March 2012 - 05:35 PM
Alright. If you want to speed up or slow down the response, just change the sleep number (currently 500).I decided to keep the desktop version. As much I wanted the stand version, it was just too much for my room and for my purpose.Should be arriving next week.