The MCRO files are simply text files with the 'MCRO' extension that informs FSUIPC of the existence of L:Vars...the
Local Variables present in the aircraft gauges so that they may be used to read or write to the functions via FSUIPC.
Here is a sample of portions of my L-049 MCRO file:
[MACROS]
1=L:WingflapWarningLampTestSwitch=TOGGLE
2=L:FireTestSwitch=SET
3=L:CarbHeat1Switch=TOGGLE
4=L:CarbHeat2Switch=TOGGLE
5=L:CarbHeat3Switch=TOGGLE
6=L:CarbHeat4Switch=TOGGLE
7=L:InverterSwitch=TOGGLE
8=L:Eng1_FuelTankCutOffLever=TOGGLE
9=L:Eng2_FuelTankCutOffLever=TOGGLE
10=L:Eng3_FuelTankCutOffLever=TOGGLE
11=L:Eng4_FuelTankCutOffLever=TOGGLE
12=L:Propeller1SwitchRPM=SET
13=L:Propeller2SwitchRPM=SET
14=L:Propeller3SwitchRPM=SET
15=L:Propeller4SwitchRPM=SET
16=L:PropellerMasterSwitchRPM=SET
17=L:Feather1Switch=SET
18=L:Feather2Switch=SET
19=L:Feather3Switch=SET
20=L:Feather4Switch=SET
.
.
.
.
84=L:Engine1ValvesSwitch=SET
85=L:Engine2ValvesSwitch=SET
86=L:Engine3ValvesSwitch=SET
87=L:Engine4ValvesSwitch=SET
88=L:ThrottleLock=SET
89=L:CHTselectorPos=CYCLIC
90=L:FuelDumpLeftLeverState=DEC
91=L:FuelDumpRightLeverState=DEC
92=L:FuelCrossfeed1Lever=SET
93=L:FuelCrossfeed2Lever=SET
94=L:FuelCrossfeed3Lever=SET
95=L:FuelCrossfeed4Lever=SET
96=L:FireEngineSelectorState=CYCLIC
97=L:FireBottle1Switch=TOGGLE
98=L:FireBottle2Switch=TOGGLE
99=L:Co2Release2Switch=TOGGLE
100=L:FuelDumpLeftLeverState=INC
101=L:FuelDumpRightLeverState=INC
The MCRO entry describes how the L:Var is to be treated, a value SET, or TOGGLED in the case of a binary function. CYCLIC
in the case of a multi-position switch that can cycle through a range of values and repeat..1,2,3,1,2,3
INC and DEC indicate that the L:Var is to be incremented or decremented, say 2 switches to increase or decrease the HDG bug.
The MCRO file(s), I have one for each of my aircraft, is simply placed in the Modules folder. FSUIPC will read the file(s) and add
the L:Vars to the menu of assignable commands.
One can define multiple actions to an L:Vars so that one switch does one action, another a different action:
140=L:CowlFlap1Upper=SET
141=L:CowlFlap1Upper=INC
142=L:CowlFlap1Upper=DEC
I have lines in my INI that allow me to open or close the cowl flaps incrementally or SET them immediately to a specified
position....13%, 25%, 100%. Lots of flexibility.
I have a number of other 'neat things' that can be accomplished with FSUIPC assignments, such as multiple functions
for any given switch using the 'conditional assignment' features of FSUIPC. Think of this as allowing for different 'mode' sets.
The simplest implementation would be using the 'pinkie switch' on a joy stick as the mode switch. Not activated, one command
is executed for switch X, activated, a different command is executed. This essentially doubles the number of switches
available to you
200=CP(-C,6)D,14,CM25:92,0 -{Macro A2A_L049: L:FuelCrossfeed1Lever set}-
201=CP(+C,6)D,14,CM25:8,0 -{Macro A2A_L049: L:Eng1_FuelTankCutOffLever tgl}-
Controller C, button 6 is my Saitek X45 pinkie switch. Controller D switch 14 is on one of my Saitek Throttle Quads.
CM25 is the number assigned to my L-049 MCRO file and 92 and 8 are the line numbers of the L:Vars used here.
Now, if like me, you would prefer to do most everything via switches and limit the amount of mouse usage, you can
use another technique to give you as many 'modes' as you want/need.
This involves a different 'conditional assignment' methods. One that uses a 'user defined offset' to hold the current 'mode' number,
I use the offset 0x66C0, the first byte in the block of user defined offsets. The construct is used by preceding something
like the two examples above with the conditional requirement:
200=B66C0=8 CP(-C,6)D,14,CM25:92,0 -{Macro A2A_L049: L:FuelCrossfeed1Lever set}-
201=B66C0=8 CP(+C,6)D,14,CM25:8,0 -{Macro A2A_L049: L:Eng1_FuelTankCutOffLever tgl}-
IF, and ONLY IF, Offset 0x66C0 contains the number '8' will these lines be evaluated. Now a similar set of entries for the
same controller and switches but in a different 'mode'
31=B66C0=2 CP(-C,6)D,14,CM25:132,0 -{Macro A2A_L049: L:WiperSwitch tgl}-
32=B66C0=2 CP(+C,6)D,14,C65560,0 -{STROBES_TOGGLE}-
One pinky switch and one controller switch now has 4 possible actions.
On my Dual throttle quads I have 12 switches (6 double throw) of which I use the pair closest to my on my left
to implement the 'mode change' function. The top switch increments the value in 0x66C0 and the bottom decrements that value.
They are CYCLIC wrapping around going up or down based of the number of Modes I have defined. in the case of the Connie
that would be 12. On my quads the other 10 switches yield a possible 120 unique actions !
!3=-{SWITCHES 4 & 5 ON THE QUADRANT USED TO SELECT THE MODE}-
600=PA,4,Cx510066C0,x000C0001 ;//INC BY 1,MAX 11 THEN 0,CYLCLIC -{offset byte cyclic inc, offset 66C0 (Incr=1, Limit=12)}-
601=PA,5,Cx610066C0,x000C0001 ;//DEC BY 1,MIN 0 THEN 11,CYLCLIC -{offset byte cyclic dec, offset 66C0 (Decr=1, Limit=12)}-
I have a small Lua script (one for each of my planes) that displays a message with the current assignments for the mode set.
When I change the mode the message appears of a few seconds or I can hit the F10 key to trigger the display.
In the case of the Connie, most modes have the 'double conditional assignment' coding so that the Lua display will be 4 lines.
the first 2 lines show the assignments for the upper and lower switches with the pinkie NOT engaged. The bottom 2 lines
show the assignments when the Pinkie switch is engaged.
In previous aircraft that were not as complex as the Connie I only used the user-defined-offset programming, still I was able to control aircraft such as the B-17G with 9 mode settings. I can go from cold & dark to getting into the air just by using those
10 switches
Another thing I do is combine multiple actions in a single switch and mode simply by entering the desired code for the actions
with the same controller and switch defined. In the case of the B-17G when I hit one of my 4 engine start/mesh switches, the
start will also set the primer to that engine as well as the fire extinguisher. One of the 10 switches activates the primer and
the other 'clears' the switches and returns the primer and fire ext back to default.
20=B66C0=1 PD,14,CM6:5,0 ;//STARTER ENG 1 -{Macro A2A_B17G: L:Starter12Start set}-
34=B66C0=1 PD,14,CM6:30,1 ;//SET PRIMER SELECT TO ENG 1 -{Macro A2A_B17G: L:PrimerSel set}-
38=B66C0=1 PD,14,CM6:37,1 ;//SET FIRE EXT. SWITCH TO ENG 1 -{Macro A2A_B17G: L:FireEngineSelected set}-
28=B66C0=1 PA,2,CM6:5,1 ;//CLEAR STARTER 1/2 -{Macro A2A_B17G: L:Starter12Start set}-
29=B66C0=1 PA,2,CM6:6,1 ;//CLEAR STARTER 3/4 -{Macro A2A_B17G: L:Starter34Start set}-
30=B66C0=1 PA,2,CM6:7,1 ;//CLEAR MESH 1/2 -{Macro A2A_B17G: L:Starter12Mesh set}-
31=B66C0=1 PA,2,CM6:8,1 ;//CLEAR MESH 3/4 -{Macro A2A_B17G: L:Starter34Mesh set}-
32=B66C0=1 PA,2,CM6:30,0 ;//SET PRIMER SELCT TO OFF -{Macro A2A_B17G: L:PrimerSel set}-
42=B66C0=1 PA,2,CM6:37,0 ;//SET FIRE EXT. SWITCH TO OFF -{Macro A2A_B17G: L:FireEngineSelected set}-
Lots of possibilities if you are familiarwith hand editing the INI file. Mine is around 7000 lines long
Paul