I followed the video by Tony under Hardware but it doesn't seem to work as I think I am missing some script or logic statement.
Code: Select all
function apcmd_a_callback(state)
print("autopilot cmd status: " .. state) apcmd_a = state
end
xpl_dataref_subscribe("laminar/B738/autopilot/cmd_a_status", "FLOAT", apcmd_a_callback)
function button_pressed()
print("button pressed")
end
xpl_command("laminar/B738/autopilot/cmd_a_press")
hw_button_add("ARDUINO_MEGA2560_A_D4", button_pressed)
How do you get the hardware button to connect with the XP button. I thought the last statement would have done that. Thanks.