Page 4 of 4

Re: Air Player - how to add hardware?

Posted: Sun Oct 25, 2020 12:55 am
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.

Re: Air Player - how to add hardware?

Posted: Tue Oct 27, 2020 10:12 am
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.

Re: Air Player - how to add hardware?

Posted: Tue Oct 27, 2020 11:06 am
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)

Re: Air Player - how to add hardware?

Posted: Tue Oct 27, 2020 1:42 pm
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.

Re: Air Player - how to add hardware?

Posted: Tue Oct 27, 2020 7:59 pm
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.

Re: Air Player - how to add hardware?

Posted: Thu Oct 29, 2020 11:47 am
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.

Re: Air Player - how to add hardware?

Posted: Thu Nov 05, 2020 12:43 pm
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

Re: Air Player - how to add hardware?

Posted: Thu Nov 05, 2020 2:34 pm
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.

Re: Air Player - how to add hardware?

Posted: Thu Nov 05, 2020 4:48 pm
by uptimist
Ok, thanks, I will wait for release of 4.0.