These are the Support Forums for FSUIPC and related products.

These forums replace the old support forums which have been running for 20+ years. The old forums contain a wealth of information on all FSUIPC products, but are now no longer available.

Please note that you will need to Register and Login to post for support, and also to download attachments. You can view these forums without registering.

Support is also available via Discord. Please use the following invite link to join the FSUIPC Discord server:
https://discord.gg/zjwUTrxmmE

FSLabs A320 Assign ...
 
Notifications
Clear all

[Solved] FSLabs A320 Assign Button

Posts: 5
Registered
Topic starter
(@wxman20)
Joined: 3 weeks ago

Hello everyone,

Needs some help assigning a button for the FSLabs A320 for P3Dv5. What I'm trying to do is assign a button on my Thrustmaster T16000M to turn off both the VC_GSLD_BOTH_EFIS_FD rather than to assign a button for each EFIS_FD. In my lua file, I have the VC_GSLD_BOTH_EFIS_FD event flag as event.flag(3,"VC_GSLD_BOTH_EFIS_FD_off"). When I'm assigning a button and input the parameter, in this case, "3", and then try it while I was at the gate or flying, it was working. Both FD remain on. Again, in order to turn off both FD, I had to assign a button, 1 for CA FD and the other for FO FD. Any thoughts??


10 Replies
Posts: 296
Moderator
(@fsuipc-support)
Joined: 8 months ago

Sorry, but I am not sure I fully understand your issue. You say:

Posted by: @wxman20

When I'm assigning a button and input the parameter, in this case, "3", and then try it while I was at the gate or flying, it was working.

So its working! But then:

Posted by: @wxman20

Both FD remain on

So this would indicate that it is not working.

And you also say:

Posted by: @wxman20

Again, in order to turn off both FD, I had to assign a button, 1 for CA FD and the other for FO FD.

But setting a flag to 1 would trigger this:

event.flag(1,"VC_GSLD_CP_Autoland_Button")

?
And your lua script, which you have added twice, does not seem complete. For example, this:

if FDCPVar ~= 0 then ipc.control(FSL, 71108) end

What is FSL? That doesn't seem to be defined anywhere, and there are missing functions such as VC_Button_press.

Could you therefore please explain your issue more clearly, and attach the full lua script. Also set debug logging for lua, as well as for Buttons & Keys, and show me / attach your log and ini files together with the lua script.

You can also maybe add some log statements to your lua (ipc.log) in the functions you are having issues with which may give you some more insight.


Reply
Posts: 5
Registered
Topic starter
(@wxman20)
Joined: 3 weeks ago

I thought I was clear in my explanation.

Posted by: @fsuipc-support
What is FSL? That doesn't seem to be defined anywhere

I assume it stands for FSLabs, just shorten. I'm not the one who wrote it.

Posted by: @wxman20

Posted by: @wxman20

 

Again, in order to turn off both FD, I had to assign a button, 1 for CA FD and the other for FO FD.

 

But setting a flag to 1 would trigger this:

event.flag(1,"VC_GSLD_CP_Autoland_Button")

You're confused. I didn't mean the event flag 1, I meant 1 as in "a button"

Posted by: @fsuipc-support
And your lua script, which you have added twice, does not seem complete

I didn't write it twice nor is it incomplete. There is a action lua file for FSLabs A320 (see attached file) also a rotorbrake_param_list lua file  and all I did was copied the only part I needed from the action lua file since there was nothing available in the rotorbrake_param_list for VC_GSLD_BOTH_EFIS_FD_off. So what you saw in my lua file regarding VC_GSLD_BOTH_EFIS_FD_off  is correct as seen in the attached action lua file. Despite it being for LINDA, most if not all of those functions work in FSUIPC by either inputting the event.flag value in the parameter box within the FSUIPC Option/Settings tab or the code found in the rotorbrake_param_list lua file (i.e, 71108). So again, in my lua file, for the event flag I have for the VC_GSLD_BOTH_EFIS_FD_off  is: event.flag(3,"VC_GSLD_BOTH_EFIS_FD_off") where the 3, I would input that number in the parameter box, the same way I did for the VC_GSLD_CP_Warning_Button regarding 0. If the rotorbrake_param_list had a code for VC_GSLD_BOTH_EFIS_FD_off, say for example 78704, then I would input that number in the parameter box when assigning a button on my joystick.

 

 

 

 


Reply
Posts: 296
Moderator
(@fsuipc-support)
Joined: 8 months ago

Posted by: @wxman20

I assume it stands for FSLabs, just shorten. I'm not the one who wrote it.

It is a variable that is not defined in the script - doesn't matter what it stands for, it must be defined (and as a control number). If you try and run that script, it will give an error for this, as well as other issues.

Posted by: @wxman20

You're confused. I didn't mean the event flag 1, I meant 1 as in "a button"

Ah, ok. Would help if you could also attach your FSUIPC6.ini file (so I can see your assignments) as well as you FSUIPC6.log file (so I can see what is happening, with logging for Buttons & Keys activated.

Also, try assigning a button to activate both so I can see what that triggers in your log file.

Posted by: @wxman20

I didn't write it twice nor is it incomplete.

It is attached twice (see your first post) and is incomplete for the reasons I have specified - it contains undefined local variables (FSL) and calls to functions that don't exist (VC_Button_press). For these reasons, if you try running that script, it will exit with errors, which would also be logged in your FSUIPC7.log file.

Posted by: @wxman20

all I did was copied the only part I needed from the action lua file

Ah. Ok. So that is why there are undefined variables and calls to undefined functions. You cannot just extract some bits from a lua file and expect it to work.

I have to go now, but I will take a look at those files tomorrow and advise.

BUT, if you already have assignments to two buttons to turn these off individually, you can easily achieve what you want by manually editing the FSUIPC6.ini file - find the two entries that do this individually, then just change the button number on one of the entries to use the same button number as the other entry (or, if you want this on a different button, duplicate the lines, give them new index numbers and set the button number you want to use). Best to edit the ini file when FSUIPC6 is not running, but if running do this with the button assignments window open and then click to reload all button assignments once you have saved the changes.

If you don't know the format of the entries to determine the button number, the format is explained in the documentation (Advanced User guide), but it should be pretty obvious.

 

 

 


Reply
Posts: 5
Registered
Topic starter
(@wxman20)
Joined: 3 weeks ago

Posted by: @fsuipc-support
manually editing the FSUIPC6.ini file

No need for me to do that. I was able to figure it out. I included a line for the VC_GSLD_BOTH_EFIS_FD_off in the rotorbrake_param_list since it didn't have it. After adding this entry seen below and assigning a button on my joystick in FSUIPC6, it now works as intended. As for the number 71036, it was available since there was no other function on that list that was using that number. So, I disregarded my lua file and instead used the rotorbrake_param_list lua file with the newly added line entry below.

VC_GSLD_BOTH_EFIS_FD_off = 71036, -- to press

Posted by: @fsuipc-support
It is attached twice

I see that. Didn't realized I attached my lua file twice. oops.

Thanks for the help.

 

 


Reply
Page 1 / 2