Jump to content

Airbus A318/A319 - LUA script for FSUIPC?


D192

Recommended Posts

[EDIT: The good news is, I have tested it, and the original LUA script for the Aerosoft A320/A321 does work with the autopilot of the new A318/A319. :) So you can use the below dropbox link to download the script, and use it control the A318/A319 autopilot!]

PS...... LUA scripts are not related to LINDA. LUA scripts are for use within FSUIPC for assigning keyboard commands. LINDA is only able to assign commands to physical hardware.

Hi,

For those who like to assign key commandments for things like the A/P is there a LUA script for the A318/A319, for use with FSUIPC?

I don't mean a LINDA module, as LINDA only provides hardware control assignments; not keyboard commands.

There is LUA script for the Airbus X A320, which works with all versions up to the current, I am not sure if this will work with the A318/A319 or whether the A318/A319 has a different autopilot code now?

This is the LUA script that works with the A320/A321 :-

LUA script, which works for the autopilot functions, with both the Aerosoft A320/A321 and the new A318/A319 :-

https://www.dropbox.com/s/f3ecjsnl61y4g1c/AS_AirbusX.lua?dl=0

I cannot currently test this, but if I am able to before anyone else replies, I'll let others know here too. :)

Thanks,

Link to comment
Share on other sites

Topic already answered and sticky. There is a actual version available for the 319.

Could you give me the link please. I ve only found a link for the LINDA file which is useless as I dont want to use LINDA.

Thanks in advance.

Link to comment
Share on other sites

This related to a lua script (for use with key commands, within FSUIPC, which is quite differenct to LINDA).

LUA = use with FSUIPC to assign keyboard commands for custom functions.

LINDA = Use with the LINDA module to assign hardware functions (only!).

:)

The good news is, the original LUA script for the Airbus A320/A321 also works with the A318/A318! (just tested). You can download it from the DropBox link, in my first post.

Link to comment
Share on other sites

This related to a lua script (for use with key commands, within FSUIPC, which is quite differenct to LINDA).

LUA = use with FSUIPC to assign keyboard commands for custom functions.

LINDA = Use with the LINDA module to assign hardware functions (only!).

:)

The good news is, the original LUA script for the Airbus A320/A321 also works with the A318/A318! (just tested). You can download it from the DropBox link, in my first post.

Hi,

This is the best news for me and my cockpit. :excellenttext_s:

Thank you David

Link to comment
Share on other sites

Well, some things changed. The beacon light seems not to be standard anymore. But apart from a few things it all works fine. It is definately more fun with all the modules working. Thanks again for bringing it up and research.

P.S.: I think there was a little mistake in the LVarSet line at the Heading Mode toggle section. It said "L:AB_AP_HDGmodeSet". I removed Set and it works now.

-- Heading mode selection normal/managed toggle
if ipcPARAM == 22 then


  	LVarSet = "L:AB_AP_HDGmode"
	LVarGet = ipc.readLvar(LVarSet)
Link to comment
Share on other sites

Yes some things have certainly changed with the A318/A319, with regards to compatible functions from this LUA script.

One thing to bear in mind about this LUA script is that it is originally from the Airbus X, from 2010. :) However, I can confirm that all A/P commands work perfectly, so it is best regarded as a LUA script for the A/P only.

I've got the following assigned to keyboard commands, via FSUIPC Parameters:-

AP On/Off
Heading Pull (Heading)

Heading Push (LNAV)

Alt Pull (FLCH)
Alt Push (VNAV)

Speed Pull (selected speed)

Speed Push (managed speed)

Appr
Loc
Hdg -/+

Spd -/+

Alt -/+

the only function of the A/P that does not seem to work with this LUA script is the VS knob / scrolling.

Link to comment
Share on other sites

VS inc and dec is working for me. But I noticed that I already had the LUA script. Maybe I had an earlier version. I can chack later.

Cool, I'll check again - perhaps I have a double assignment or some other issue. Cheers.

Link to comment
Share on other sites

I mixed something up. Maybe it is because I did the config with lua for the Airbus extended a few days before. VS is not working with the new Airbus :(

Sorry for the confusion.

No problem. At least I know I'm not going mad, as it still wasn't working on my 'bus, with this script. :)

Link to comment
Share on other sites

  • 3 weeks later...

Hi to hall,

i tried to edit the LUA script file tu run the VS Knob ...and i succesful did! Now it works!

The problem is that i'm not able to paste it in this topic :(:D

Link to comment
Share on other sites

Master Warning Light Off function doesn't work.

This doesn't silence the alarm.

LVarSet = "L:AB_MPL_Master_Warning_Light"
 
 
    ipc.writeLvar(LVarSet, 0)
ipc.writeLvar("L:SmallOverheadPushButtons", 1)

Same here. Did you find any solutions?

Link to comment
Share on other sites

-------------------------------------------------------------- V/S

-- V/S level

if ipcPARAM == 52 then


	LVarSet = "L:AB_AP_VSlevel"

	LVarGet = ipc.readLvar(LVarSet)

	ipc.writeLvar(LVarSet, 1)

end


-- V/S inc

if ipcPARAM == 53 then


	LVarSet = "L:AB_AP_VS_Select2"

		LVarGet = ipc.readLvar(LVarSet)
		ipc.writeLvar(LVarSet, LVarGet+1)

	
end


-- V/S dec

if ipcPARAM == 54 then


	LVarSet = "L:AB_AP_VS_Select2"

		LVarGet = ipc.readLvar(LVarSet)
		ipc.writeLvar(LVarSet, LVarGet-1)

	
end

Ciao,

finally i was able to post the code...!

Open the AS_AirbusX.lua file with notepad and replace the entire code about V/S with this above

I will see for the master worning too when i will have time ;-)

Stay tuned

Link to comment
Share on other sites

Hello Guys,

why do you deal with such old LUA scripts?

Why don't take the actual module 3.01 from LINDA and rewrite it for your needs? The A318/A319 is fully covered including WX, Master warning etc etc.

EDIT: has someone had a look if there's a programm who could emulate a keyboard to show up as an joystick probably?

Would be much easier instead of rewriting all LUA scripts again and again

Link to comment
Share on other sites

Guenseli,

we use the old LUA because we use GoFlight Modules by FSUIPC and LUA work well, maybe you are telling us that LINDA work better and support GoFlight modules?

What mean "Why don't take the actual module 3.01 from LINDA and rewrite it for your needs?..."

...maybe we are not programmer... and we are not able!

I tried to convert from LINDA and is not easy for me that i'm not a programmer, after a day did something but i have no intention to loose more time on it without basic knowledge of programming.

If you can support us we will all happy, also if you tell us to move to LINDA.

Thank you for your work.

Ciao

Link to comment
Share on other sites

Hello,

no LINDA does not support GoFlight modules. And I fear it wouldn't do it in future. That is a part I have no influence. I just make the modules.

I meant you can use the actual LINDA module 3.01 and convert it to your needs.

An example:

The current module for LINDA is:

function AB_WX_SYS_on ()

ipc.writeLvar("L:AB_WX_SYS", 1)
LightSwitch ()
DspShow ("WXR", "off")
end
function AB_WX_SYS_off ()
ipc.writeLvar("L:AB_WX_SYS", 0)
LightSwitch ()
DspShow ("WXR", "on")
end

The green line referes to another function in the script, called LightSwitch()

The Red line is a LINDA specific line, that you have to delete.

But you can use from my module scripts all the Lua Variables etc.

So, the transfered code for FSUIPC is then:

-- AB_WX_SYS_on ()

if ipcPARAM == 1 then

ipc.writeLvar("L:AB_WX_SYS", 1)
LightSwitch ()
end
-- AB_WX_SYS_off ()
if ipcPARAM == 2 then
ipc.writeLvar("L:AB_WX_SYS", 0)
LightSwitch ()
end

So, for the green line stuff I'm not sure, you have to try. (I'm no programer also ;) )

But the rest is relatively easy to convert, I would say.

Link to comment
Share on other sites

-------------------------------------------------------------- Master WARN/CAUTION

if ipcPARAM == 97 then


    LVarSet = "L:AB_MPL_Master_Warning"


    ipc.writeLvar(LVarSet, 1)
	ipc.writeLvar("L:SmallOverheadPushButtons", 0)
end



-- Master caution off
if ipcPARAM == 98 then


    LVarSet = "L:AB_MPL_Master_Caution"


    ipc.writeLvar(LVarSet, 1)
	ipc.writeLvar("L:SmallOverheadPushButtons", 0)
end

-- Master caution AND warn off
if ipcPARAM == 99 then


    LVarSet = "L:AB_MPL_Master_Caution"
	LVarSet2 = "L:AB_MPL_Master_Warning"


    ipc.writeLvar(LVarSet, 1)
	ipc.sleep(100)
	ipc.writeLvar(LVarSet2, 1)
	ipc.writeLvar("L:SmallOverheadPushButtons", 0)
end

Hi to all,

for the moment this is another piece of code... MASTER WARN/CAUTION LIGHT ;)

@ Guenseli

thank you now is more clear about LINDA and the compatibility with GoFlight, so we must use this old code...

The green line i usually cancel.

I'm working on NDTERR button and after i will try with WX switch. I'm using your LINDA file.

Ciao

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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. Privacy Policy & Terms of Use