I have an autopilot button call TURB that when pressed should turn/off an LED.
In the hardware window in AirManager I can use the button to turn it on and off in the sim (X-Plane)
Alson in the hardware window the little lightbulb IS NOT changing. I think here is where I am confused
The "state" prints 0 or 1 in the console window every time its pressed so I'm pretty sure the calls are being made correctly.
Code: Select all
ap_TURB_light = hw_output_add("AP TURB light", false)
xpl_dataref_subscribe("CRJ/autopilot/turb_light","INT", function(state)
print (state)
if state then
hw_output_set(ap_TURB_light, true)
else
hw_output_set(ap_TURB_light, false)
end
end)