As part of my autopilot control coding, the two code blocks below are used to turn the autopilot BC hold function on and off. To prevent flooding, the next to last line in the first block checks the value of (A:AUTOPILOT BACKCOURSE HOLD, bool) before turning on the BC hold function. But doing this check causes some type of conflict such that the value of (A:AUTOPILOT BACKCOURSE HOLD, bool) rapidly and continually flips back and forth between 0 and 1. It does this even if I completely remove the second code block below which turns the BC hold function off. If I remove the (A:AUTOPILOT BACKCOURSE HOLD, bool) check in the first block, everything works as intended. Nowhere else in the overall autopilot control code is BC hold turned on or off using the associated K events. I can't figure out why checking the value of (A:AUTOPILOT BACKCOURSE HOLD, bool) before turning on BC hold causes this problem. Would appreciate hearing any ideas.
Thx,
Al
Thx,
Al
XML:
(L:BC_MODE, bool) 1 ==
(L:NAV_MODE, bool) 1 == and
(A:GPS DRIVES NAV1, bool) 0 == and
(L:NAV_CAP_BC,bool) 1 == and
(A:AUTOPILOT BACKCOURSE HOLD, bool) 0 == and
if{ (>K:AP_BC_HOLD_ON) }
(L:BC_MODE, bool) 0 ==
(L:NAV_MODE, bool) 0 == or
(A:GPS DRIVES NAV1, bool) 1 == or
(L:NAV_CAP_BC,bool) 0 == or
(A:AUTOPILOT BACKCOURSE HOLD, bool) 1 == and
if{ (>K:AP_BC_HOLD_OFF) }
Last edited: