Barlow
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by Barlow
-
-
36 minutes ago, Pete Dowson said:
Is it complete there?
The code above is the complete code of my autopilot.lua file, which is listed under the [LuaFiles] section - so I guess it's implementet correctly.
36 minutes ago, Pete Dowson said:What is
_tl("L:AB_MPL_FD", 0)
The IF-clause should check, if the varibale AB_MPL_FD has a value of 0. I took the syntax from a lua-file I found on another topic. I can't really tell you what's the behind that since I am new to LUA (but not new to programming). Is it wrong? What would be the right syntax?
36 minutes ago, Pete Dowson said:Did you use the Lua plug-in to Log LVars as they change to see if that FD one did operate with 0 and 1?
I am sorry, I don't understand what you mean by that. :/
36 minutes ago, Pete Dowson said:What list did you use?
In the documentation directory of my Aerosoft A320 there is a file called "LVArs.cfg". Eventough it is an *.cfg, I assumed that these are all the LVars used for this Airbus.
This is a snippet of its content. All LVars are listet one underneath the other without any additional informations.AB_MCUD2_LD_STS_PAX AB_MCUD2_LD_STS_CAR AB_MCUD2_LD_STS_FUEL AB_MCUD2_LD_TIME AB_Cabindoor3_target AB_Cabindoor4_target SmallOverheadPushButtons;BTN LightSwitch;BTN AB_MPL_NDTERR_Bright;DISP
I searched for a few days on the internet but i couldn't find more information the LVars of the Aerosoft Airbus.
36 minutes ago, Pete Dowson said:In some aircraft implementations the L:Vars you find are indicators not actuators -- they just indicate the state of the switch to other parts of the cockpit implementation.
How can I find out, since theres seems to be no real documentation on the LVars of the Aerosoft A320 besides the LVars.cfg. The developers once postet a bigger list for the Airbus Extended, but it is outdated and cannot be opened anymore.
36 minutes ago, Pete Dowson said:FSUIPC3, FSUIPC4 or FSUIPC5?
FSUIPC 4 and FSX.
36 minutes ago, Pete Dowson said:You are loading 6 lua files automatically, no matter what aircraft you load. Is that what you want?
It's not a smart way, but at this point I just didn't pay any attention to profiles, since the AS A320 is the only plane I am using. I just focused on understanding how LUA works and how to use it with FSUIPC and my Airbus.
-
Hello.
With the help of the Aerosoft A320 LVar list I wrote some LUA-Code to assign Keyboard-Buttons via the FSUIPC "Key Presses" Tab. In additon I found some other code on the internet that I use.
For example, turning the flight director on or off does work without any problems. But to toggle the FD does not work at all. It's the case with many more functions, too. Some work and some don't
function Autopilot_FD_on () LVarSet = "L:AB_MPL_FD" ipc.writeLvar(LVarSet, 1) SmallOverheadPushButtons () DspShow ("FD", "on") end function Autopilot_FD_off () LVarSet = "L:AB_MPL_FD" ipc.writeLvar(LVarSet, 0) SmallOverheadPushButtons () DspShow ("FD", "off") end function Autopilot_FD_toggle () if _tl("L:AB_MPL_FD", 0) then Autopilot_FD_on () else Autopilot_FD_off () end end event.flag(0, "Autopilot_FD_off") event.flag(1, "Autopilot_FD_on") event.flag(2, "Autopilot_FD_toggle")
Is there an error in this code?
The lua-file is added to the fsuipc.ini file as followed.[LuaFiles] 1=actions 2=autobreak 3=engine 4=lights 5=spoilers 6=autopilot 7=autopilot_BACK [Auto] 1=Lua actions 2=Lua autobreak 3=Lua engine 4=Lua lights 5=Lua spoilers 6=Lua autopilot
Are the lua-files added correctly?
I am using the Aerosoft A320 v1.30 and FSUIPC.
Thank you for your help.
Aerosoft A320 and FSUIPC - LUA-Code
in FSUIPC Support Pete Dowson Modules
Posted
In the meantime I checked what you mean by that and used the the "Log LVars" Lua plugin.
It seems, that the FD is affected by two variables.
These are the results I found when manually toggeling the FD switch. So it seems, that the FD switch indeed operates with 0 and 1, but I don't know what the purposes of the set1_* LVar is right now.