Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Pete,

I got a list of lvars from Aerosoft CRJ and I want to turn them into keyboard commands but I don't know how? I new to using Lvars and I want to be able to control the mcp knobs from my keyboard. Below are a list of lvars from aerosoft. Can you help me?

Dan

0373: ASCRJ_FCP_WHEEL
0374: ASCRJ_FCP_CRS1_CHANGE
0375: ASCRJ_FCP_CRS2_CHANGE
0376: ASCRJ_FCP_SPEED_CHANGE
0377: ASCRJ_FCP_HDG_CHANGE
0378: ASCRJ_FCP_ALT_CHANGE
0379: ASCRJ_FCP_WHEEL_CHANGE
0380: ASCRJ_FCP_SPEED_INFO
0381: ASCRJ_FCP_SPEED_MODE
0382: ASCRJ_FCP_HDG_INFO
0383: ASCRJ_FCP_ALT_INFO
0384: ASCRJ_FCP_WHEEL_INFO
0385: ASCRJ_FCP_WHEEL_MODE
0386: ASCRJ_YOKEC_APDISC
0387: ASCRJ_YOKEF_APDISC
0388: ASCRJ_TQ_TOGA_1
0389: ASCRJ_TQ_TOGA_2

0391: ASCRJ_MCDU2_KYBD_TOGGLE
0392: ASCRJ_VAR_AP_LAT_ACTIVE
0393: ASCRJ_VAR_AP_LAT_ARMED
0394: ASCRJ_VAR_AP_VERT_ACTIVE
0395: ASCRJ_VAR_AP_VERT_ARMED
0396: ASCRJ_VAR_AP_LOC_CAPTURE
0397: ASCRJ_VAR_AP_GS_CAPTURE
0398: ASCRJ_VAR_AP_ALT_HOLD
0399: ASCRJ_VAR_AP_ALT_CAPTURE
0400: ASCRJ_VAR_AP_USE_MACH
0401: ASCRJ_VAR_AP_SELMACH
0402: ASCRJ_VAR_AP_SELIAS
0403: ASCRJ_VAR_AP_SELALT
0404: ASCRJ_VAR_AP_SELVS
0405: ASCRJ_VAR_AP_SELHDG
0406: ASCRJ_VAR_AP_SPDTREND
0407: ASCRJ_IAS
0408: ASCRJ_IAS_TREND
0409: ASCRJ_IAS_DIFF

0651: ASCRJ_ECAM_PRI
0652: ASCRJ_ECAM_STAT
0653: ASCRJ_ECAM_ECS
0654: ASCRJ_ECAM_HYD
0655: ASCRJ_ECAM_ELEC
0656: ASCRJ_ECAM_FUEL
0657: ASCRJ_ECAM_FCTL
0658: ASCRJ_ECAM_AICE
0659: ASCRJ_ECAM_DOORS
0660: ASCRJ_ECAM_CAS
0661: ASCRJ_ECAM_BLANK
0662: ASCRJ_ECAM_MENU
0663: ASCRJ_ECAM_UP
0664: ASCRJ_ECAM_DOWN
0665: ASCRJ_ECAM_STEP
0666: ASCRJ_ECAM_SEL
0667: ASCRJ_EICAS

 

choose files...---------Click to choose files.url

Posted
35 minutes ago, danwrinn said:

I got a list of lvars from Aerosoft CRJ and I want to turn them into keyboard commands but I don't know how?

You'll need to make a text file containing macros and put it into the Modules folder. Say CRJ.mcro.

Look in the FSUIPC Documents subfolder in the Modules folder. There you will find a document FSUIPCx for Advanced Users (where x is 4 or 5 depending on your version). Search for the section entitled Macros to Change LVars. That tells you exactly how to make macros to do what you want. Just number the lines 1=, 2=, 3= etc (the number isnt used. it is just part the the CFG/INI format used for the file).

Then load up the sim, and in FSUIPC Keys assignments drop-down you will find all your macros listed as CRJ:name ... ready for you to assign as you wish.

Try just one and test it first just so you know what you are doing thereafter.

Pete

 

Posted
1 minute ago, danwrinn said:

Can you write me an example of the code I am new and don't have a clue what I  am doing

Well, it is precisely as written in the documentation! For example:

[Macros]
1=L:ASCRJ_FCP_WHEEL=Set

saved as "CRJ.mcro"

would add the entry CRJ:L:ASCRJ_FCP_WHEEL to the assignments list. The value you want to "set" would be the parameter in your assignment. If you wanted a fixed number make the MCROO file line show this, thus:

1=L:ASCRJ_FCP_WHEEL=Set,value

where value is whatever you want written. (But if you have a fixed value like this bear in mind you can't use that same L:Var with a different value, unless you make another MCRO file with a different name (eg. CRJ2.macro). It is more flexible toput the value as the parameter when assigning.

Pete

 

Posted

Pete,

First thanks for the help. second I tried to make one on my own and it still is not working 

[Macros]
1=L:ASCRJ_ECAM_DOORS=Set

What am I doing wrong?

 

thirdly, I don't understand what you are saying about the differnent paramatter below, can you explain it to me better. I am not a code writer. i'm just a disabled guy trying to make the jet more accesible for me. Also do i have to make a macro file for ever key command

 

1 hour ago, Pete Dowson said:

 

where value is whatever you want written. (But if you have a fixed value like this bear in mind you can't use that same L:Var with a different value, unless you make another MCRO file with a different name (eg. CRJ2.macro). It is more flexible toput the value as the parameter when assigning.

Pete

 

9

 

Posted
4 hours ago, danwrinn said:

First thanks for the help. second I tried to make one on my own and it still is not working 

[Macros]
1=L:ASCRJ_ECAM_DOORS=Set

What am I doing wrong?

What do you mean "still not working"? "Stil"l, as in "you tried before and it didn't work"? And what exactly is not working?

Without knowing EXACTLY what you are doing I can't tell you what you are doing wrong. But if you saved those two lines above in a file called, say "CRJ.mcro", and this was properly saved in the Modules folder, and THEN loaded up P3D or FSX or whatever it is you are using, then the macro "CRJ:L:ASCRJ_ECAM_DOORS" would appear for assignment, in its correct alhabetical order, in the drop-down list for any Key or Button assignment. This would even be true if the L:Var ASCRJ_ECAM_DOORS didn't exist or the aircraft wasn't even loaded yet.

4 hours ago, danwrinn said:

thirdly, I don't understand what you are saying about the differnent paramatter below, can you explain it to me better. I am not a code writer.

You don't need to be a "code writer". The L:Vars are not JUST names. They must have values associated with them. It is the values which really mean something, whether it is simply 1 for "ON" and 0 for "OFF", or 545 for something like a throttle value. If you want to use L:Vars it is because you want them to do something, right? Well, to make them DO something you have to set whatever value that is needed to make that happen!

This value is the "parameter", and I call it that because that is how the place in the assignments screen for the value is labelled.

4 hours ago, danwrinn said:

Also do i have to make a macro file for ever key command

No, as I said, just add a new line for each in that one file. Use a new line number (the 1= in your file so far) for each line, so 2= then 3= etc etc).

I really cannot explain this any more clearly. I am not a teacher, I am just anoother disabled guy (sight in my case) trying to help but I do have limits. Sorry.

But for me to say what you are "doing wrong" you really do have to spell out what you are "doing". OK?

Pete

 

Posted
7 hours ago, danwrinn said:

I get what you are saying but how do I use for the value and how do I figure them out?

I'm sorry, that is something I don't know and can't really help with. Ideally the aircraft author should publish these, but since they are really internal design matters that never happens.

What folks do is experiment. On way to see what values they take is to use the Log LVars.lua plug-in supplied in the Lua plugin examples ZIP. Which put that in your modules folder, load the Sim, and assign a keypress or button to "Lua Log Lvars". Then, if you use that, it gives you a real-time log of the values on screen. You can operate the switches and see how the values change.

Pete

 

Posted

Pete,

I set up  L:vars for all the EICAS buttons in the CRJ, but only my L: is showing up on FSUIPC. Why is that?  below is the macro code. I attache a copy of the FSUIPC4.log.

[Macros]
1=L:ASCRJ_ECAM_PRI=Toogle
2=L:ASCRJ_ECAM_STAT=Toogle
3=L:ASCRJ_ECAM_ECS=Toogle
4=L:ASCRJ_ECAM_HYD=Toogle
5=L:ASCRJ_ECAM_ELEC=Toogle
6=L:ASCRJ_ECAM_FUEL=Toggle
7=L:ASCRJ_ECAM_FCTL=Toogle
8=L:ASCRJ_ECAM_AICE=Toogle
9=L:ASCRJ_ECAM_DOORS=Toogle
10=L:ASCRJ_ECAM_CAS=Toogle
11=L:ASCRJ_ECAM_STEP=Toogle

Posted
12 minutes ago, danwrinn said:

I set up  L:vars for all the EICAS buttons in the CRJ, but only my L: is showing up on FSUIPC. Why is that?  below is the macro code. I attache a copy of the FSUIPC4.log.

[Macros]
1=L:ASCRJ_ECAM_PRI=Toogle
2=L:ASCRJ_ECAM_STAT=Toogle
3=L:ASCRJ_ECAM_ECS=Toogle
4=L:ASCRJ_ECAM_HYD=Toogle
5=L:ASCRJ_ECAM_ELEC=Toogle
6=L:ASCRJ_ECAM_FUEL=Toggle
7=L:ASCRJ_ECAM_FCTL=Toogle
8=L:ASCRJ_ECAM_AICE=Toogle
9=L:ASCRJ_ECAM_DOORS=Toogle
10=L:ASCRJ_ECAM_CAS=Toogle
11=L:ASCRJ_ECAM_STEP=Toogle

There's no such facility as "Toogle". I think you meant "Toggle"? Please do always check your spelling against the documentation.

Pete

 

Posted

I am also confused about When I use what action to use. For example,  L:ASCRJ_FCP_WHEEL wouldn't it be Inc to increase the Vert Speed and Dec to decreses the vert speed? if now why

Posted
8 hours ago, danwrinn said:

I am also confused about When I use what action to use. For example,  L:ASCRJ_FCP_WHEEL wouldn't it be Inc to increase the Vert Speed and Dec to decreses the vert speed? if now why

Very probably. But it could be that folks would use a joystick axis or one of the trim wheel controllers you can get. then they'd use 'Set' but leave off the value so that it is provided by the axis value.

It is pointless asking me about your particular aircraft, which I don't have, uses in these L:Vars. I did tell you how to find out how they behave. with the "Toggle" action I assume you've already used the Log LVars lua plug-isee how those you've used above behave and have seen that they are either 0 or 1?

Pete

 

 

Posted

Pete 

all's I am trying to figure out is if I have a Knob that increases and decrease, can I set up a - key command and + key command using lvars and if so how? My goal is to be able to hit the "Q" key and have my vertical speed knob go up and "Z" key to go down.

the parameter is 0

Dan

Posted
15 minutes ago, danwrinn said:

all's I am trying to figure out is if I have a Knob that increases and decrease, can I set up a - key command and + key command using lvars and if so how?

I thought you alread stated how -- INC and DEC. What was the problem? As you said:

15 hours ago, Pete Dowson said:

L:ASCRJ_FCP_WHEEL wouldn't it be Inc to increase the Vert Speed and Dec to decreses the vert speed?

And I said "very probably". i can't be definitive -- you have the aircraft, it is up to you to try it!

16 minutes ago, danwrinn said:

the parameter is 0

The parameter for what? There isn't one for INC or DEC.

Pete

 

Posted

Pete 

acording to Aerosoft:

0336: ASCRJ_FCP_ALT_CHANGE

0337: ASCRJ_FCP_WHEEL_CHANGE

 

The values to be used there are delta values. 

The meaning of WHEEL_CHANGE depands on WHEEL_MODE

0343: ASCRJ_FCP_WHEEL_MODE

This can be Pitch or VS

Is there any way that you know using lvars I can make those two knobs into key commands on a keyboard?

Posted
7 hours ago, danwrinn said:

Can I make one key for two lvars that need to be press at the same time?

No, not via the macro file. You can have multiple actions with one L:Var, but because the L:Var name is the name you assign to in FSUIPC's assignments.

However, you can assign one to the "Press" and the other to the "Release" (which is okay if you don't want them to repeat). Or you can edit the [Keys] assignment section in the FSUIPC INI file to add more assignments to the same key. That's a little trickier. You certainly need to refer to the Advanced User's manual for more details.

11 hours ago, danwrinn said:

Is there any way that you know using lvars I can make those two knobs into key commands on a keyboard?

You can assign the L:Vars, as already repeated many times, and you can use INC or DEC if you wish, as also stated several times. As I told you a long time ago, you have to experiment to see what works! I can't do any more. You need to start helping yourself!

Quite honestly, having all these keys assigned on a keyboard seems much harder to use than simply using the mouse. I could understand if you were using buttons in a cockpit.

 

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.