Jump to content
The simFlight Network Forums

A320 FBW - MSFS - script Lua versus MOBI ?


michel78320

Recommended Posts

Hi all.

Would someone be able to explain to me how to code Mobi's orders in Lua scripts ?

Fox example :

1 (>L:LIGHTING_LANDING_1)
0 1 r (>K:2:LANDING_LIGHTS_SET)
1 1 r (>K:2:TAXI_LIGHTS_SET)

First line is :
ipc.writeLvar (LIGHTING_LANDING_1 , 1)
It is OK for me.

 

But I dont understand :
"0 1 r" in RPN ...

This puts "0" in the stack, then "1",then inverse (why not write "1 0" ?), then call Event.

The script would be this  ?

ipc.cpntrol (32768 + 10, 1)
where my first event file has "10 =  TAXI_LIGHTS_SET".

I do not understand why two arguments, and how to pass them in Lua sript.

 

 

 

 

Link to comment
Share on other sites

Thank you very much. I did not understand what Calccode did ... I had read the documentation 10 times, and it was still not clear for me. With your example, it seems very simple ...

How do you use the Presets? I don't use Mobi.

 

Link to comment
Share on other sites

Just now, michel78320 said:

How do you use the Presets? I don't use Mobi.

MF presets have been included with FSUIPC7 since v7.2.16 - you do not need to use MobiFlight. The latest version, v7.3.4 (released yesterday) contains the latest MF events.txt file. To use these with FSUIPC7. you need the FSUIPC WASM installed and enabled (which you will have if using lvars), and they are assignable as any other control - in the drop-down menu for assignments.

Please see the Advanced User guide for details on presets, as well as all other functionality provided by the FSUIPC WASM module.

Link to comment
Share on other sites

21 minutes ago, michel78320 said:

Just a clarification : do I need an "xxx.evt " file to use all the possible events (from gauges) with presets ?

No. You don't need to use event files any more - they have been superseded by presets.  However, you can still use them if you prefer that method, but you would need to install the MF event module WASM to handle those events. The event files included with FSUIPC7 are also now quite old (and I won't be updating them any more) and not complete (and possibly out-of-date).

Link to comment
Share on other sites

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.