Air Player - how to add hardware?

Support for Air Player desktop.

Moderators: russ, Ralph

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

Re: Air Player - how to add hardware?

#31 Post by Sling »

Just as Keith posted. Every hardware add can be used with the named hardware or hardware Id method. Try directly allocating the pins method and report back on the result. The information to code each different method can be found on the wiki.

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

Re: Air Player - how to add hardware?

#32 Post by uptimist »

OK sorry, yes, I tried that already. Either named or using hardware id's gives same error either way.

So I used this:

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)
And got the same error (ERROR - logic.lua:11: Illegal argument list), using either method. It works fine on the Air Manager PC.

I have also just tried installing Air Player on another laptop, and moving the license over. I get the same problem, so it's not specific to the PC I am running the AP instance on. Both Windows 10 PC's.

The only difference I can see between those PC's and the one running Air Manager, is the device driver for the Arduino Board com ports is 10.0.18362.1 on the Air Manager PC, and 10.0.19041.1 on the Air Player PC's, so slightly newer version. I don't have any control over this though.


To recap:

Arduino Uno plugged into PC running Air Manager, everything works fine.
Move that board to another PC running Air Player, I get the error above. Tried on two different PC's.
Board shows OK in device manager on AP laptop, and also shows up in the Device tab if I run Air Manager (in demo mode).

So I am not sure how to proceed, very strange. I can run my panels OK on Air Display, but not with any hardware connected.

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

Re: Air Player - how to add hardware?

#33 Post by Sling »

Can you try this just for an experiment.

Before you do 1 question. You are plugging in the hardware and allowing some time before you try to start the panel Right?

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
timer_start(5000, 0, function()
-- 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)
end)

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

Re: Air Player - how to add hardware?

#34 Post by uptimist »

Sling wrote: Tue Oct 27, 2020 11:06 am Can you try this just for an experiment.

Before you do 1 question. You are plugging in the hardware and allowing some time before you try to start the panel Right?
Thanks.
Yes I am, but depends how long you mean - maybe just a minute. I’ll try your timer, and waiting for a while before starting up.

User avatar
Ralph
Posts: 7876
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Air Player - how to add hardware?

#35 Post by Ralph »

I'll throw this into the Friday discussion with Corjan again. I think we eventually forgot to take action on this last time.

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

Re: Air Player - how to add hardware?

#36 Post by uptimist »

Ralph wrote: Tue Oct 27, 2020 7:59 pm I'll throw this into the Friday discussion with Corjan again. I think we eventually forgot to take action on this last time.
Thanks Ralph. I tried adding the timer delay but that didn't help.

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

Re: Air Player - how to add hardware?

#37 Post by uptimist »

Hi, I gave up on this for now, I have all hardware connected to Air Manager PC. But it would still be nice to use it via Air Player, so if you have any further suggestions, please let me know.
Thanks

User avatar
Ralph
Posts: 7876
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Air Player - how to add hardware?

#38 Post by Ralph »

Ah sorry, I thought you were updated on this. The problem has been found and fixed in 4.0.
I think it had something to do with having a 32 bit OS.

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

Re: Air Player - how to add hardware?

#39 Post by uptimist »

Ok, thanks, I will wait for release of 4.0.

Post Reply