Air Player - how to add hardware?

Support for Air Player desktop.

Moderators: russ, Ralph

Message
Author
uptimist
Posts: 62
Joined: Mon Oct 19, 2020 3:57 pm

Re: Air Player - how to add hardware?

#11 Post by uptimist »

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...

uptimist
Posts: 62
Joined: Mon Oct 19, 2020 3:57 pm

Re: Air Player - how to add hardware?

#12 Post by uptimist »

I ran your simplified code, same error.
logic.lua:10: Illegal argument list

uptimist
Posts: 62
Joined: Mon Oct 19, 2020 3:57 pm

Re: Air Player - how to add hardware?

#13 Post by uptimist »

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.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Air Player - how to add hardware?

#14 Post by Keith Baxter »

uptimist wrote: Thu Oct 22, 2020 10:35 am I ran your simplified code, same error.
logic.lua:10: Illegal argument list
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 

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Air Player - how to add hardware?

#15 Post by Keith Baxter »

Hi,

Did you try this.

Code: Select all

hw_dial_id = hw_dial_add(hw_id_a, hw_id_b, type, callback)
Keith
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 

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Air Player - how to add hardware?

#16 Post by Sling »

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.

uptimist
Posts: 62
Joined: Mon Oct 19, 2020 3:57 pm

Re: Air Player - how to add hardware?

#17 Post by uptimist »

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.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Air Player - how to add hardware?

#18 Post by Keith Baxter »

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.
Hi,

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)
We are trying to isolate the issue so that Corjan can fix if it is an AP issue. There should be no need to alter code to adapt.

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 

uptimist
Posts: 62
Joined: Mon Oct 19, 2020 3:57 pm

Re: Air Player - how to add hardware?

#19 Post by uptimist »

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

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)

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Air Player - how to add hardware?

#20 Post by Keith Baxter »

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
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 

Post Reply