Air Player - how to add hardware?
Re: Air Player - how to add hardware?
Thanks Keith - I’ll use code post style next time.
It repeated trim command as experimenting with right amount of trim per input on my aircraft. Not very elegant but it works.
I’m not sure what you want me to try? It’s basically the same code? I mean I can try but...
It repeated trim command as experimenting with right amount of trim per input on my aircraft. Not very elegant but it works.
I’m not sure what you want me to try? It’s basically the same code? I mean I can try but...
Re: Air Player - how to add hardware?
I ran your simplified code, same error.
logic.lua:10: Illegal argument list
logic.lua:10: Illegal argument list
Re: Air Player - how to add hardware?
And also if I run the G5 panel, and then look at the log from Air Player I see these errors:
22-10-2020 11:33:35 INFO SiRunner: Generic - Garmin G5: logic.lua:79: Failed to bind hardware id's to connected hardware
22-10-2020 11:33:35 INFO SiRunner: Generic - Garmin G5: logic.lua:79: Failed to bind hardware id's to connected hardware
22-10-2020 11:33:35 ERROR SiRunner: Generic - Garmin G5: logic.lua:102: Illegal argument list
22-10-2020 11:33:35 ERROR SiRunner: Generic - Garmin G5: logic.lua:102: Illegal argument list
22-10-2020 11:33:35 INFO SiRunner: Generic - Garmin G5: logic.lua:125: Failed to bind hardware id's to connected hardware
22-10-2020 11:33:35 INFO SiRunner: Generic - Garmin G5: logic.lua:125: Failed to bind hardware id's to connected hardware
So it seems like not a code problem? But something to do with Air Player not recognizing Arduinos. I am guessing something weird going on on that PC but hard to diagnose. In device manager it shows devices as "working properly". And if I run Air Manager on that PC (the same one that I am running Air Player on), then the boards show up in the devices list. But for some reason Air Player is not seeing them.
The only other thing I can think of doing, unless you have some other idea, is to move AP to another PC (I have another windows laptop) and try it on that. Then I would know it's specific to the one PC.
22-10-2020 11:33:35 INFO SiRunner: Generic - Garmin G5: logic.lua:79: Failed to bind hardware id's to connected hardware
22-10-2020 11:33:35 INFO SiRunner: Generic - Garmin G5: logic.lua:79: Failed to bind hardware id's to connected hardware
22-10-2020 11:33:35 ERROR SiRunner: Generic - Garmin G5: logic.lua:102: Illegal argument list
22-10-2020 11:33:35 ERROR SiRunner: Generic - Garmin G5: logic.lua:102: Illegal argument list
22-10-2020 11:33:35 INFO SiRunner: Generic - Garmin G5: logic.lua:125: Failed to bind hardware id's to connected hardware
22-10-2020 11:33:35 INFO SiRunner: Generic - Garmin G5: logic.lua:125: Failed to bind hardware id's to connected hardware
So it seems like not a code problem? But something to do with Air Player not recognizing Arduinos. I am guessing something weird going on on that PC but hard to diagnose. In device manager it shows devices as "working properly". And if I run Air Manager on that PC (the same one that I am running Air Player on), then the boards show up in the devices list. But for some reason Air Player is not seeing them.
The only other thing I can think of doing, unless you have some other idea, is to move AP to another PC (I have another windows laptop) and try it on that. Then I would know it's specific to the one PC.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Player - how to add hardware?
Hi,
Ok that means Air Player does not like named hardware. I did see Corjan have a look at this thread. Sure he is going to check.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Player - how to add hardware?
Hi,
Did you try this.
Keith
Did you try this.
Code: Select all
hw_dial_id = hw_dial_add(hw_id_a, hw_id_b, type, callback)
Last edited by Keith Baxter on Thu Oct 22, 2020 11:05 am, edited 1 time in total.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: Air Player - how to add hardware?
You are moving the Arduino between machines while you test this right?
If so you could try adding the dial sometime after the initial script runs. You can do this by placing the add in a timer callback. Worth a shot.
If so you could try adding the dial sometime after the initial script runs. You can do this by placing the add in a timer callback. Worth a shot.
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: Air Player - how to add hardware?
Thanks guys, appreciate the suggestions, but I need the G5 panel to work with hardware on Air Player, and I don't have access to that code (and I assume it's code well written which supports being run on Air Player). So I'm not sure there's a purpose in experimenting with changes to my own code?
To answer the other question, yes, I am moving the Arduino boards to the AP machine, and they show up in device manager on that machine as "USB Serial Device (COM3)" and 4.
To answer the other question, yes, I am moving the Arduino boards to the AP machine, and they show up in device manager on that machine as "USB Serial Device (COM3)" and 4.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Player - how to add hardware?
Hi,uptimist wrote: ↑Thu Oct 22, 2020 11:11 am Thanks guys, appreciate the suggestions, but I need the G5 panel to work with hardware on Air Player, and I don't have access to that code (and I assume it's code well written which supports being run on Air Player). So I'm not sure there's a purpose in experimenting with changes to my own code?
To answer the other question, yes, I am moving the Arduino boards to the AP machine, and they show up in device manager on that machine as "USB Serial Device (COM3)" and 4.
100% behind you.
Trying the test code not your code using ...
Code: Select all
hw_dial_id = hw_dial_add(hw_id_a, hw_id_b, type, callback)
Using hardware ID on the test instrument would indicate if AP has an issue with named hardware which looks likely. Or the issue lies with your hardware setup.
By The Way. you using AM3.7 on both AP and AM. Or you running AP3.7 and AM4 beta?
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: Air Player - how to add hardware?
OK I ran the modified code as suggested, but didn't change anything. Runs ok locally, get an error running on Air Player.
AM version is 3.7.10.
I can't see where the AP version is shown, but it was default version downloaded and installed this week
AM version is 3.7.10.
I can't see where the AP version is shown, but it was default version downloaded and installed this week
Code: Select all
function trimwheel_callback(direction)
if direction == 1 then
fsx_event("ELEV_TRIM_UP")
print("Trim UP")
else
fsx_event("ELEV_TRIM_DN")
print("Trim DN")
end
end
-- hw_dial_add("Trim Wheel", trimwheel_callback)
hw_dial_add("ARDUINO_UNO_A_D5", "ARDUINO_UNO_A_D6", "TYPE_1_DETENT_PER_PULSE", trimwheel_callback)
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Player - how to add hardware?
Hi,
Do you get the error on named hardware if you do not assign the hardware in the console?
If you don't get the error then my guess is your issue is arduino connection to the AP pc
Else I am stumped. and @Ralph or Corjsn needs to intervene.
Keith
Do you get the error on named hardware if you do not assign the hardware in the console?
If you don't get the error then my guess is your issue is arduino connection to the AP pc
Else I am stumped. and @Ralph or Corjsn needs to intervene.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card