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)
I tried all the overloaded parameters shown in the documentation, but no success. Any Idea?
Thanks
Robert