Page 1 of 1
How / where to connect "Named Hardware"
Posted: Sun Mar 07, 2021 11:56 am
by termigrator
Hi,
i flashed a ESP32 Device and thereafter i see the Airplayer-Hardware in the Home-Tab. But I can't find a dialog-box where to configure the "Named Hardware". Pushing the instrument to the Air Player does not trigger a dialog too.
My Codesample:
Code: Select all
local parkbrake_dref = "1-sim/parckBrake"
function brake_hw_callback(position)
print(position)
if position == 1 then
xpl_dataref_write(parkbrake_dref, "INT", 1)
else
xpl_dataref_write(parkbrake_dref, "INT", 0)
end
end
hw_switch_id = hw_switch_add("PARKINGBRAKE", 1, brake_hw_callback)
The Airplayer shurely is not able to guess, to which gpio-pi i connected the parkingbrake swith. But: how do i configure the gpio-pin?
Best regards
Robert Krüger
Re: How / where to connect "Named Hardware"
Posted: Sun Mar 07, 2021 12:15 pm
by jph
termigrator wrote: ↑Sun Mar 07, 2021 11:56 am
Hi,
i flashed a ESP32 Device and thereafter i see the Airplayer-Hardware in the Home-Tab. But I can't find a dialog-box where to configure the "Named Hardware". Pushing the instrument to the Air Player does not trigger a dialog too.
My Codesample:
Code: Select all
local parkbrake_dref = "1-sim/parckBrake"
function brake_hw_callback(position)
print(position)
if position == 1 then
xpl_dataref_write(parkbrake_dref, "INT", 1)
else
xpl_dataref_write(parkbrake_dref, "INT", 0)
end
end
hw_switch_id = hw_switch_add("PARKINGBRAKE", 1, brake_hw_callback)
The Airplayer shurely is not able to guess, to which gpio-pi i connected the parkingbrake swith. But: how do i configure the gpio-pin?
Best regards
Robert Krüger
Hi Robert,
I am unsure exactly what you mean, but, please check the spelling of the code in the line -
Code: Select all
local parkbrake_dref = "1-sim/parckBrake"
The second parkbrake appears to have an additional 'c' as you have written 'parCkbrake' as opposed to parkbrake ?
Joe
Re: How / where to connect "Named Hardware"
Posted: Sun Mar 07, 2021 4:50 pm
by termigrator
Hi Joe,
this typo is on the sim-side (Flightfactor Airbus a350), not on my code-side. This dataref is working with an Arduino-Nano without problems.
In Addition: it was a little tricky and cost me half an hour to find this dataref in the sim, because of that typo!
Best Regards
Robert Krüger
Re: How / where to connect "Named Hardware"
Posted: Sun Mar 07, 2021 5:22 pm
by termigrator
Hi everyone,
I have now found the solution myself: there is no solution.
I found a note in the wiki-documentation that only the hardware interface (which is no longer recommended) can be used with the ESP32 chip.
This is a little pity, because there is a lot of potential in an ESP32-based solution.
Best regards
Robert Krüger
Re: How / where to connect "Named Hardware"
Posted: Mon Mar 08, 2021 2:39 am
by Sling
It’s simple just don’t use named hardware. If it’s just for yourself then fixing the hardware id’s in code is better anyway IMHO.