Good evening,
I am trying to make a luamacros script for my ToLiss A321 on XP11, and I am stuck on one issue :
The Push and Pull functions are unfortunately "single channel" commands, and as my keyboard doesn't have an infinite key number I would like to assign both functions to one key. I found in the datarefs that we can monitor the status of the function (Managed or Selected), and I tried this script part :
.....
elseif (lmc_get_xpl_variable('AirbusFBW/SPDmanaged', 0) and button == 85) then lmc_xpl_command('AirbusFBW/PushSPDSel')
elseif (lmc_get_xpl_variable('AirbusFBW/SPDmanaged', 1) and button == 85) then lmc_xpl_command('AirbusFBW/PullSPDSel')
.....
However it always takes into account the first line, without checking the state of SPDmanaged. I'm sorry but I'm new to Lua programming
Is there any way you could help me on this matter please ?
With all my best regards
Converting a switch input to a toggle input
Re: Converting a switch input to a toggle input
lmc_get_xpl_variable takes single argument (data ref name) and return its value. Try lmc_get_xpl_variable('AirbusFBW/SPDmanaged') == 0 and...
Petr Medek
LUAmacros author
LUAmacros author
Re: Converting a switch input to a toggle input
Thank you very much for your answer, it worked perfectly !!!!