Assign P-40 hydraulics switch through FSUIPC?

Post any technical issues here. This forum gets priority from our staff.
new reply
Dooga
Staff Sergeant
Posts: 357
Joined: 23 Aug 2013, 17:23

Assign P-40 hydraulics switch through FSUIPC?

Post by Dooga »

Hi all, I've started playing around with FSUIPC recently, finally got around to spending that money.

Now a question: is it possible to map the P-40 hydraulics switch directly through FSUIPC, without the A2A configurator? Is there a command code, or do I use that LVARs thing (how?)?

Reason: I map the hydr pump to the button I normally use for toggling the AP. But that button is also used in combination with another button, to toggle the ATC window. When assigning hydr pump through the A2A configurator, it gets activated every time I hit the assigned button, no matter whether the second button is pressed along with it (because I want the ATC window) or not (I want pump).
This means that every time I toggle ATC, the pump turns on - not a showstopper but would be nicer if I could get that sorted.

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Assign P-40 hydraulics switch through FSUIPC?

Post by Gypsy Baron »

Dooga wrote:Hi all, I've started playing around with FSUIPC recently, finally got around to spending that money.

Now a question: is it possible to map the P-40 hydraulics switch directly through FSUIPC, without the A2A configurator? Is there a command code, or do I use that LVARs thing (how?)?

Reason: I map the hydr pump to the button I normally use for toggling the AP. But that button is also used in combination with another button, to toggle the ATC window. When assigning hydr pump through the A2A configurator, it gets activated every time I hit the assigned button, no matter whether the second button is pressed along with it (because I want the ATC window) or not (I want pump).
This means that every time I toggle ATC, the pump turns on - not a showstopper but would be nicer if I could get that sorted.
First you need to define what buttons are to be used for those functions. It sounds as though you have
a 'compound' button assignment for the ATC window and the AP toggle. I can't tell from your description
what button configuration you have or are trying to set up.

For discussion purposes, let's assume the 'common' button is Button 1 and the 'select' Button is button 2.
Then the configuration would be:

If Button 1 is pressed and Button 2 is NOT pressed, Toggle the ATC window.
If Button 1 is pressed and Button 2 is pressed, Toggle the Hydraulic Pump.

The L:Var for toggling the Hyd. Pump is: L:HydraulicPumpControl

You can create a MCRO file which is just a text file with the extension "MCRO".
In that file you can define the Hyd. Pump L:Var and that will then be seen by
FSUIPC4 as an assignable command. You can then construct the needed compound coding.

I have an MCRO file for each of my A2A Aircraft (as well as some others that I fly occasionally).
Here is my A2A_P40.MCRO file:

Code: Select all

[MACROS]
1=L:GunSightSwitchOn=TOGGLE
2=L:OxyMaskOn=TOGGLE
3=L:LandingLightSwitch=TOGGLE
4=L:LandingLightExtendPct=SET
5=L:Battery1Switch=TOGGLE
6=L:PanelLightSwitch=TOGGLE
7=L:Eng1_StarterSwitch=SET
8=L:KlaxonTest=TOGGLE
9=L:GearHornON=TOGGLE
10=L:PrestoneTest=TOGGLE
11=L:FuelGageLight=TOGGLE
12=L:Magnetos1Switch=CYCLIC
13=L:PrimerState=SET
14=L:FSelP40State=CYCLIC
15=L:Eng1_GeneratorSwitch=TOGGLE
16=L:Eng1_CarbHeatSwitch=TOGGLE
17=L:CabinVent=CYCLIC
18=L:HydraulicPumpControl=TOGGLE
19=L:Headphones=TOGGLE
20=L:APUSwitch=TOGGLE
21=L:SystemCondSelectFSX=SET
22=L:SystemCondValueFSX=TOGGLE
23=L:LandingGearLeverPos=SET
24=L:LandFlapsPos=SET
25=L:OnJacks=SET
26=L:FuelPumpManualLeverOn=SET
27=L:EmergencyHydraulicPump=TOGGLE
28=L:HydrPumpManualLeverOn=TOGGLE
29=L:CompassLight=TOGGLE
30=L:Eng1_PropellerControlSwitch=SET
31=L:PropellerSwitchCircut=TOGGLE
32=L:Eng1_OilDilute=TOGGLE
33=L:HydraulicPumpControl=SET
Entry 18 is the Hydraulic Pump L:Var. When FSUIPC4 reads all the MCRO files that are in the Modules
folder it assigns numbers to them that are used for identifying them for coding purposes.

My P40 MCRO file is number 9. The P-40 section of my FSUIPC4.ini file has a single button
assigned for the Hyd. Pump and it looks like this:

21=B66C0=1 PD,15,CM9:18,0 ;//Hydraulic Pump Toggle

The "B66C0=1" portion of that line is a 'qualifier' for my switch/button assignments and the
value in offset 0x66C0 defines what 'mode' my Saitek Dual Throttle Quadrant switches are in.

The Hyd. Pump is assigned to my "D" Quadrant, Switch 15 when in Mode 1. (offset 0x66C0 = 1)

Now, as for the MCRO use, note that the Hyd. Pump line has a reference to the MCRO file (number 9)

"CM9:18,0" This indicates that this is a Command, found in the MCRO file 9, Line 18, with a parameter of 0.

I use location 0x66C0 as my "qualifier" to be able to assign multiple functions to the same switch.

In Mode 0, that switch is assigned to the Mags:

3=B66C0=0 PD,15,C66400,2 ;//Magneto - Left

In Mode 2, that switch toggles the Gunsight:

41=B66C0=2 PD,15,CM9:1,0 ;//Toggle Gunsight

I have a total of 5 'modes' set up for the P-40. That is, each switch has 5 different assignments
based upon the mode number in 0x66C0. One pair of switches increments or decrements that number.

The Advanced Users PDF file has sections describing all of the above operations.

Paul

Image

Dooga
Staff Sergeant
Posts: 357
Joined: 23 Aug 2013, 17:23

Re: Assign P-40 hydraulics switch through FSUIPC?

Post by Dooga »

Paul, what an answer - thank you very much! I'll try this first thing tonight!

Dooga
Staff Sergeant
Posts: 357
Joined: 23 Aug 2013, 17:23

Re: Assign P-40 hydraulics switch through FSUIPC?

Post by Dooga »

Paul, one more question: how can I find out about the LVARs for the various A2A planes? Which is which?

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Assign P-40 hydraulics switch through FSUIPC?

Post by Gypsy Baron »

Dooga wrote:Paul, one more question: how can I find out about the LVARs for the various A2A planes? Which is which?

FSUIPC....load the aircraft on the ramp then open the FSUIPC menu and in the
Buttons & Switches menu assign a button or switch temporarily to the command
"List local panel variables".

Go back to the cockpit and it that button/switch. Then go back to the menu
and under Logging select "New log". This will save the current log file with
the extension log.1. You can open it in Notepad to see the L:Vars for that
aircraft listed.

What I do is select find/replace to remove all the time stamps on each line
and then save the files under the "aircraft name_LVars_date.txt".

As far as what each one does, well, sometimes it is obvious. Other times it takes a bit
of experimentation.

Adding an L:Var to the MCRO file for that aircraft will put it in the FSUIPC menu list and
let you assign it and test it's action.

Paul

Dooga
Staff Sergeant
Posts: 357
Joined: 23 Aug 2013, 17:23

Re: Assign P-40 hydraulics switch through FSUIPC?

Post by Dooga »

Thanks again Paul! I got distracted by that new freeware Zlin the last couple days, tried that approach there to find a way to control the compressor lever - no joy yet, but that's a PEBKAC issue. Will also look at the Spitfire soon, that landing lights switch is refusing to operate with my normal assignment...

I love that Spitfire...

Fabo
Airman First Class
Posts: 80
Joined: 29 Jul 2012, 17:26

Re: Assign P-40 hydraulics switch through FSUIPC?

Post by Fabo »

Hello Dooga,

Don't bother too much, the compressor switch doesn't work (for now anyway)

Dooga
Staff Sergeant
Posts: 357
Joined: 23 Aug 2013, 17:23

Re: Assign P-40 hydraulics switch through FSUIPC?

Post by Dooga »

Fabo wrote:Hello Dooga,

Don't bother too much, the compressor switch doesn't work (for now anyway)

Hmmm... thanks, so it wasn't me ;)

new reply

Return to “P-40 Tech Support”

Who is online

Users browsing this forum: No registered users and 3 guests