@jfjoubert, thanks, it make sense, I'll make some tests.
@Slayer, I'm already reading from mcp_lnav_act, but the result is always 0. Maybe jfjoubert is right, and the dataref returns 1 only in the moment is pressed, I'll make some tests.
Now I'm reading these datarefs, all results in a 0 value:
gVNav_IXEG_AutopilotStateRef = XPLMFindDataRef("ixeg/733/MCP/mcp_vnav_act");
gLNav_IXEG_AutopilotStateRef = XPLMFindDataRef("ixeg/733/MCP/mcp_lnav_act");
gHdg_IXEG_AutopilotStateRef = XPLMFindDataRef("ixeg/733/MCP/mcp_hdg_select_act"); @Nils, many thanks for your support, I'll try to better explain my problem:
Xplane sdk provides a dataref that represents the autopilot state. When no autopilot, HDG, VNAV etc is engaged, dataref return a int value 132. When you engage LNAV, for example, the int value raise:
Depending on what is enabled, if is climbing, on cruise, if LNAV or VNAV is engaged, etc, the dataref return a differente code. These are some I red up today from other models:
529, 560, 561, 616, 672, 16896, 16897
This datarefs permits to figure if LNAV, HDG, o VNAV is engaged. For my plugin is crucial to understand these informations.