Apologies if this is a stupid question, I’m sure it has already been answered, or is so obvious no one needed to ask, but if someone could point me in the right direction, some FAQs or tutorials, that would be great, I’m new to Air Manager.
I’m trying to get Air Manager to hold down a button in XP12 when I hold down a physical button connected via an Arduino. So far my attempts have only resulted in Air Manager pressing and immediately releasing the button in XP, no matter how long I hold the physical button. Specifically I’m trying to build an APU module for the new XP12 Citation X, and this is for the APU starter switch, which needs to be pressed up (or down) for several seconds.
APU starter switch up -> command = laminar/CitX/APU/starter_switch_up
APU starter switch dwn -> command = laminar/CitX/APU/starter_switch_dwn
I can make it work in SPAD.next by using “begin command” on button press, and “end command” on button release, but I’m not sure how to implement that in Air Manager. Do I need to implement it as a loop in the LUA script, or is there another method I should use instead of xpl_command?
Air Manager looks amazing and I’m excited to see what I can do with it, I’m just on the steep bit of the learning curve atm.
Thank you for reading this, and thanks even more for any helpful advice.
Pete
Holding button
Re: Holding button
Hi Pete,
Take a look at the wiki API pages relating to xpl_command. You use a similar BEGIN and END within the xpl_command. Be sure to let us know how you go.
Take a look at the wiki API pages relating to xpl_command. You use a similar BEGIN and END within the xpl_command. Be sure to let us know how you go.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Holding button
Hi Sling, thanks so much for your fast response. I will take a look at that tomorrow.
Re: Holding button
Well I couldn’t wait
https://siminnovations.com/wiki/index.p ... pl_command
That looks like exactly what I need, but I must sleep now, it’s nearly 5am here and I have work in a few hours
Will let you know how it goes
Thanks again
Pete
https://siminnovations.com/wiki/index.p ... pl_command
That looks like exactly what I need, but I must sleep now, it’s nearly 5am here and I have work in a few hours
Will let you know how it goes
Thanks again
Pete
Re: Holding button
You'll need to use the pressed and released button callbacks for this, in case you did not know, but you probably already had that figured out
Re: Holding button
Hi Ralph, Sling,
Thank you both for your replies. Yes, I got the button pressed and released callback bit, which I found from another code snippet. I have now tested with the "BEGIN" and "END" arguments within xpl_command, and it works beautifully, exactly what I wanted. Thanks so much for your help. I will know to check the wiki first for my next query
Regards
Pete
Thank you both for your replies. Yes, I got the button pressed and released callback bit, which I found from another code snippet. I have now tested with the "BEGIN" and "END" arguments within xpl_command, and it works beautifully, exactly what I wanted. Thanks so much for your help. I will know to check the wiki first for my next query
Regards
Pete