MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

Go to page 1Go to page 112Go to page 3Go to page 2
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Now we talk about multiple things.....

At first....
With new MF Version this is much more easy! In the BETA we still got the new tool i talk about above ( Sebastian realy quick give us that element).

NOW we can use a Value in Input Configs from another Config via Placeholder.

E.g. you got a OUTPUT Config that read current Heading from the Aircraft (Named e.g. "Current Heading" ..... And you got a Input Config that write the AP Heading Bug.
In that INPUT Config you define a placeholder..... Use Config "Current Heading" as indication and as symbol for example "a" .
Finaly in the SET VALUE field of the Input Config you simply say "a" .

Result: If you press the button then MF will send the Value that is currently shown on the used Placeholder Config!

****************

About LUA.....

Here you have Multiple ways.
You can define the Macro/Script within FSUIPC GUI..... Related to a Joystickbutton or a Key..... Means MF send a Key/Button Input..... FSUIPC Detect it and fire the Macro.
OR
You write as indication in the code a Offset Adress. Means FSUIPC handle the Command if e.g. a special Offset is Change from 0 to 1
In that case MF simply write that Offset.... FSUIPC check that change and act.
OR
You use the "LUA MACRO" Event Typ in MF.
There you can choose for a Macro and a command..... And then FSUIPC simply execute the macro you choose for.


***********

Summary: If you still work with the Beta.... Make it internal in MF. Much more easy. If you like to got the FSUIPC Way..... then Google.
There exist hundrets of Guides to write Lua MAcros and how to handle them.
Good Luck !
2021-04-27 09:02
Avatar
dieterp
Posts: 6
Supporter
In the InputConfigWizard pick Action Type Lua Macro. As Macro Name enter lua YourFileName without the .lua (ex.: lua currheading)
Also in the FSUIPC7.ini file, if it doesn't exist you create a section

[LuaFiles]
1=YourFilename (ex.: 1=currheading)

Just the filename, don't include .lua
2021-05-01 03:03
Go to page 1Go to page 112Go to page 3Go to page 2