ESP32 Dev C - Can not connect Rotary

Peer support for Air Manager desktop users

Moderators: russ, Ralph

Post Reply
Message
Author
termigrator
Posts: 9
Joined: Thu Dec 03, 2020 5:48 pm

ESP32 Dev C - Can not connect Rotary

#1 Post by termigrator »

Hi,

just tried to get an ESP32 to work. I flashed the Air Player mini 3.7.1 Firmware with success. Adding a switch was not a problem. But now i cant get an Rotary-Decoder running. The console shows an error: logic.lua: Illegal argument list (line21) with following test-Code:

Code: Select all

-- Callback function which is called when the rotary encoder is turned
-- direction 1 : The dial turned clockwise
-- direciton -1: The dial turned counterclockwise
 local ALT_inc = 0.0 
 local Altitude_ffdref      = "a320/Panel/FCU_Altitude"
  function read_altitude_cb(altitudeinc)
    print(altidudeinc)
    ALT_inc = altitudeinc 
  end
  variable_subscribe("XPLANE", Altitude_ffdref, "FLOAT", read_altitude_cb)    
  function turn_Altitude_cb (direction3)
    if direction3 > 0 then
      ALT_inc =  ALT_inc + 1
    else
      ALT_inc =  ALT_inc - 1
    end
    xpl_dataref_write(Altitude_ffdref, "FLOAT",  ALT_inc)
  end

id=hw_dial_add("ESP32_GPIO32", "ESP32_GPIO32", turn_Altitude_cb)
With an adruino leonardo the test is running without error (with other Hardware-names in the last codeline)

I tried all the overloaded parameters shown in the documentation, but no success. Any Idea?

Thanks

Robert

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

Re: ESP32 Dev C - Can not connect Rotary

#2 Post by Ralph »

Sounds like the same problem as with Air Player for desktop. The update will probably come with Air Manager 4.0.

termigrator
Posts: 9
Joined: Thu Dec 03, 2020 5:48 pm

Re: ESP32 Dev C - Can not connect Rotary

#3 Post by termigrator »

Hopefully it will be coorrected. The ESP32 board is an interesting thing, because it will run without cable to the pc, requires only AC-current. Shall i post an request in the "Bug-Report" forum-section?

With greetings from cold Germany

Robert

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

Re: ESP32 Dev C - Can not connect Rotary

#4 Post by Ralph »

I'll add it to Trello on the 4.0 to do list, then we'll check it. I will have to test it for the release anyway :)
Ultimately there would be a Message port library for the ESP32, just as for the Arduino. Then you can utilize all of its functionalities. It's on the nice-to-have list, but we haven't really looked at if this would really be possible.

medfox
Posts: 4
Joined: Sun Dec 27, 2020 4:06 pm

Re: ESP32 Dev C - Can not connect Rotary

#5 Post by medfox »

+1 from my side - I have the same problem here. Rotary encoders with hw_dial_add do not work on player for desktop unfortunately.

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

Re: ESP32 Dev C - Can not connect Rotary

#6 Post by Ralph »

Already working in the desktop version (no beta yet), but I'm not sure if it already works with the ESP32, you can give it a try with the 4.0 beta.

medfox
Posts: 4
Joined: Sun Dec 27, 2020 4:06 pm

Re: ESP32 Dev C - Can not connect Rotary

#7 Post by medfox »

Thanks! I have the problem with arduino mega only when running from desktop player. Will try it with Raspberry player, hope it is working with it.

If not, is there an inofficial player beta for desktop I could get?

Thanks
Bernhard

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

Re: ESP32 Dev C - Can not connect Rotary

#8 Post by Ralph »

No sorry, no beta's for now. Somewhere in January I guess.

medfox
Posts: 4
Joined: Sun Dec 27, 2020 4:06 pm

Re: ESP32 Dev C - Can not connect Rotary

#9 Post by medfox »

Thanks!

Post Reply