Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I'm using FSUIPC and PFChid.dll with a custom macro file. I'm trying to get these macros to change L:var values as described in the advanced guide, but nothing is happening. Here's the PFC.mcro file:

[Macros]
1=AttitudeRef+=L:AttitudePlane=INC
2=AttitudeRef-=L:AttitudePlane=DEC
3=CarbHeater+=L:Eng1_CarbHeatSwitch=SET,100
4=CarbHeater-=L:Eng1_CarbHeatSwitch=SET,0
5=CarbHeater2+=L:Eng2_CarbHeatSwitch=SET,100
6=CarbHeater2-=L:Eng2_CarbHeatSwitch=SET,0
7=PFC:Landing+
7.1=L:LandingLightLeftSwitch=SET,1
7.2=L:LandingLightRightSwitch=SET,1
8=PFC:Landing-
8.1=L:LandingLightLeftSwitch=SET,0
8.2=L:LandingLightRightSwitch=SET,0

What I have confirmed:

  • PFChid.log is selecting the correct macro file and name
  • When using Lua Log Lvars, I see these lvars show up in the log
  • 4 months later...
Posted

Hello

Yes it is possible but in two steps.

You start to define your LVAR macros, for example:

1=L:Eng1_CarbHeatSwitch=set

2=L:LandingLightLeftSwitch=set

3=L:LandingLightRightSwitch=set

Then you define the PFC macros

10=CarbHeater+=CM1:1,100  ; single action: call macro 1 with 100 as input

11=CarbHeater-=CM1:1,0 ; single action: call macro 1 with 0 as input

12=Landing+ ; multiple actions

12.1=CM1:2,1 ; call macro 2 with 1 as input

12.2=CM1:3,1 ; call macro 3 with 1 as input

 

In the above example, I assume your PFC.mcro file is the first entry in FSUIPC config file.

If not, change CM1 by CMx where x is the entry number of PFC.mcro inside FSUIPC.cfg.

Finally, it works only with LVAR, I suspect AttitudePlane is an Aircraft variable (A:).

 

Cheers

Fabrice

 

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.