Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I have made some little LUA and MACRO files for different aircrafts the last weeks and d'like to share them here.

MACRO

Explanation:

1) number 1 = the AP turn handle reset.

Insert in the paramter field the number "50" to set the Ap turn handle back to the middle

2) the carbheat switch or turbooverride switch commands can be used with combined key or button actions, Read FSUIPC manual how to edit the FSUIPC.ini for it

So you can switch 4 carbheats with one button or key

3) IntercoolerFlap needs parameter 100 for increase and 1 for decrease.

Same with Window defroster

4) TurboCalibration needs INC parameter 50 and DEC -50

5) map_zoom doesn't work very well; I'm too lazy to have a look into it ;-)

[Macros]
Module="window.dll"
1=L:APTurn=SET

2=L:IntercoolerFlap1=INC
3=L:IntercoolerFlap1=DEC
4=L:IntercoolerFlap2=INC
5=L:IntercoolerFlap2=DEC
6=L:IntercoolerFlap3=INC
7=L:IntercoolerFlap3=DEC
8=L:IntercoolerFlap4=INC
9=L:IntercoolerFlap4=DEC


10=L:CarbHeat1Switch=SET
11=L:CarbHeat2Switch=SET
12=L:CarbHeat3Switch=SET
13=L:CarbHeat4Switch=SET

14=L:map_ZoomFactor=INC
15=L:map_ZoomFactor=DEC

16=L:RMI1ini=TOG
17=L:RMI1=TOG
18=L:RMI2ini=TOG
19=L:RMI2=TOG

20=L:LayerTerrain=TOG
21=L:LayerRangeRings=CYC

22=L:RadioAltSwitchOn=TOG
23=L:RadioAlt2SwitchOn=TOG

24=L:RadioAltRange=TOG
25=L:RadioAlt2Range=TOG
26=L:AltLimit=INC
27=L:AltLimit=DEC

28=L:WindowDefrosterControlKnob=INC
29=L:WindowDefrosterControlKnob=DEC


31=L:Turbo1CalibrationKnob=INC
32=L:Turbo1CalibrationKnob=DEC

33=L:Turbo2CalibrationKnob=INC
34=L:Turbo2CalibrationKnob=DEC

35=L:Turbo3CalibrationKnob=INC
36=L:Turbo3CalibrationKnob=DEC

37=L:Turbo4CalibrationKnob=INC
38=L:Turbo4CalibrationKnob=DEC


39=L:TurboOverrideSwitch1=SET
40=L:TurboOverrideSwitch2=SET
41=L:TurboOverrideSwitch3=SET
42=L:TurboOverrideSwitch4=SET

43=L:APUStarterGenSwitch=cyc

44=L:IntercoolerFlap1Switch=SET
45=L:IntercoolerFlap2Switch=SET
46=L:IntercoolerFlap3Switch=SET
47=L:IntercoolerFlap4Switch=SET

48=L:CowlFlap1Switch=SET
49=L:CowlFlap2Switch=SET
50=L:CowlFlap3Switch=SET
51=L:CowlFlap4Switch=SET

52=L:CF1SMouse=SET
53=L:CF2SMouse=SET
54=L:CF3SMouse=SET
55=L:CF4SMouse=SET


60=L:StartersStart=SET
61=L:StartersBoost=SET
62=L:Primers=SET

63=L:LandingLightExtendSwitch=SET

64=L:StepsLightSwitch=SET

16th dezember: some new macro functions added:

one important is the cowl flaps entry.

You have to combine inside the FSUIPC.ini some functions to get the cowl flaps to work:

example for button 4 of joystick F:

81=RF,4,CM8:48,2

82=RF,4,CM8:52,1

83=UF,4,CM8:48,1

line 81: L:CowlFlap1Switch=SET with parameter 2 and line 82: L:CF1SMouse=SET with parameter 1 must be used to get the cowl flaps work. line 83 is needed at the button release to switch the cowl flap switch back to neutral position.

B377 fuel selector LUA code

-- All Fuel Selectors OFF
if ipcPARAM == 1 then   


	ipc.writeLvar("L:FuelSelE1Knob", 0)
	ipc.writeLvar("L:FuelSelE2Knob", 0)
	ipc.writeLvar("L:FuelSelE3Knob", 0)
	ipc.writeLvar("L:FuelSelE4Knob", 0)


-- All Fuel Selectors 25

elseif ipcPARAM == 2 then


	ipc.writeLvar("L:FuelSelE1Knob", 25)
	ipc.writeLvar("L:FuelSelE2Knob", 25)
	ipc.writeLvar("L:FuelSelE3Knob", 25)
	ipc.writeLvar("L:FuelSelE4Knob", 25)


-- All Fuel Selectors 50

elseif ipcPARAM == 3 then


	ipc.writeLvar("L:FuelSelE1Knob", 50)
	ipc.writeLvar("L:FuelSelE2Knob", 50)
	ipc.writeLvar("L:FuelSelE3Knob", 50)
	ipc.writeLvar("L:FuelSelE4Knob", 50)


-- All Fuel Selectors 75

elseif ipcPARAM == 4 then


	ipc.writeLvar("L:FuelSelE1Knob", 75)
	ipc.writeLvar("L:FuelSelE2Knob", 75)
	ipc.writeLvar("L:FuelSelE3Knob", 75)
	ipc.writeLvar("L:FuelSelE4Knob", 75)

end

All files work at my system with latest FSUIPC version.

no guarantee that they will work for you (but they should, I'm sure - tested only at FSX Acceleration)

Do any codings at your own risk and just do things if you know what you do...

Be patient that I could not support any question. Please inform yourself how to handle MACROS and LUA files and the power of FSUIPC.

Have fun!

- updated 16th dezember 2009

macros added, lua code for fuel selector

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.