Jump to content

A330 Pro Joystick/Throttle Quad/Radio Panel Button Programming


Rosko

Recommended Posts

Hey there, not sure if this is the right spot (‘Everything else’) but I’ve got a question about setting up my FCU w FSUIPC and/or P3D to work with my CH throttle switches and the push buttons on my TM TCA Airbus sidestick.  On my smaller bus from a different company, I’ve used spad next to get my radio stack working.  
 

As for the FCU in my other aircraft

-I use my CH throttle quad switches in order to go speed inc/dec, HDG inc/dec, ALT inc/dec, VS etc.  

 

-I use the push buttons on my TCA Airbus sidestick for AP1/2, LOC/APPR/EXPED autobrake Low-Max, TO Config 

 

-I use the four (4) rocker switches on my honeycomb alpha yoke for managed/selected SPD/NAV/CLB/VS 

 

I’d like to get the A330 control codes (for example my small Airbus uses ‘rotorbrake’ codes for everything where I input those into FSUIPC and it handles it)  In my Boeing aircraft, there’s what’s called a “custom code” such as 0X1235B to program the same functions in. 
 

 I’m currently using mouse macros in the A330 and a lot of them aren’t the greatest-for example when I push/pull the FCU-the animation remains stuck in or out on the button due to the mouse macro.  
 

I couldn’t find a new topic on this or one specific for the A330 in the last 6 months.  
 

Any help is appreciated, I’m running P3D V5.  
 

edit: I’m not really into this LVAR or lua Linda thing-I’ve looked into it and all it’s done is really confuse me a bunch so if there’s codes somewhere that would be outstanding.  

Link to comment
Share on other sites

What you refer to as "Custom Code" is what we call "Offset", but many people are now using "LVAR" with LUA Plugins and though I'm no expert that seems like the best way to accomplish what you need. 

 

User Joan Alonso

seems very knowledge in this area, and I recommend starting with their post (below).

 

 

 

You many find that the posts below offer from valuable informaiton as well.

 

Best wishes!

 

 

https://www.mutleyshangar.com/reviews/bc/linda/linda.htm

 

https://flightsimeindhoven.com/apps/linda/

 

https://www.avsim.com/forums/topic/512119-linda-311-32-64-bit-compatible-16-feb-2020/

 

Link to comment
Share on other sites

37 minutes ago, DaveCT2003 said:

What you refer to as "Custom Code" is what we call "Offset", but many people are now using "LVAR" with LUA Plugins and though I'm no expert that seems like the best way to accomplish what you need. 

 

User Joan Alonso

seems very knowledge in this area, and I recommend starting with their post (below).

 

 

 

You many find that the posts below offer from valuable informaiton as well.

 

Best wishes!

 

 

https://www.mutleyshangar.com/reviews/bc/linda/linda.htm

 

https://flightsimeindhoven.com/apps/linda/

 

https://www.avsim.com/forums/topic/512119-linda-311-32-64-bit-compatible-16-feb-2020/

 

Thanks Dave, I appreciate the reply but this really isn’t what I’m looking to do here.  
 

This: 

 

function AB_EXT_ExtPwr_conn () 
    ipc.writeLvar("MCDU_EXTPOWER", 1)
end

function AB_EXT_ExtPwr_disc ()
    AB_OVH_EXT_PWR_off ()
    ipc.writeLvar("MCDU_EXTPOWER", 0)
end

 

function AB_EXT_ExtPwr_toggle ()
    var = ipc.readLvar("MCDU_EXTPOWER")
    if var == 1 then
        AB_EXT_ExtPwr_disc()
    else
        AB_EXT_ExtPwr_conn()
    end
end

 

event.flag(1, "AB_EXT_ExtPwr_toggle")

 

 

kind of stuff really confuses the heck out of me.  I also don’t have time to sit there and write all this code stuff out.  I’m hoping for a simple solution.  
 

 

What guess I need to know then is-can I map the A330 functions to keyboard binds instead?  Like is there a master list of commands/keys/codes etc.  Because as I mentioned this lua/Linda thing really confuses me and I’d prefer to not have another piece of software running since I’ve got my sim fairly stable *knocks on wood*

 

 

Link to comment
Share on other sites

Looking at that post just trying to figure out what the heck to write is insanity.  
I get that this is for the range of the ND but I’m not a coder.  It took me an hour each to input the custom codes for my other addon a/c.  Is there a list of offsets.  I believe those will go into FSUIPC the same way with a certain number.  

 

 

 

function ND_RANGE_inc ()
    i = ipc.readLvar("L:AB_MPL_ND_Range")
    if i < 5 then
        ipc.writeLvar("L:AB_MPL_ND_Range", i+1)
        ipc.sleep(10)
        ASC_KnobRotate ()
        ND_RANGE_show ()
    end
end

function ND_RANGE_dec ()
    i = ipc.readLvar("L:AB_MPL_ND_Range")
    if i > 0 then
        ipc.writeLvar("L:AB_MPL_ND_Range", i-1)
        ipc.sleep(10)
        ASC_KnobRotate ()
        ND_RANGE_show ()
    end
end

Link to comment
Share on other sites

3 minutes ago, Rosko said:

What guess I need to know then is-can I map the A330 functions to keyboard binds instead?

 

No sir, we use custom coding for those functions and I'm told the FSUIPC Macro functions also don't work (though I have no idea why).  I'm afraid that most payware aircraft use custom code so they would be the same for you.

 

I don't made buttons myself as I'm very much a Virual Cockpit type person.  But I'm told that learning LUA is pretty straight forward, just takes some reading to understand and there is always someone to help in the LUA forum.  T here are also some  Youtube videos for LUA.  Anyway, I understand if you don't wish to learn LUA, it's merely the only solution I know of for what you're asking for.

 

Best wishes!

 

 

Link to comment
Share on other sites

2 minutes ago, DaveCT2003 said:

 

No sir, we use custom coding for those functions and I'm told the FSUIPC Macro functions also don't work (though I have no idea why).  I'm afraid that most payware aircraft use custom code so they would be the same for you.

 

I don't made buttons myself as I'm very much a Virual Cockpit type person.  But I'm told that learning LUA is pretty straight forward, just takes some reading to understand and there is always someone to help in the LUA forum.  T here are also some  Youtube videos for LUA.  Anyway, I understand if you don't wish to learn LUA, it's merely the only solution I know of for what you're asking for.

 

Best wishes!

 

 

I also use the virtual cockpit.  But with my peripheral devices I want to program them to my buttons and switches so I don’t have to look around and take my eyes off the pavement or sky so much as it were.  
 

As to the macros-My current macros work BUT not like they should (button remains depressed etc.) 

 

If there’s a custom code, then there theoretically should be a code that can be sent to FSUIPC?  

Link to comment
Share on other sites

18 hours ago, Rosko said:

I also use the virtual cockpit.  But with my peripheral devices I want to program them to my buttons and switches so I don’t have to look around and take my eyes off the pavement or sky so much as it were.  
 

As to the macros-My current macros work BUT not like they should (button remains depressed etc.) 

 

If there’s a custom code, then there theoretically should be a code that can be sent to FSUIPC?  

 

Yes, that woukd be the Offset and/or LVars I wrote about earlier. The Offsets are not a full list so one has to use the LVars and that is done via LUA Scripts.

 

Sorry I don't have a different answer for you my friend, but that is where things are.

 

Best wishes.

 

 

Link to comment
Share on other sites

1 hour ago, DaveCT2003 said:

 

Yes, that woukd be the Offset and/or LVars I wrote about earlier. The Offsets are not a full list so one has to use the LVars and that is done via LUA Scripts.

 

Sorry I don't have a different answer for you my friend, but that is where things are.

 

Best wishes.

 

 

Thanks for the additional reply.  Hopefully @Joan Alonso can pop thru to help out cause there’s not too many YouTube videos out there with how to do this. 

Link to comment
Share on other sites

Hi Rosko,

 

You don't really need to write any piece of code, of course if you take some time to figure out how it works it will be easier.

You only need to copy and paste (replace) with the Lvars you want. So for a simple button or key in VC to toogle it from On to Off:

 

 

 

function ExternalPower_conn ()  ----------------------------------> This is the name of the (A) function inside the toggle function (You can type the name you want for it)
    ipc.writeLvar("MCDU_EXTPOWER", 1) ----------------------------------> This is the actual Lvar name ("Lvar", Value) The value is usually 0=Off / 1=On
end

function ExternalPower_disc () ----------------------------------> This is the name of the (B) function inside the toggle function (You can type the name you want for it)
    ipc.writeLvar("MCDU_EXTPOWER", 0) ----------------------------------> This is the actual Lvar name ("Lvar", Value) The value is usually 0=Off / 1=On
end

 

function ExternalPower () ----------------------------------> This is the name of the whole toggle function, (C) (You can type the name you want for it)
    var = ipc.readLvar("MCDU_EXTPOWER")  ----------------------------------> Read the Lvar State (0 or 1)
    if var == 1 then
         ExternalPower_conn()----------------------------------> If Lvar State is 1 then do function (A)
    else
        ExternalPower_disc()----------------------------------> If Lvar State is 0 then do function (B)
    end
end

 

event.flag(1, "ExternalPower") ----------------------------------> The name you gave to the toggle function (C)

 

 

 

So you just need to replace the Lvar Name for the one you want to use, and replace the name of the functions to whatever you want to call them, and also rename the whole function to your liking.

 

Two important reminders:

 

1) You must add your Lua to the [Auto] section inside FSUIPC.ini:

https://forum.simflight.com/topic/86587-lua-file-not-loaded-but-why/?do=findComment&comment=524737

 

2) The event.flag tells FSUIPC what parameter assigns to that function. So when assigning the key inside FSUIPC select LuaToggle "Your file" and the parameter will be the flag inside the script. So for example:

 

event.flag(1, "ExternalPower")

event.flag(2, " Seatbelts ")

event.flag(3, "APU)

...

 

Please login to display this image.

 

 

Hope this helps!

Link to comment
Share on other sites

1 hour ago, Joan Alonso said:

Hi Rosko,

 

You don't really need to write any piece of code, of course if you take some time to figure out how it works it will be easier.

You only need to copy and paste (replace) with the Lvars you want. So for a simple button or key in VC to toogle it from On to Off:

 

 

 

function ExternalPower_conn ()  ----------------------------------> This is the name of the (A) function inside the toggle function (You can type the name you want for it)
    ipc.writeLvar("MCDU_EXTPOWER", 1) ----------------------------------> This is the actual Lvar name ("Lvar", Value) The value is usually 0=Off / 1=On
end

function ExternalPower_disc () ----------------------------------> This is the name of the (B) function inside the toggle function (You can type the name you want for it)
    ipc.writeLvar("MCDU_EXTPOWER", 0) ----------------------------------> This is the actual Lvar name ("Lvar", Value) The value is usually 0=Off / 1=On
end

 

function ExternalPower () ----------------------------------> This is the name of the whole toggle function, (C) (You can type the name you want for it)
    var = ipc.readLvar("MCDU_EXTPOWER")  ----------------------------------> Read the Lvar State (0 or 1)
    if var == 1 then
         ExternalPower_conn()----------------------------------> If Lvar State is 1 then do function (A)
    else
        ExternalPower_disc()----------------------------------> If Lvar State is 0 then do function (B)
    end
end

 

event.flag(1, "ExternalPower") ----------------------------------> The name you gave to the toggle function (C)

 

 

 

So you just need to replace the Lvar Name for the one you want to use, and replace the name of the functions to whatever you want to call them, and also rename the whole function to your liking.

 

Two important reminders:

 

1) You must add your Lua to the [Auto] section inside FSUIPC.ini:

https://forum.simflight.com/topic/86587-lua-file-not-loaded-but-why/?do=findComment&comment=524737

 

2) The event.flag tells FSUIPC what parameter assigns to that function. So when assigning the key inside FSUIPC select LuaToggle "Your file" and the parameter will be the flag inside the script. So for example:

 

event.flag(1, "ExternalPower")

event.flag(2, " Seatbelts ")

event.flag(3, "APU)

...

 

 

 

Hope this helps!

I appreciate the response but you completely lost me by the second sentence.  At any rate-im

screwed with the A330 anyhow.  When I attempted to start flying yesterday it started throwing DXGI device removed/device Hung errors at me again which it hadn’t done in quite some time.   Even after a reinstall it’s still doing it so now I’ve got to figure out what happened to it first and get it working before I can fly it again and attempt to map my gear to it.  

Link to comment
Share on other sites

1 minute ago, Rosko said:

You only need to copy and paste (replace) with the Lvars you want. So for a simple button or key in VC to toogle it from On to Off:

 

 

 

function ExternalPower_conn ()  ----------------------------------> This is the name of the (A) function inside the toggle function (You can type the name you want for it)
    ipc.writeLvar("MCDU_EXTPOWER", 1) ----------------------------------> This is the actual Lvar name ("Lvar", Value) The value is usually 0=Off / 1=On
end

function ExternalPower_disc () ----------------------------------> This is the name of the (B) function inside the toggle function (You can type the name you want for it)
    ipc.writeLvar("MCDU_EXTPOWER", 0) ----------------------------------> This is the actual Lvar name ("Lvar", Value) The value is usually 0=Off / 1=On
end

 

function ExternalPower () ----------------------------------> This is the name of the whole toggle function, (C) (You can type the name you want for it)
    var = ipc.readLvar("MCDU_EXTPOWER")  ----------------------------------> Read the Lvar State (0 or 1)
    if var == 1 then
         ExternalPower_conn()----------------------------------> If Lvar State is 1 then do function (A)
    else
        ExternalPower_disc()----------------------------------> If Lvar State is 0 then do function (B)
    end
end

 

event.flag(1, "ExternalPower") ----------------------------------> The name you gave to the toggle function (C)

 

 

 

So you just need to replace the Lvar Name for the one you want to use, and replace the name of the functions to whatever you want to call them, and also rename the whole function to your liking.

 

Two important reminders:

 

1) You must add your Lua to the [Auto] section inside FSUIPC.ini:

https://forum.simflight.com/topic/86587-lua-file-not-loaded-but-why/?do=findComment&comment=524737

 

2) The event.flag tells FSUIPC what parameter assigns to that function. So when assigning the key inside FSUIPC select LuaToggle "Your file" and the parameter will be the flag inside the script. So for example:

 

event.flag(1, "ExternalPower")

event.flag(2, " Seatbelts ")

event.flag(3, "APU)

...

Might I also suggest someone should really do a YouTube video on this (particularly with mapping the FCU among other things) with the Linda/LUA stuff.  Scot Flieger was kind enough to give me a quick step by step on how to get started with the LINDA/LUA stuff but before I could get started, the plane started throwing the DXGI errors. 

Link to comment
Share on other sites

I’m sorry if it doesn’t help you @Rosko 

In all the years I’ve been into flight simulation I always had to learn by myself a lot of things if I wanted to go further with the default settings of any piece of software. I think that there’s a lot of flight simmers that had to. There are a lot of people out there that can help you, but there are things that are not as easy as “do this and voila”, you’ll need to search, ask, do a lot of trial and error (I promise, a lot) and at least familiarize with the files and formats of that you want to modify or customize.

 

FSUIPC forum would be a good start point,  I always got feedback from Pete or his team, they can really assist you on this.

 

Cheers!

Link to comment
Share on other sites

4 hours ago, Joan Alonso said:

I’m sorry if it doesn’t help you @Rosko 

In all the years I’ve been into flight simulation I always had to learn by myself a lot of things if I wanted to go further with the default settings of any piece of software. I think that there’s a lot of flight simmers that had to. There are a lot of people out there that can help you, but there are things that are not as easy as “do this and voila”, you’ll need to search, ask, do a lot of trial and error (I promise, a lot) and at least familiarize with the files and formats of that you want to modify or customize.

 

FSUIPC forum would be a good start point,  I always got feedback from Pete or his team, they can really assist you on this.

 

Cheers!

Yes I’ve figured out tons myself thru the years as well.  I’m at the point now where I just want to fly 😂   I’ve actually got LINDA somewhat working now so I think I’ll be able to use the A330 module at this point.  I was worried I was going to have to write every line of code for every switch going.  

Link to comment
Share on other sites

5 hours ago, Mathijs Kok said:

Not a bad idea, but not for us. This is simply not the market we are aiming at with this product.

Mathijs did you mean a YouTube video as to “how to” with LINDA?   What market are you talking about?   I realize the A330 isn’t full on all the bells and whistles but its a great plane and it flies nice (when what I suspect is TrueGlass doesn’t throw DXGI errors at me) Not to mention it’s the only option for my beloved Hawaiian Airlines at present (how about a market for an A332 expansion pretty please!) 

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