Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi,

I own a Fokker 50 cockpit and would like to convert this to a Fokker 50 flight simulator. Since there is no software available like prosim for the Fokker 50, I'm using the Caranado F50 to base my sim off. (I'm using FSUIPC6, P3d V4.5 on windows 10.)

Now with function within FSUIPC of creating macro's I am able to configure the input side of the simulator. With the output (just LED's/lights) side it's a bit different.  After some research I found that by finding the right panel Lvar, you can use a Lua script to read that Lvar and ''assign'' a free offset to that (that how I understand it works, correct me if I'm wrong). Eventually this is read by mobiflight to make a physical LED light up.

What I did so far: (example = autopilot heading button light)

  • Found the Lvar using the ''local panel var'' function from FSUIPC, 
    • L: ASD_F50_BTN_AUTOPILOT_HDG_ON
  • Created a Lua file with the following code:
    • function ASD_F50_BTN_AUTOPILOT_HDG_ON (var, value)
               ipc.writeUB(0x66E1, value)
      end
      
      event.Lvar("L:ASD_F50_BTN_AUTOPILOT_HDG_ON", 100, "ASD_F50_BTN_AUTOPILOT_HDG_ON")
  • Inserted the following line in the FSUIPC6.ini file:
    • [Auto]
      1=Lua ASD_F50_BTN_AUTOPILOT_HDG_ON

Now the problem is, when the ''1=Lua ASD_F50_BTN_AUTOPILOT_HDG_ON'' is placed in the FSUIPC6.ini, P3D crashes to desktop 3 seconds after the flight is loaded. If I remove the line in the .ini file all is normal again. 

In the log file FSUIPC writes just before the crash to desktop:    

34828  5672 LUA: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ASD_F50_BTN_AUTOPILOT_HDG_Oåì.lua": not found. 

 If FSUIPC is looking for a file name with the wierd letters I understand the crash, or the not found message. However, the lua line in the .ini file does not contain those but is written like above.

What am I missing here? Is there some box that needs to be ticked when you want FSUIPC to read these Lua files?

Anybody that can point me in the right direction here?

Thanks!

Stijn

FSUIPC6.log ASD_F50_BTN_AUTOPILOT_HDG_ON.lua FSUIPC6.ini

Posted

As it states in the FSUIPC Lua Plug-ins document, lua filenames have a limit of 16 characters:

Quote

Note that the filename part (preceding the .lua filetype) can contain spaces and other characters acceptable to Windows, but there is a limit of 16 characters on that name.

Also, FSUIPC scans for valid lua files when oy is started and adds any found to a [LuaFiles] section of your FSUIPC6.ini file. There is no such section in your ini file and so no lua files have been detected.

John

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.