Air Player - how to add hardware?

Support for Air Player desktop.

Moderators: Ralph, russ

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

Re: Air Player - how to add hardware?

#31 Post by Sling » Sun Oct 25, 2020 12:55 am

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: 44
Joined: Mon Oct 19, 2020 3:57 pm

Re: Air Player - how to add hardware?

#32 Post by uptimist » Tue Oct 27, 2020 10:12 am

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: 4422
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Air Player - how to add hardware?

#33 Post by Sling » 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?

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: 44
Joined: Mon Oct 19, 2020 3:57 pm

Re: Air Player - how to add hardware?

#34 Post by uptimist » Tue Oct 27, 2020 1:42 pm

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: 5068
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Air Player - how to add hardware?

#35 Post by Ralph » 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.

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

Re: Air Player - how to add hardware?

#36 Post by uptimist » Thu Oct 29, 2020 11:47 am

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: 44
Joined: Mon Oct 19, 2020 3:57 pm

Re: Air Player - how to add hardware?

#37 Post by uptimist » Thu Nov 05, 2020 12:43 pm

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: 5068
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Air Player - how to add hardware?

#38 Post by Ralph » Thu Nov 05, 2020 2:34 pm

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: 44
Joined: Mon Oct 19, 2020 3:57 pm

Re: Air Player - how to add hardware?

#39 Post by uptimist » Thu Nov 05, 2020 4:48 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests