Manual

25
LINDA Manual • Page 1 / 25 M anual V 1.0 © J une 2011 l ua I ntegrated n on - complex D evice a ssigning

Transcript of Manual

Page 1: Manual

LINDA Manual • Page 1 / 25

M a n u a l V 1 .0© J u n e 2011

lua Integrated non-complex Device assigning

Page 2: Manual

LINDA Manual • Page 2 / 25

C o n t e n t

Introduction 3Installation / Uninstalling 4

TIP for deleting FSX standard assignments 5

First start 6

Basic Setup Setup LINDA 7 Joysticks 8 MCP Combo 9

The HID Devices / Joysticks 10 Assigning your Joystick 11

The VRI MCP Combo 14 Assigning your MCP Combo 15 MCP Combo Modes 16 MCP Combo Presets 17 Creating new Aircraft-Setups 17

The LINDA Tracer Guide 18 First steps 19 Tracing FSX controls 21 Tracing LVars 23

Publishing Information 25

Page 3: Manual

LINDA Manual • Page 3 / 25

I n t r o D u C t I o n

If you ever bought a complex addon aircraft, you all know the big problem with them

– a lot of functions, but no chances to directly assign them to your hardware. Take

PMDG JS41 as an example -- you cannot even assign landing light switch to your joy-

stick buttons... not saying about more complex system and functions. And the same

could be said about any other addon aircraft which doesn‘t use the default FSX code

for it‘s systems.

If you know this problem, may be you have already seen the user made Lua scripts

for different addons. You know, those long scripts with long lists of ipcParam-to-

action lists. They allow us to assign custom aircraft functions to our hardware through

FSUIPC Button and switches panel. This partly solves the problem, but the solution is

quite ugly.

And if you own the VRinsight MCP Combo, you know the other problem as well. The

only way to make it work with addon aircrafts is to use modules provided by VRinsight

developers.. and the list of supported aircrafts is short and far outdated. However you

can assign some functions to MCP buttons and knobs through the FSUIPC (thanks

to Pete) using those LUA scripts, but you all know how much pain is to make assign-

ments this way.

And if you want MCP to display custom information on it‘s display, you have another

problem, because without a display feedback MCP just doesn‘t costs its money, yes?

And here comes LINDA!

It was started as a simple Lua framework to assign custom functions and interact with

MCP Combo display. But as framework evolved during development process, the

more ideas come to our minds and now LINDA is much more than just a Lua frame-

work.

LINDA in it‘s current state is a tool to assign custom functions of addon aircrafts onto

your hardware‘s buttons and switches.

Not only for MCP Combo, but for any USB/HID devices you have.

It has easy to use interface where you just choose actions you want from the popup

menu and assign them where you want them to be. And it still has that powerful Lua

framework on the backend which allows to set different actions for the same button

or knob, easily switch between these modes, interact with MCP display and do many

other smart things..

• LINDA is a full replacement for SerialFP2 driver supplied by VRinsight.

It doesn‘t need any com-port emulation software and work fine just by itself.

• LINDA could be and intended to be used even if you don‘t have MCP Combo to

assign custom functions to your hardware.

• LINDA is a powerful yet easy framework to create simple Lua functions for those

who like do some coding himself

Page 4: Manual

LINDA Manual • Page 4 / 25

I n s t a l l a t I o n

Before you begin:

LINDA is meant to completely replace your current assignings (except axes).

This does not happen automatically, don‘t fear, but we believe that assigning your

Joystick with LINDA and assigning functions to your MCP Combo panel would be so

funny that you wouldn‘t use other ways to do it ;-)

LINDA does not need any assignments through FSUIPC for Joysticks or MCP Combo

(just for Axis) so you should make sure that the current MCP Combo and Joystick

assigning with FSUIPC get deleted in the FSUIPC4.ini.

Also does LINDA not need any further LUA scripts inside modules folder as you have

them probably now

Best way then is to Backup your complete Module folder!

After that, you could delete all your LUA and FSUIPC macro files for several addons

as this would be covered now by LINDA.

After that, delete in your FSUIPC4.ini every Joystick-Buttons entry:

[Buttons] and for every addon, e.g. [Buttons.A2A_Spitfire]

You can also delete things like

[VRInsight.FMER]

[LuaFiles]

[MacroFiles]

Now for the Installation of LINDA:

You downloaded a bunch of zipped files as they are the following:

Just drop that files into the FSX modules folder:

Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules

Congratulation! LINDA is installed!

(LINDA is not installed in the registry or whatever.)

u n I n s t a l l I n g

Delete the above files.

Congratulation! LINDA is completey wiped off your system!

Page 5: Manual

t I pWorking with FSUIPC (or now with LINDA) means that you have to make sure, that you have your Joysticks not assigned also in FSX.

To delete all FSX Joystick assignings at once, do the following:

• Open your FSX folder (where your FSX.cfg is in)

(normally C:\Users\YourUserName\AppData\Roaming\Microsoft\FSX)

Maybe you have enable hidden files and folders. Please search in Google to activate them

• Open now in the FSX folder the folder „controls“

• Open Standard.xml with Editor or Notepad

• Scroll down till you see your Joysticks, e.g.

<Name>Saitek X52 Pro Flight Controller{2A5740B0-D7E8-11DF-8006-444553540000}</Name> and

<Name>Saitek X52 Pro Flight Controller SLEW {2A5740B0-D7E8-11DF-8006-444553540000}</Name>

• Now delete everything between this entry and </SimControls.Map>

• Save

Now you have deleted all Joystick assignings at once!

Here is an example how my Standard.xml looks:

<SimControls.Map>

<Name>Logitech Extreme 3D{2A5740B0-D7E8-11DF-8004-444553540000}</Name>

</SimControls.Map>

<SimControls.Map>

<Name>Logitech Extreme 3D SLEW {2A5740B0-D7E8-11DF-8004-444553540000}</Name>

</SimControls.Map>

<SimControls.Map>

<Name>Saitek X52 Pro Flight Controller{2A5740B0-D7E8-11DF-8006-444553540000}</Name>

<POV>

<Index>0</Index>

<Down>PAN_VIEW</Down>

<DownRpt>1</DownRpt>

</POV>

</SimControls.Map>

<SimControls.Map>

<Name>Saitek X52 Pro Flight Controller SLEW {2A5740B0-D7E8-11DF-8006-444553540000}</Name>

</SimControls.Map>

<SimControls.Map>

<Name>Saitek Pro Flight Rudder Pedals{4567DA00-D7C4-11DF-8001-444553540000}</Name>

</SimControls.Map>

<SimControls.Map>

<Name>Saitek Pro Flight Rudder Pedals SLEW {4567DA00-D7C4-11DF-8001-444553540000}</Name>

</SimControls.Map>

</SimBase.Document>

Note that I haven‘t deleted the POV entry in my main Joystick, the X52. This is the coolie hat, because I find the steering of the view better than assigned with FSUIPC

LINDA Manual • Page 5 / 25

Page 6: Manual

LINDA Manual • Page 6 / 25

F I r s t s t a r t

Just double-click on the LINDA.exe and LINDA starts.

You will see a similar starting screen.

Here, you see links for the setup and

info pages

For the first startup, LINDA will tell

you, that you have to make settings

for Joysticks, and the VRInsight

Combo in the FSUIPC4.ini

(„Setup is needed“ instead of

„Everything is ok“)

There are the links for the pages of

Console, Tracer and Lua Editor

Note the shortcuts!

There are the links for the pages of

Console, Tracer and Lua Editor

Links to open the LINDA manual,

get directed to support forum and the

Bug report thread

Page 7: Manual

LINDA Manual • Page 7 / 25

s e t u p l InDa

On this page you can make several settings concerning

LINDA itself.

As everything is described next to the checkboxes,

it should be clear.

Page 8: Manual

LINDA Manual • Page 8 / 25

s e t u p J o y s t I C k s

Everything should be setup up properly already.

LINDA is detecting your hardware and will name it automatically.

Have a look at this site,

maybe make some changes in namings

and be sure, if everything is detected properly.

You can also set the type of the device manually:

Joystick

HOTAS

Throttle

Yoke

Other

(LINDA is not able to setup this

automatically correct in any case)

Click on „Save“ in every case!

Page 9: Manual

LINDA Manual • Page 9 / 25

s e t u p MCp C o M b o

You have to select the COM Port where the MCP Combo

is connected.Normally it is COM3.

You can start your VRInsight SerialFP;

it will show you the COM Port Number

(Now you can delete the SerialFP Software ;-) )

LINDA will tell you, if your FSUIPC.ini is setup correctly.

If not, LINDA can make these changes for you in the FSUIPC.ini

Page 10: Manual

LINDA Manual • Page 10 / 25

t h e hID D e V I C e s / J o y s t I C k s

Common logic

LINDA’s joysticks engine is pretty simple but – I believe – flexible

enough for most of usage scenarios. Note that LINDA doesn’t al-

low to assign joystick’s axises anyhow. Use the standard FSUIPC

facilities instead.

This is done because from the start LINDA was intended to use

onlywith buttons and there was no need to reinvent the bike with

axises. FSUIPC does it’s job much better that it can be done

inside the Lua library with its speed restrictions.

Each joystick button can generate 3 events:

• On Press – occurs when button is pressed

• On Repeat – occurs after button is pressed and while it’s hold

• On Release – occurs once button is released

Each of these events could be assigned with a separate functions.

(see next page)

Default actions

Functions you assign for FSX Default aircraft will be used as

default actions for all other aircrafts unless you will reassign the

same buttons/switches with other functions. Logic is pretty the

same as FSUIPC has – you have the default assignments and

can override them for specific aircraft if you need it. You can see

if there is a fallback assigned if this is shown with a little star and

colored in light green.

Each joystick could be in two modes: Normal and Shifted with different set of

functions assigned in each of these modes. You can switch joystick by assigning

the LOCAL SHIFT or GLOBAL SHIFT functions to any joystick button/switch and

pressing it. Local shift will shift only the current joystick. Global shift will shift ALL

devices at the same time.

Page 11: Manual

LINDA Manual • Page 11 / 25

a s s I g n I n g y o u r J o y s t I C k s

If FSX is already running, LINDA will detect your current

loaded aircraft, if Synchronisation Mode (FSXsync) is on.

You can disable the FSXsync to change the aircraft.

But you could also start assigning without FSX running of course.

We highly recommend to select and assign the

FSX default planes at first:

The assignments which made for the FSX standard planes

are the fallbacks for all other addons!

If you assign e.g. „LIGHTS Strobe“ for the FSX Standard planes,

then „LIGHTS Strobe“ is also available for sour addon as long

as you do not set it to „do nothing“ or overwrite it with an

other function.

clicking on one of the sections („On

Press“, „On Repeat“ or „On Release“)

at the corresponding buttons will open

the assigning pop-up menu

If you press one button of one of your joysticks, LINDA will „jump“ to the

corresponding device. Which device is active you will see which symbol

is highlighted. In this case the Logitech Extreme 3D

Page 12: Manual

LINDA Manual • Page 12 / 25

a s s I g n I n g y o u r J o y s t I C k s

Hovering with your mouse in the pop-up menu

will open further menues.

„Remove assignment“ will delete your current assignment

and in case you assign an addon it will show the FSX

default fallback if there is one

There are several „Libraries“ which can be in the upper part of the pop-up.

The most important here is the „LIB: Default“ FSX“ where you will find several standard

FSX commands.

Libraries could be also made by every user for functions which would be needed in more

than one airplane, like Weather radar settings or functions for tool.

LOCAL SHIFT: assign one or more buttons as shift button which will enable shifted mode

as long as this button is pressed (Also known as „modifier“)

GLOBAL SHIFT: switching your complete joystick assignment to the shifted as long as the

button is pressed.

Record Keypress: as the name says ...

Page 13: Manual

LINDA Manual • Page 13 / 25

a s s I g n I n g y o u r J o y s t I C k s

Set FSX Control: this will open a window where you can

choose from all known FSX controls.

You can filter them by name or by number

Set FSUIPC Macro: this will open a window where you

can choose from your Macros in your modules folder.

Click on the macro you wish to assign and LINDA will list

all functions this macro contains.

Page 14: Manual

LINDA Manual • Page 14 / 25

t h e VrI MCp C o M b o

Common logic

The main advantage of LINDA over original SerialFP2 software is in it’s flexibility. Se-

rialFP2 uses a primitive logic «one button – one action», and LINDA allows to change

button’s and knob’s functions on fly.

LINDA implements the «Modes» logic. MCP Combo consists of three different parts:

EFIS block, MCP block and USER/RADIOS block. Each block could work in one of

three fully customizable modes.

This means that EFIS block could be used to control (i.e.) default FSX GPS in mode 1,

RealityXP WXR in mode 2 and AivlaSoft EFB in mode 3. And the same could be done

with MCP and USER block. However you are not obliged to use modes if you don’t

need them in some case.

The other enhancement is that each of EFIS rotaries could be used in two modes (let’s

say Mode A and Mode B to differ them from Modes 1/2/3 of whole EFIS block). For ex-

ample this allows us to use the same rotary for two different actions and switch between

them by simply pressing this knob.

For example in PMDG JS41 module EFIS knobs functions are:

• MINS – Decision height (Mode A) / Landing Elevation Height (Mode B)

• CTR – Circle Bearing / Diamond Bearing

Moreover, each of the knob function have their own indications on MCP display (where

it’s possible).

And all these modes-separated functions are not hardcoded anywhere, but fully and

easily customizable through GUI.

As an additional feature MCP display could be used not only to set up the things inside

sim, but also to show current flight info – aircraft’s speeds, direction and altitude. You

can switch this mode on/off when you want. And also it is used for those aircrafts that

don’t have autopilot system or in those rare cases when there is no way to get autopilot

setting in sync with MCP display indications (it’s sad, but the MD-11 is one of those).

FSX Default aircrafts

Combo’s behavior with LINDA and default FSX aircrafts will be pretty much the same as

you experience with original SerialFP2 software.

However there are some enhancements already:

• There are 3 modes set for EFIS block as described above.

• The CWSB button is used to switch display into Flight info mode.

• Radios Mode button is set to toggle audible (morse) markers for NAVs, ADFs, DMEs

and to toggle COM1/COM2 channels.

• Some other assignments pre-made as you can see in GUI Addon aircrafts

Please take a look inside aircrafts/PMDG JS41/readme.txt and aircrafts/Aerosoft

AirbusX/readme.txt for some information about specific function implemented in these

modules. These are the examples of what could be done using LINDA.

Page 15: Manual

LINDA Manual • Page 15 / 25

a s s I g n I n g y o u r MCp C o M b o

The MCP Combo is already set up.

The screenshot shows the FSX Default planes assigning.

We made this for our needs and what we find logical. So is

the EFIS part mostly assigned to control the FSX GPS.

Of course you can make changes for your personal needs

here. And like with joystick assigning you could make indi-

vidual changes for each addon!

Assigning works similar to Joystick assigning: clicking

opens a pop-up menu

Note, that the rotary knobs have two different stages:

slow (+,-) and fast dial (++,--)

Assigning slow will automatically fill the same function to

fast dial because this is needed for 95%.

Make sure to assign always slow and fast dial!

Also remember that the dials knobs have now two modes

(A and B) as described above!

The MCP Combo is divided in 3 parts:

EFIS on the left side, MCP part which is the biggest in the middle and the User Buttons (UB) /RADIO part

on the right side. Click on the shemes of the parts to activate one of them.

Page 16: Manual

LINDA Manual • Page 16 / 25

MCp C o M b o M o D e s

For each part of the MCP (EFIS, MCP, UB/RADIO) you

have now three modes available!

Each of these 3 modes could be fully assigned as you like.

Click on the tabs to switch in LINDA between the modes to

assign them.

Mode 3 could be checked or unchecked to disable or ena-

ble it if you have no use for a third mode.

You can choose a short name for

each mode with maximum four digits

length. This name will shown in the

MCP display if switch into the mode.

User buttons 6,7,8 are assigned

to toggle the modes.

(you can change this if you like,

but not recommended)

Page 17: Manual

LINDA Manual • Page 17 / 25

MCp C o M b o p r e s e t s

Each mode has its own presets which ca be found on the top left.

Clicking on it opens a drop-down menu where the presets are listed.

Choosing one of these presets will setup your complete assignment with one click.

This is useful if you have e.g. the WXR500 installed in several planes.

Now you can assign the WXR500 functions in one step for example in EFIS mode 3.

Of course you can create save your own made presets if needed.

C r e a t I n g n e w a I r C r a F t -s e t u p s

LINDA comes with a little set of already assigned and listed aircraft.

You can simply assign your own addons if you press on „new“.

This will open a new window where your aircrafts (and helicopters) are listed.

Choose the one you like and click „create“.

Module names where choose automatically, however you can change them if you like.

You can also copy an existing assignment for the new one

Page 18: Manual

LINDA Manual • Page 18 / 25

t h e l InDa tr a C e r g u I D e

This text is not intended to be used as a strict instructions on how LINDA Tracer

should be used. Also this is not a tutorial on how to create aircraft modules for LINDA

from the scratch. You should already know what are the FSX standard controls, FSU-

IPC offsets and Lua variables (LVars). Here you will see only an example of Tracer

usage scenario.

(Please have a close look in the FSUIPC documentation about Macros, LUA Variables

and offsets! - all is pretty good described there)

LINDA Tracer purpose

Creating Lua scripts for addon aircraft requires you to know how this particular aircraft

is designed and how it’s custom systems are integrated inside common FSX environ-

ment.

It depends on the addon-developer how complex systems for their addons will be

created: They use the FSX controls (e.g. ROTOR_BRAKE (65587) with countless

parameters) or FSUIPC Offsets, but also XML gauges with their variables that could

be directly accessed by corresponding LVars inside FSUIPC Lua engine.

So, LINDA Tracer is a tool to inspect, trace and monitor all of these three instances:

LVars, Offsets and Controls to understand how addon is designed from it’s internals

and to figure out how to deal with it’s custom systems from the Lua script.

Page 19: Manual

LINDA Manual • Page 19 / 25

l e t ‘ s g o h u n t I n g !

First steps

Let’s say we want to trace and inspect RealAir Duke Turbine

and create simple Lua function to control Cowl Flaps.

Remember that this is just an example.

1. Start LINDA and FSX

2. Choose the Duke and any airport you like

3. Load flight and prepare Duke to the stage were

Cowl Flaps are alive (ready for taxi is enough)

4. Switch to LINDA and open the Tracer window

(by clicking the menu or by pressing Ctrl+F1)

Page 20: Manual

LINDA Manual • Page 20 / 25

The console window:

Ok. Now let’s suppose that we don’t know nothing about how the custom systems interac-

tion is implemented in this bird.

In fact it’s not exactly the truth because as you can see the LVars list is full of items. This

means that Duke most likely using them to control it’s systems. But there are some cases,

when addon is using both LVars and FSX Controls, i.e. PMDG JS41.

Page 21: Manual

LINDA Manual • Page 21 / 25

Tracing FSX controls

So, we want to know how to control Cowl Flaps switches from the Lua

script and we going to start from tracing the FSX Controls.

The main logic in hunting is to set up the monitoring/logging facilities and

start to push, switch, turn or hit the virtual control item while looking on

what is happening in console.

To start monitoring FSX controls we have to ask FSUIPC

to start controls’ events logging:

• Switch to the console window

• Open bottom control panel by clicking three down arrows

• Mark the «Log FSX controls» checkbox in the FSUIPC settings block

At this moment console window will start to be flooded with numerous lines of repea-

ting control calls, like in the above screenshot.

As these control call are repeating no matter what we do or not do inside FSX, they

are out of our interest about Cowl Flaps. We want to know if any of FSX standard con-

trols is called when we move the Cowl Flaps switch in the Duke’s cockpit, but this will

be hard with all these endless lines of text.

That’s why we need to filter repeating controls.

Page 22: Manual

LINDA Manual • Page 22 / 25

To filter incoming text you should:

1. Pause the logging (by clicking Pause link inside

console window or by pressing Spacebar)

2. Open bottom control panel (if you still didn’t)

3. Type the lines of text you want to filter

Now you can check if everything is correct by clicking any of lights switches on the Duke’s panel.

On each click you will see a report in the console on what control was just called.

But if you will click the Cowl Flaps switch the console will show you nothing. This means that Cowl

Flaps switches are not tied to any of FSX standard control and we need to trace LVars now. Now

you should switch of FSX controls logging and clear and don’t forget to clear the filter, as it’s working

not only for FSX controls but for any text in console.

Some notes on the FSX controls list in the LINDA Tracer:

• RIGHT-click any control in the list to call it inside FSX

• You can set the optional parameter to be called with control

• You can scan control by calling it with the range of parameters

Some notes about the filter

• No need to type the whole line of text you want to be

filtered. Type short unique part of it. In case of FSX

controls, the best way is type control numbers one by

one (not the control names).

• Also you can RIGHT-click on control number and you will

get the popup menu with item in it saying «Filter text: ...»

– this will add the shown text in the filter.

• Filter has two modes: hide and show. The first will hide all

lines containing the string specified. The second will filter

all the lines NOT containing these strings.

In the case of Duke we should add only two repeating controls:

66466, 66463 and then our console will be clear and waiting for

further investigation. Don’t forget to Resume (unpause) monitoring.

Page 23: Manual

LINDA Manual • Page 23 / 25

Tracing LVars

The logic here is pretty much the same, as with FSX controls. First of all we need to

start monitoring of ALL LVars for this aircraft. Press the «Start all» button

and wait until console will tell you that monitoring is started.

There will be some delay depending on how many LVars are in the list.

Note that sometimes LVars list is failed to load automatically.

Press the «Reload list» link to request the list again. Now when full list LVars monitoring is started you will again get the console

flooded with repeating list of variables and values.

Page 24: Manual

LINDA Manual • Page 24 / 25

And once again we need to filter those lines, that out of our interest.

This could again be done by text filter, but the smarter way is to stop

monitoring those LVars we don’t need.

You can do it manually by selecting LVar in list and pressing the

«Stop» button (or by RIGHT-clicking item in the list). But the faster

way is to RIGHT-click variable’s name inside the console window and

choose the «Stop watching: ... » item from drop down menu.

In some cases you will see the LVars names that are not in the list.

I don’t know where do they come from, but you can get rid of them

them using the common text filter.

Do it for all repeating LVars and check if you need to filter something

else by resuming/pausing the logging if you will need it.

Now when we got the list of LVars cleaned of repeating items, we can

save this list for future use by clicking «Save watching list». And then

on the next hunting session we could restore this «clean» list by just

clicking the «Restore watching list» link. That’s convenient, yeah?

And now the magic moment! When you click Cowl Flaps switch inside

the FSX, console will show us the corresponding LVars we were

looking for!

Some notes on LVars controls in the LINDA Tracer window:

• LEFT-click on LVar name to get it’s current value

• RIGHT-click LVar name to start it’s continuous monitoring,

item will be marked with bold and color.

RIGHT-click it again to stop monitoring.

Page 25: Manual

LINDA Manual • Page 25 / 25

Idea, Programming and Design: ARTEM CRUM

Inspiration, Testing and Support: GÜNTER STEINER

© 2011 • This Program is Freeware • Any Distribution is Prohibited!

lua Integrated non-complex Device assigning