ADW
01-10-2010, 03:39 PM
I have PM Glass Cockpit with CPFlight MCP. The autpilot works fine using the MCP switch. However, I have tried to set up the Yoke switch to disconnect the AP using SIOC without much success. I have tried writing to the FSUIPC offset ($07BC) and to the PM offset ($050A). Code used below. Any hints as to improving the code or addressing other offsets would be appreciated.
Var 0813, name APCutOut, Link IOCARD_SW, Input 25 // AUTOPILOT CUTOUT
{
IF &APAvailable = 1
{
&PMcmdMCP = CHANGEBIT 1 &PMDisconxAP
}
}
Var 2005, name APAvailable, Link FSUIPC_IN, Offset $0764, length 4
Var 2006, name PMcmdMCP, Link FSUIPC_OUT, Offset $050A, Length 2
Var 2007, name PMDisconxAP, value 1
Var 0813, name APCutOut, Link IOCARD_SW, Input 25 // AUTOPILOT CUTOUT
{
IF &APAvailable = 1
{
&PMcmdMCP = CHANGEBIT 1 &PMDisconxAP
}
}
Var 2005, name APAvailable, Link FSUIPC_IN, Offset $0764, length 4
Var 2006, name PMcmdMCP, Link FSUIPC_OUT, Offset $050A, Length 2
Var 2007, name PMDisconxAP, value 1