October 19, 201312 yr I created a couple of more Linda functions for the F1 Mustang that I find useful. If only I could figure out how to shut off the gear horn with a switch I'd have everything. Gregg function F1Must_safetyseats_inc () val = ipc.readLvar("PAXSAFETYSEATBELT") if val < 2 then val = val + 1 ipc.writeLvar("PAXSAFETYSEATBELT", val) end ipc.setbitsUW("0D0C", 64) ipc.control(65823, 300) -- sound ipc.control(65823, 0) -- sound end function F1Must_safetyseats_dec () val = ipc.readLvar("PAXSAFETYSEATBELT") if val > 0 then val = val - 1 ipc.writeLvar("PAXSAFETYSEATBELT", val) end ipc.setbitsUW("0D0C", 64) ipc.control(65823, 300) -- sound ipc.control(65823, 0) -- sound end function F1Must_EngineSync_on () val = 1 LVarSet = "L:EngineSync" ipc.writeLvar(LVarSet, val) ipc.sleep(50) ipc.control(65823, 2) -- knob sound DspShow("EngSync", " on ") end function F1Must_EngineSync_off () val = 0 LVarSet = "L:EngineSync" ipc.writeLvar(LVarSet, val) ipc.sleep(50) ipc.control(65823, 2) -- knob sound DspShow("EngSync", " off ") end Gregg Seipp "A good landing is when you can walk away from the airplane. A great landing is when you can reuse it." i9 64GB RAM, GTX-5090
October 19, 201312 yr Author Well...there is one other thing I'd wish for. The FLC mode doesn't work right with hardware. If you select FLC and try to use the VS knob the wheel moves but it doesn't change the speed. Ok...sigh. But, then if you move the SPD knob the speed resets to 80 and the wheel doesn't turn. It'd be nice if it just mapped to the V/S knob or both knobs moved the wheel. As far as I can tell there isn't an L variable for speed so it's probably as good as it's going to be. Gregg Seipp "A good landing is when you can walk away from the airplane. A great landing is when you can reuse it." i9 64GB RAM, GTX-5090
October 19, 201312 yr Commercial Member To shut the gear horn, use this code, it was taken from the KingAir forum, thanks to Andreas gearhorn.luaipc.control(65823, 327)ipc.sleep(100)ipc.control(65823, 0)
October 19, 201312 yr Author To shut the gear horn, use this code, it was taken from the KingAir forum, thanks to Andreas gearhorn.lua ipc.control(65823, 327) ipc.sleep(100) ipc.control(65823, 0) Worked great. Thank you! Here's my final LINDA function: function F1Must_GearHorn_silence () ipc.control(65823, 327) ipc.sleep(100) ipc.control(65823, 0) ipc.control(65823, 2) -- knob sound DspShow("EngSync", " off ") end Gregg Seipp "A good landing is when you can walk away from the airplane. A great landing is when you can reuse it." i9 64GB RAM, GTX-5090
October 20, 201312 yr Many thanks, if you bundle this once in the Mustang module, you can send this to me and I'll upload it into a new version. Guenter Steiner -------------------------------------------------------------------------------------- Betatester for: A2A, LORBY, FSR-Pillow Tester --------------------------------------------------------------------------------------
October 20, 201312 yr Commercial Member Well...there is one other thing I'd wish for. The FLC mode doesn't work right with hardware. If you select FLC and try to use the VS knob the wheel moves but it doesn't change the speed. Ok...sigh. But, then if you move the SPD knob the speed resets to 80 and the wheel doesn't turn. It'd be nice if it just mapped to the V/S knob or both knobs moved the wheel. As far as I can tell there isn't an L variable for speed so it's probably as good as it's going to be. Hello, You can increase the FLC target value by setting this variable: 65896 To decrease, use this: 65897 This is a basic idea of how it should work, but please note that this is untested code, so you will probably need to modify it: ipc.control(65896, ExistingFSXApVariable + 1) I am not sure if LUA makes it possible to get an existing FSX variable, if it does, then you can get it all working.
October 20, 201312 yr Author You can increase the FLC target value by setting this variable:65896To decrease, use this:65897This is a basic idea of how it should work, but please note that this is untested code, so you will probably need to modify it:ipc.control(65896, ExistingFSXApVariable + 1)I am not sure if LUA makes it possible to get an existing FSX variable, if it does, then you can get it all working. That's interesting. I'll fiddle with it and let you know. Many thanks, if you bundle this once in the Mustang module, you can send this to me and I'll upload it into a new version. Sure thing! Gregg Seipp "A good landing is when you can walk away from the airplane. A great landing is when you can reuse it." i9 64GB RAM, GTX-5090
October 20, 201312 yr Author You can increase the FLC target value by setting this variable:65896 To decrease, use this:65897 This is a basic idea of how it should work, but please note that this is untested code, so you will probably need to modify it:ipc.control(65896, ExistingFSXApVariable + 1)I am not sure if LUA makes it possible to get an existing FSX variable, if it does, then you can get it all working. It turned out to be easier than that! All I had to do was call ipc.control with the values you gave with no parameter. Seems to work perfectly now. The final code is below. I'll bundle up all the changes and send them to Guenter. Thanks! function F1Must_SPD_inc() ipc.control(65896) F1VS = ipc.readLvar("VsWheel") F1VS = F1VS + 5 if F1VS >= 100 then F1VS = 0 end ipc.writeLvar("VsWheel", F1VS) ipc.control(65823, 11) -- knob sound ipc.control(65823, 0) -- knob sound end function F1Must_SPD_fastinc() ipc.control(65896) ipc.control(65896) F1VS = ipc.readLvar("VsWheel") F1VS = F1VS + 5 if F1VS >= 100 then F1VS = 0 end ipc.writeLvar("VsWheel", F1VS) ipc.control(65823, 11) -- knob sound ipc.control(65823, 0) -- knob sound end function F1Must_SPD_dec() ipc.control(65897) F1VS = ipc.readLvar("VsWheel") F1VS = F1VS - 5 if F1VS <= 0 then F1VS = 100 end ipc.writeLvar("VsWheel", F1VS) ipc.control(65823, 11) -- knob sound ipc.control(65823, 0) -- knob sound end function F1Must_SPD_fastdec() ipc.control(65897) ipc.control(65897) F1VS = ipc.readLvar("VsWheel") F1VS = F1VS - 5 if F1VS <= 0 then F1VS = 100 end ipc.writeLvar("VsWheel", F1VS) ipc.control(65823, 11) -- knob sound ipc.control(65823, 0) -- knob sound end Gregg Seipp "A good landing is when you can walk away from the airplane. A great landing is when you can reuse it." i9 64GB RAM, GTX-5090
October 20, 201312 yr Author And here are a few more functions for Nav, Beacon, and Anticollision lights so that they click the same way the rest of the switches do. I've sent these to Guenter as well. Gregg function F1Must_BeaconLight_on() Lights_BEACON_on () ipc.control(65823, 1) -- knob sound ipc.control(65823, 0) -- knob sound end function F1Must_BeaconLight_off() Lights_BEACON_off () ipc.control(65823, 1) -- knob sound ipc.control(65823, 0) -- knob sound end function F1Must_NavLights_on() Lights_NAV_on () ipc.control(65823, 1) -- knob sound ipc.control(65823, 0) -- knob sound end function F1Must_NavLights_off() Lights_NAV_off () ipc.control(65823, 1) -- knob sound ipc.control(65823, 0) -- knob sound end function F1Must_StrobeLights_on() Lights_STROBE_on () ipc.control(65823, 1) -- knob sound ipc.control(65823, 0) -- knob sound end function F1Must_StrobeLights_off() Lights_STROBE_off () ipc.control(65823, 1) -- knob sound ipc.control(65823, 0) -- knob sound end Gregg Seipp "A good landing is when you can walk away from the airplane. A great landing is when you can reuse it." i9 64GB RAM, GTX-5090
October 21, 201312 yr Many thanks, a module will be uploaded by me ASAP! Guenter Steiner -------------------------------------------------------------------------------------- Betatester for: A2A, LORBY, FSR-Pillow Tester --------------------------------------------------------------------------------------
Create an account or sign in to comment