Jump to content

LUA Scripts for AirbusX (+ real throttle); upd. 16th Sept


guenseli

Recommended Posts

Disclaimer:

this stuff here is really outdated.

I ask the moderators here to please unpin this thread, as my LUA scripts are really old now!

We have LINDA since a long time and for all Airbus Extended Users, tere's also a module in the LINDA forum:

http://forum.avsim.n...orum/424-linda/

I will post about LINDA in the Extended forum also ...

-------------------------

old stuff following

I

I

I

I

v

update 16th Sept

and another one:

several new commands: TCAS, Battery, "Avionics" etc...

new items since release are marked in the parameter list

you have to redownload AS_AirbusX.txt and copy the content into your LUA

----------------------------

update 15th of Sept

inserted parameters for fast increase and decrease of SPD (36, 37) and HDG (25, 26) (see list of parameters)

(credits to PaulMidd for this idea!)

----------------------------

updated 14th of Sept

reason: added Petes throttle plugin, so that my FADEC script is obsolete.

now you have working throttles with FSUIPC!

---------------------------

updated 8th, September

reason for update: LUA throttle controls added

look at end of thread

----------------------------

Hello dear AirbusX customer,

I have written a LUA Script during Betatest because Finn provided me nicely with the LUA Variables.

You can assign this functions via a registered copy of FSUIPC

Here's a very short tutorial how to "install" LUA files

I copied this tutorial out of one of my stickies in the FSUIPC forum.

The "tutorial" is for the PMDG J41, but thats just a case of naming. Simply change "J41" to "AS_AirbusX" or whatever you like.

To get acces to the single commands you have to do the following:

1) download the file (AS_AirbusX.txt) below

2) rename it as e.g. AS_AirbusX.LUA and put it into the FSX - Modules Folder

3) open FSUIPC menu and choose LUA AirbusX from the drop down

4) insert different parameter numbers depending on the action you want (green field)

fr6tcbg5.jpg

(this example picture is for the J41. For the AirbusX you have to name the file of course AS_AirbusX.LUA or whatever. Then the name in the dropdown (red field) will be Lua AS_AirbusX)!

Note: I have to make slight corrections the next days/weeks (depends on my time), e.g. some switch sounds are not fitting. You can already "install" this LUA script, the parameter number will NOT change with a newer version. You simply have to overwrite this one when a new LUA Script will be provided.

All functions are for ON/OFF or toggle switches, whatever fits your hardware.

Please have a close look into FSUIPC manual. Every question regearding LUA or FSUIPC is answered there!!!

Here is a list which function are in this LUA file:

-- List of parameters

--

-- Autopilot -----------

--

-- 1 AP1 button on

-- 2 AP1 button off

-- 3 AP1 button toggle

-- 4 AP2 button on

-- 5 AP2 button off

-- 6 AP2 button toggle

-- 7 ATHR button on

-- 8 ATHR button off

-- 9 ATHR button toggle

-- 10 AP LOC button on

-- 11 AP LOC button off

-- 12 AP LOC button toggle

-- 13 AP APPR button on

-- 14 AP APPR button off

-- 15 AP APPR button toggle

-- 16 AP EXPED button on

-- 17 AP EXPED button off

-- 18 AP EXPED button toggle

-- 20 Heading mode selection; normal

-- 21 Heading mode selection: managed

-- 22 Heading mode selection normal/managed toggle

-- 23 Heading inc

-- 24 Heading dec

-- 25 Heading inc fast

-- 26 Heading dec fast

-- 30 Speed/mach mode selection toggle

-- 31 Speed mode selection; normal

-- 32 Speed mode selection: managed

-- 33 Speed mode selection normal/managed toggle

-- 34 Speed or Mach inc

-- 35 Speed or Mach dec

-- 36 Speed or Mach inc fast

-- 37 Speed or Mach dec fast

-- 40 Altitude rate selection toggle (100/1000)

-- 41 Altitude rate selection slow (100)

-- 42 Altitude rate selection fast (1000)

-- 43 Altitude mode selection: normal

-- 44 Altitude mode selection: managed

-- 45 Altitude mode selection normal/managed toggle

-- 46 ALT inc slow or fast

-- 47 ALT dec slow or fast

-- 48 ALT inc slow (100)

-- 49 ALT inc fast (1000)

-- 50 ALT dec slow (100)

-- 51 ALT dec fast (1000)

-- 52 V/S Level

-- 53 V/S inc

-- 54 V/S dec

-- 60 F/D ON

-- 61 F/D OFF

-- 62 F/D Toggle

-- 63 LS ON

-- 64 LS OFF

-- 65 LS Toggle

--

-- Navigations Display (ND)---------------------------------

--

-- 70 CSTR on

-- 71 WPT on

-- 72 VOR on

-- 73 NDB on

-- 74 ARPT on

-- 80 Nd Mode inc

-- 81 Nd Mode dec

-- 82 Nd Range inc

-- 83 Nd Range dec

-- 90 VOR1 button on

-- 91 ADF1 button on

-- 92 VOR/ADF1 button off

-- 93 VOR2 button on

-- 94 ADF2 button on

-- 95 VOR/ADF2 button off

-- 96 BARO/STD toggle

-- 97 Master Warning off

-- 98 Master Caution off

-- 99 Master Warning AND Caution off

--

-- lights and signs ------------------------------------------

--

-- 100 strobe on

-- 101 strobe auto

-- 102 strobe off

-- 103 strobe toggle on/off

-- Beacon: Uses standard FSX assignment i.e: (A:LIGHT BEACON, bool)

-- Winglights:Uses standard FSX assignment i.e: (A:LIGHT WING, bool)

-- NAV / Logo lights:Uses standard FSX assignment i.e: (A:LIGHT NAV, bool);(A:LIGHT LOGO, bool)

-- (Note !! Both are tswitched with the same switch)

-- 104 Runway lights on

-- 105 Runway lights off

-- 106 Landing light retracted

-- 107 Landing light on

-- 108 Landing light off

-- 109 Landing light toggle on/off

-- 110 Taxi light off

-- 111 Taxi light on

-- 112 Taxi light T.O

-- 113 Taxi light toggle off/T.O

--Panel lights:Uses standard FSX assignment i.e: (A:LIGHT PANEL, bool)

-- 114 seat sign off

-- 115 seat sign auto

-- 116 seat sign on

-- 117 seat sign toggle off/on

-- 118 smoke sign off

-- 119 smoke sign auto

-- 120 smoke sign on

-- 121 smoke sign toggle off/on

-- 122 emergency light off

-- 123 emergency light armed

-- 124 emergency light on

--

-- systems ------------------------------------------

--

-- 130 APU Master on

-- 131 APU Master off

-- 132 Master toggle

-- 133 APU Start on

-- 134 APU Start off

-- 135 STart toggle

-- 136 APU Master AND Start toggle

-- 140 Autobrake inc

-- 141 Autobrake dec

-- 142 Autobrake MAX

-- 143 Autobrake OFF

-- 144 Autobrake MIN

-- 145 Autobrake MED

-- 148 TCAS dial inc

-- 149 TCAS dial dec

-- 150 Engine1 Master on

-- 151 Engine1 Master off

-- 152 Engine1 Master toggle

-- 153 Engine2 Master on

-- 154 Engine2 Master off

-- 155 Engine2 Master toggle

-- 156 IGN on

-- 157 IGN off

-- 158 IGN toggle

--

-- ECAM ------------------------------------------

--

-- 160 ECAM ENG

-- 161 ECAM BLEED

-- 162 ECAM PRESS

-- 163 ECAM ELEC

-- 164 ECAM HYD

-- 165 ECAM FUEL

-- 166 ECAM APU

-- 167 ECAM COND

-- 168 ECAM DOOR

-- 169 ECAM WHEEL

-- 170 ECAM FCTL

-- 171 ECAM ALL

-- 175 ECAM CLR

-- 176 ECAM RCL

-- 180 ECAM TO config

-- 185 ECAM, PFDs, NDs, Radio on ("avionics")

-- 186 ECAM, PFDs, NDs, Radio off ("avionics")

--

-- further systems ------------------------------------------

--

-- 190 APU Bleed on

-- 191 APU Bleed off

-- 192 APU Bleed toggle

-- 200 BAT1 on

-- 201 BAT1 off

-- 202 BAT1 toggle

-- 203 BAT2 on

-- 204 BAT2 off

-- 205 BAT2 toggle

-- 206 BAT1+2 on

-- 207 BAT1+2 off

-- 208 BAT1+2 toggle

the AS_AirbusX.LUA version is 1.0 from Friday the 13th.

New Versions will be announced here!

Check Version numbers!

--------------------------------------------------------------

LUA scripts for AirbusX throttle

thanks to Pete we have now the possibility to assign the AirbusX throttles via FSUIPC

I copy Petes "How-To" out of his FSUIPC Forum

Try the following two Lua plug-ins:

First this, saved as AirbusX_Thr1.lua:

 ipc.writeLvar("L:AS_FADEC_0", ipcPARAM*-2)
And this, saved as AirbusX_Thr2.lua:
ipc.writeLvar("L:AS_FADEC_1", ipcPARAM*-2)

Save them in the FSX Modules folder.

Then, in FSUIPC axis assignments, assign Throttle 1 to the so-called 'FS control' Lua AirbusX_Thr1, and similarly Throttle 2 to Lua AirbusX_Thr2. Note that you'll find these listed in the "Send to FS as normal axis" mode, NOT in the "Send direct to FSUIPC" mode. This is a quirk of how macros and plug-ins are recognised.

I have tested this with my Saitek X52 and Saitek throttle quadrant and works perfect.

But of course, other hardware could have problems, maybe.

Even if I don't think so.

Please try it out and feel free to report back!

Thanks again and all credits to Pete Dowson!

--------------------------------------------------------------

With Petes throttle plugins, my FADEC script is obsolete.

You can of course download it if you like, but the above solution is much better!!!!

AS_AirbusX_FADEC

With this LUAs you can assign some throttle detends to your hardware throttle.

If you don't want to assign a FSX throttle this is for you.

Best way is via FSUIPC throttle detends;

Only disadvantage is, that you just have the fixed throttle detends, also for taxiing.

I can fly very well with it as I never use manual thrust with the Bus happy.gif

AS_AirbusX_FADEC.txt

AS_AirbusX.txt

Link to comment
Share on other sites

  • Replies 101
  • Created
  • Last Reply

Hello dear AirbusX customer,

I have written a LUA Script during Betatest because Finn provided me nicely with the LUA Variables.

Thanks to Guenseli and Finn, excellent work. I now have my Goflight modules controlling this wonderful bird.

Link to comment
Share on other sites

Hi Günter, thank you very much for this, you have saved all VRinsight supporters a great deal of time setting things up with the Airbus X.

I found it astonishing that the devices didn't work out of the box with the Airbus, especially when Aerosoft said the Airbus was compatible with such devices. It clearly wasn't. Shame on you Aerosoft for telling porkies!! Also saying that you don't have the hardware to test is no excuse at all, you sell the stuff for Pete's sake, what's up, cant Aerosoft afford the prices :lol:

Link to comment
Share on other sites

hello there,

is it only me there have problems whit altitude as when i used my goflight set up like the post it changes altitude in fs but after short time fsx stop responding. havent tryeid the other yet. update spd also dident work now tryeing to find a way to make macro if posible as 2d pannel is there but tryeid to copy things from vc to it but no rotation knobs or like simcheck airbus there you could asigne direct from VC the first i seen.

Link to comment
Share on other sites

Yes. I now use buttons on my CH throttle quadrant to increase/decrease the AP speed/mach, alt, vs and heading.

have you tryeid to make many changes i mean rotationg and rotating as then it seems to chrash in you case pres or hold

Link to comment
Share on other sites

have you tryeid to make many changes i mean rotationg and rotating as then it seems to chrash in you case pres or hold

I'm not sure that I understand your question. Rotating the aircraft at take off?

The button assignments work OK with the LUA script. There are no crashes when I press the CH buttons.

Link to comment
Share on other sites

I'm not sure that I understand your question. Rotating the aircraft at take off?

The button assignments work OK with the LUA script. There are no crashes when I press the CH buttons.

No i test it on the ground to se funktionality. but mabee i hope i now know what is the problem it is the 2 speeds there makes it crash as i have rotation buttons an fast speed and a slow then asigned bothe as goflight suport it but seems that fs cant handel it, dont know why as i used it on other add-ons whit macro insted

Update. nope also happens whit 1 speed.

Link to comment
Share on other sites

Sorry to bother you again Guenseli,

just bought FSUIPC full version. If I try to assign a button from MCP to FSUIPC it won´t recognize it. If I press a button on my G940 it works. Is there a secret trick? SerialFP2 is running.

Thanks in advance.

Adrian

Link to comment
Share on other sites

Sorry to bother you again Guenseli,

just bought FSUIPC full version. If I try to assign a button from MCP to FSUIPC it won´t recognize it. If I press a button on my G940 it works. Is there a secret trick? SerialFP2 is running.

Thanks in advance.

Adrian

hello Adrian i think i know what you need, as i also had that one, you need to read the manual dont remember where or the forum. as you need a software to comunicate whit fsuipc as vrinsight is not like many othere hardware.

best regards Lars

Link to comment
Share on other sites

yep fsuipc manual they are located in your modul folder in fs folder, try FSUIPC4 for Advanced Users manual

Best regards Lars

Update. damm cant find out why the lau would work, and macro is not posible as things is now "the mouse macro calls the code inside the gauge directly"+"It simply traps the entry into the gauge code when you program it by clicking the mouse" taken from fsuipc forum

update. well it seems that you can only use buttons. Dosent make sence why, as it then should work whit only 1 speed on the rotating knob but dosent. so now an autopilot is use less not good

Update. well mebee i know why fs cant handel it, as i was abel whit my goflight RP48 to set an rotating knob for headig and also working but it have to speeds like all the others lau comands, therefor i better understand as then you have asigned the fast in crease and slow increase as altitude so you have the 2 speeds of your hardware and each speed already have fast and slow funktion. what happens then you use the hardware much it gives to much load. but why it then still dosent work whit 1 speed on the autopilot is unknown. well best way to use lau comands, is buttons as rotating knobs works but not as expected, i would say it seems goflight RP48 works if you only comands slow funktion on the hardware ( feels like 1 click) no mater you select the fast or slow effect of the lau comand.

Link to comment
Share on other sites

just bought FSUIPC full version. If I try to assign a button from MCP to FSUIPC it won´t recognize it. If I press a button on my G940 it works. Is there a secret trick? SerialFP2 is running.

No, there is not a secret trick.

But you have two choices:

Use VRInsight Keymapper.

You have to know how to setup VRInsight Software and Keymapper, so that Keymapper can give you out for example by pressing HDGHLD the keycombination "CTRL+H" (just an example!)

Start FSX, go into FSUIPC Menu -> Key Commands and assing to CTRL+H from the pull down menu on the right side; Lua AS_AirbusX and enter e.g Paramter "20"

Use the FSUIPC Mod: this is a bit "difficult" because you have to read the manuals about it and have to make the right setup.

But when it works, you can press HDGHLD and it will show up in FSUIPC Menu as normal Joystick.

Assign in the same way as above...

But you need to know how to set up VRInsight Software and Keymapper.

And for the FSUIPC Mod you have also to read the manuals.

Its all in there and you must it really read, sorry. Or ask in FSUIPC Forum! There's no easier way!

@ Lars.

Do you speak german? Maybe I can help you in german.

I don't understand your english - at least because you refuse to use punctuate!

Link to comment
Share on other sites

No, there is not a secret trick.

But you have two choices:

Use VRInsight Keymapper.

You have to know how to setup VRInsight Software and Keymapper, so that Keymapper can give you out for example by pressing HDGHLD the keycombination "CTRL+H" (just an example!)

Start FSX, go into FSUIPC Menu -> Key Commands and assing to CTRL+H from the pull down menu on the right side; Lua AS_AirbusX and enter e.g Paramter "20"

Use the FSUIPC Mod: this is a bit "difficult" because you have to read the manuals about it and have to make the right setup.

But when it works, you can press HDGHLD and it will show up in FSUIPC Menu as normal Joystick.

Assign in the same way as above...

But you need to know how to set up VRInsight Software and Keymapper.

And for the FSUIPC Mod you have also to read the manuals.

Its all in there and you must it really read, sorry. Or ask in FSUIPC Forum! There's no easier way!

@ Lars.

Do you speak german? Maybe I can help you in german.

I don't understand your english - at least because you refuse to use punctuate!

Well german was not good. but i could try to point it more out what i mean in the last post

Link to comment
Share on other sites

try it!

But all is as simple as I wrote it in the first post.

Download the file.

Rename it to AS_AirbusX.LUA

put it into the modules folder

Open FSUIPC Menu, assign from the pulldown Lua AS_AirbusX and enter a paramter.

All other issues are related to other Softwares, Systems, etc etc you are running.

I just can say, that my script is working here...

Link to comment
Share on other sites

try it!

But all is as simple as I wrote it in the first post.

Download the file.

Rename it to AS_AirbusX.LUA

put it into the modules folder

Open FSUIPC Menu, assign from the pulldown Lua AS_AirbusX and enter a paramter.

All other issues are related to other Softwares, Systems, etc etc you are running.

I just can say, that my script is working here...

well i know that and already done that from start to stop. but it seems the lau comands have 2 speeds, fast and slow so it only would work if you press a button. as i have said i tryeid the 48 ALT inc slow (100) , -- 49 ALT inc fast (1000) seperate but both have fast and slow funktion it stil in hole thousends or hundrets not that i mean. but it is like default just here it runs fast and slow in hole thousends or hundrets, so if set in hole thousends it could start whit 1 thousend but if you rotate fast on the hardware it would do the same but in here it does it the otherway starts fast whit 1 click and slow if you rotate fast. and what happens if you got comand 48 as slow on the hardware and 49 as fast to the fast setting on the goflight which should it then pick.

But if you only use 1 of them it stil would work as goflight have fast and slow funktion but is not supportet in the lau file you have attached. but normaly it isent a problem that the addon dosent support fast or slow. so think it is the gaug or so there does it. and about hardware and software no it isent as i tryeid it whit out goflight software, and the hardware works whit other add-ons set up via fsuipc. by the way do you use rotational buttons?

Link to comment
Share on other sites

by the way do you use rotational buttons?

yes, I have the VRInsight MCP combo

I'm really sorry: as I'm not a native english speaker I have really problems to understand you.

That's not meant nasty; I simply couldn't :(

You can increase ALT in 100ft steps (parameter 48) and you can increase it in 1000ft steps (para. 49)

Maybe you mean that I have a logic behind, that the ALT speeds up when you dial faster, thats not the case.

You can assign 48 to one button and 49 to an other button.

Or you use parameters 46 and 47, for increase and decrease, but then you have to switch in the VC the altstep by hand.

My VRInsight Combo has a logic "hardcoded" that dialing faster will generate an other button press. Thats, why I can dial fast.

Link to comment
Share on other sites

yes, I have the VRInsight MCP combo

I'm really sorry: as I'm not a native english speaker I have really problems to understand you.

That's not meant nasty; I simply couldn't sad.gif

You can increase ALT in 100ft steps (parameter 48) and you can increase it in 1000ft steps (para. 49)

Maybe you mean that I have a logic behind, that the ALT speeds up when you dial faster, thats not the case.

You can assign 48 to one button and 49 to an other button.

Or you use parameters 46 and 47, for increase and decrease, but then you have to switch in the VC the altstep by hand.

My VRInsight Combo has a logic "hardcoded" that dialing faster will generate an other button press. Thats, why I can dial fast.

Well goflight autopilot have 2 steps i know vrinsight dosent. and the problem is that if i dial faster then 1 click as it feels (parameter 48), it would go to what you call fast (para. 49) as asigned in fsuipc. But lets take i only asigne the slow (parameter 48) and rotate it both fast and slow it have an effect like default just works the other way. If i rotate it slow it should use (parameter 48) and fast nothing, but here is what happens, slow rotate is fast in the sim and fast works slow. can you see the point it should not even work when i rotate fast. There for if i then used (para. 49) as fast then it would have been 4 controls input insted of 2. as (parameter 48) should be slow funktion hundrets and if i rotate fast it should be tousind (para. 49). just like default. hope that was better. so seems there is a problem whit 2 interfase as should not bee there.

and about 46 and 47 it seemede to work but also crash fs and stil the wrong way as it is iritating rotating fast on the hardware and the sim does it slow, and slow on hardware is fast. and it is the same for heading so think it is general

Realy miss macro as it have worked whit out problems as just a hit of gauge and asigned then a comand in fsuipc button or rotate button. easy as it gets. There is 1 good thing as default goflight could handel altitude whit some limitation. Then just need speed and heading to work as good.

Link to comment
Share on other sites

Well goflight autopilot have 2 steps i know vrinsight dosent.

The VRInsight MCP has two different speeds for most of the dials on the panel, turn a dial slow and it shows up as for example button 1, turn the same dial in the same direction but faster and it will show up as button 2 this time.

Link to comment
Share on other sites

hello there,

is it only me there have problems whit altitude as when i used my goflight set up like the post it changes altitude in fs but after short time fsx stop responding. havent tryeid the other yet. update spd also dident work now tryeing to find a way to make macro if posible as 2d pannel is there but tryeid to copy things from vc to it but no rotation knobs or like simcheck airbus there you could asigne direct from VC the first i seen.

I think what Lars is saying here is that when he rotates the knobs on his hardware device, it causes FSX to lock up. I've had this happen to me once. I just wonder if FSX (or the machine) can't handle the volume of LUA commands such as when making a large change to altitude or heading in 100 feet or 1 degree increments.

I'm wondering if compiling the LUA would help.

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