-
Content Count
947 -
Donations
$0.00 -
Joined
-
Last visited
Content Type
Profiles
Forums
AVSIM
Media Demo
Downloads
Gallery
Blogs
Forms
Everything posted by Angelo Cosma
-
Old script shows this throttle2 = ipc.readSW(0x0924) Yes Joy 2,6 is correct for 2. I will make the change in the new script to match and report. Changing it 0x0924 still does nothing. I am beginning to think, its this whole auto event nonsense because these old luas worked when commanded by button release.
-
Yeah it was just the ! mark. This is number 2 function ThrottleToIdle_2() while true do throttle2 = ipc.readSW(0x088c) if throttle2 >= 0 then break --exit when no more reverse end ipc.control(65969) -- 65969 = throttle2 incr. Use 65970 for smaller increment ipc.sleep(200) end end event.button( 2, 6 , 2, "ThrottleToIdle_2")
-
Okay we are getting somewhere. It still doesn't work but I am getting a green bar on top of screen with ! in it. function ThrottleToIdle_3() throttle3 = ipc.readSW(0x09BC) ipc.writeSW(0x3380, throttle3); ipc.writeSW(0x32FA, 5); -- display end event.button( 0, 8 , 2, "ThrottleToIdle_3") Thats for throttle 3. No response for throttle 2 which is original from before.
-
This was my Idle1.lua 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(300) -- adjust for speed of increase. 10mSecs = 100 per second end That lua was then commanded as a button release instruction in the buttons assign area in fsuipc under command to send when button release.
-
Al thanks again for all your help I really appreciate it, wow. Yes I know that works, that was my method a few years back. My Idle1-4.luas work now, and achieve a GRADUAL reduction of max rev to idle. My goal is to simulate a smooth reduction to idle instead of full reverse and immediate cut / slam to idle where the plan accelerates for a bit. Problem now is, fly a quad jet, too many button release instructions happen at once and they dont all get seen at the same time vs a 737 or 777 with 2 engines. This is why I contacted Pete and he advised what you have been helping me with thus far.
-
Now I did, editing the two long named ones now. Do I also edit the names in the Auto Section of the fsuipc.ini to match? Okay they are showing in FSUIPC now, and I reloaded all buttons. Still not doing anything the throttle though. I even assigned it in buttons to see if it did something when button was released and still nothing. So maybe theres an issue with the code in the script?
-
Heres a pic Its not keeping the formatting for whatever reason but it looks like your example in note pad. function ThrottleToIdle_3() while true do throttle3 = ipc.readSW(0x09BC) if throttle3 >= 0 then break --exit when no more reverse end ipc.control(65974)--65974 = throttle3 incr. Use 65965 for smaller increment ipc.sleep(300) -- adjust for speed of increase. 10mSecs = 100 per second end end event.button(throttle2 0, 8 , 2, "ThrottleToIdle_3") Does FSUIPC need to refresh somehow to see the newly added lua or sim reboot? BIG EDIT: Okay I found a typo in the lua, I had engine 2 in the joy button line for throttle 3. I tried throttle 2 in sim and it worked. It idled way too quickly tho so I need to adjust ipc sleep? I want to extend the idle time by double maybe a bit more.
-
Okay gonna try this quick with number 3 engine and report back in a couple minutes. Okay nothing is happening when the button is released. Okay this is in the FSUIPC.ini: [Auto] 1=Throttle_to_Idle_1 2=Throttle_to_Idle_2 3=Throttle_to_Idle_3 4=Throttle_to_Idle_4 I also noticed this section (.LUA FILES) [LuaFiles] 1=Idle1 2=Idle2 3=fsiaes1 4=fsiaes2 5=fsiaesns 6=fsiaesnsclr 7=testfsi 8=Idle3 9=Idle4 The newly created one is not listed. The one we are testing is titled: Throttle_to_Idle_3.lua
-
Okay understood, and from FSUIPC the button for engine 3 I checked was Joy 0 and Button number 8. So in the .lua simply putting 0 and 8 there is good? What is that number 2? This is for engine 3 and I added the auto section to the fsuipc.ini function ThrottleToIdle_3() while true do throttle3 = ipc.readSW(0x09BC) if throttle3 >= 0 then break --exit when no more reverse end ipc.control(65974)--65974 = throttle3 incr. Use 65965 for smaller increment ipc.sleep(300) -- adjust for speed of increase. 10mSecs = 100 per second end end event.button(throttle2 0, 8 , 2, "ThrottleToIdle_3")