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.

icon
Avatar
Tom_G_2010
Posts: 5
I just came across MobiFlight today and it looks like it has a lot of potential. I already have six Arduinos in my Sim interfaced through another program. However that program can not trigger Lua scripts, at least not that I am aware of. And, I need to do that to handle some functions external to FSX on some of my add ons.

Is there a way to trigger a lua script with mobiFlight? If yes, is there a way to have more than one switch trigger the same lua script and know what switch on on the Arduino called it? That would allow me to write one multi function lua script to handle a variety of inputs from my Arduino.

Thanks!
Tom G.
2016-01-23 01:05
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
Triggering LUA scripts directly out of Mobiflight is not possible. I already wanted to do it but I did not find an easy way to call a LUA function through the FSUIPC API.
One workaround could be: You make the link between MF and LUA yourself.

Let's say you have one LUA function that executes in a loop.
Your switch writes an FSUIPC Offset and your LUA function reads it and executes another LUA function accordingly.

Maybe you can also describe what you would like to achieve because you can do alot of things with MobiFlight - even logical decisions are possible and you have preconditions that you can set up. If you tell us, what you would like to configure, maybe we can find a way to achieve it without LUA scripts.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2016-01-23 10:23
Avatar
Tom_G_2010
Posts: 5
I am running the A2A C172 and soon will be adding the A2A C182.

Both require the use of LVars to work certain functions that are coded outside of FSX. For example, The offsets for transmit Com1 and Com2 and the Nav1 Nav2 Audio Selector offsets do not activate the corresponding functions in the A2A's Audio Selector Panel. However the LVars needed to do that are available. So I need my Arduino switch to trigger LVars.

Whether through a lua script or some other method, is it possible to trigger an LVar from the Arduino through MobiFlight?

Thanks!
Tom G.

PS: I'm very impressed by MobiFlight. I hope you contiue to push the development of it to expand it's capabilities.

Here are some examples of things that would help me in my sim build:
  1. Access to the Arduino analog I/O
  2. The ability to trigger lua scripts
  3. The ability to read outputs of some sort from the lua script to trigger Arduino actions
[Last edited by Tom_G_2010, 2016-01-23 20:15]
2016-01-23 17:11
Avatar
Tom_G_2010
Posts: 5
Any further thoughts on how to accomplish this?
2016-01-27 06:07
Avatar
masawee
Posts: 64
maybe boards can trigger what board use if board have addres what board have ? maybe adding ewery board own name,serial number or somethink then can share what board trig inputs.
2016-05-03 11:15
icon