Jump to content
The simFlight Network Forums

Fabix

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by Fabix

  1. I finally succeeded. I publish the solution so that in the future it can be of help to someone.

    Instead of the simple "filename", you have to write "Lua filename" in the MobiFlight menu like this screen:

    final.png

  2. 7 minutes ago, Pete Dowson said:

    The other way to run them, which would normally apply if your plug-in is "event" driven (i.e. stays running and does things based on events), is to load then via an [Auto] section containing a Lua RadioSwitchOn instruction.

    Please refer to the Lua documents provided, and also to the FSUIPC user documentation about [Auto] sections.

     

    Yes, I'm trying to navigate the various documentations. It would be great if there was a youtube video showing a simple example from start to finish. Hope for the future.

  3. 2 minutes ago, John Dowson said:

    Thats enough for it to be recognised by FSUIPC. If you enabled lua plugin logging and didn't see anything, then it didn't run.

    Have you tried to assign in fsuipc, to a button or key press? If not, try that. I'm sure it will work. 

    And as I said before, try logging the offset.

    Of course, you need a registered version of fsuipc to run lua scripts.

    Yes, I have the registered version of FSAUPC 🙂 And yes if I assign the lua plugin to a button it works. Probably the problem is how I try to have it run through MobiFlight since it is actually a plugin and not a macro.

  4. I came to the conclusion that the lua code I wrote just doesn't run. That log remains unchanged whatever I write in the lua code. At this point I am probably wrong to declare the file.

    I created a file called RadioSwitchOn.lua and placed it in the FSUIPC installation directory. After running FSUIPC the FSUIPC7.ini file shows:

    [LuaFiles]
    1=RadioSwitchOn

    Is all this enough? Or am I wrong something? Maybe I have to call it with .mcro extension?

    Thank you,
    Fabio

  5. This is what happen in the log when the lua script was executed:

       517719 WRITE0[19376]  0D6C,   4 bytes: 01 00 00 00                                      ....
       517719 WRITE0[19376]  0D70,  40 bytes: 52 61 64 69 6F 53 77 69 74 63 68 4F 6E 00 00 00  RadioSwitchOn...
       517719                           00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
       517719                           00 00 00 00 00 00 00 00                          ........

    I don't know why two writing operations are performed, and above all on those offsets that I have not entered. I call the Macro with MobiFlight, I don't know if this could affect it:

    radio.jpg

  6. Hi,

    I just bought the FSUIPC7 and started doing some first experiments with LUA. I tried to write in an offset, but strangely when I read the log, I see that it wrote in another offset. What am I doing wrong?

    My LUA script:
     

    ipc.writeUB("66C0", 1)

    But in the log it shows written "0D6C" 🤔

    What i am trying to do is write a value of 1 or 0 in a custom offset.

    Thank you,
    Fabio

  7. 4 hours ago, John Dowson said:

    Sorry, but which radio switch do you mean? Also, are you using the stock A320 or the FBW mod?
    If its the 'Interphone Radio Switch', this seems to be 'inoperative' in both models at the moment, so I doubt it has a value.
    If its another switch, please let me know which. You can also take a look at the offset document to see if anything matches, or you can also check if there is an lvar available that holds the switch value (using the latest 7.1.0 beta). If there is, you can use that directly or write the value to a user offset if you need it in an offset.

    I'm using the stock A320. There is a master switch that power on or power off the radio.

×
×
  • 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.