Hello. I wrote down the above code to see if it worked (code below) but it did not seem to respond to hold bank. What am I missing? The animations work okay but no ability to actually hold the bank at a fixed angle with a heading change. Thanks.
<Gauge Name="BALimiter" Version="1.0">
<Image Name="BALimitGrey.bmp" Luminous="Yes" ImageSizes="114,52"/>
<Macro Name="DegreesToAdd">(* AUTO Bank by default *)
(L:AP Bank Limit Position,enum) 0 ==
if{ (A:Airspeed True, knots) s0 200 <= 30 *
l0 200 > l0 250 <= * l0 200 - 50 / 10 * 15 + near * +
l0 250 > 15 * +
}
els{ 30 25 15 10 5 0 6 (L:AP Bank Limit Position,enum) case }
</Macro>
<Element Name="Heading Sel Status">
<Select>
<Value>
(L:AP Heading Sel, bool)
if{ (A:Autopilot heading lock dir, degrees) (A

lane Heading Degrees Gyro, degrees) near - dnor s1 180 <=
if{ l1 } els{ l1 360 - } (>L:AP Heading Diff, degrees)
(L:AP Heading Diff, degrees) 0 >
if{ (L:AP Heading, degrees) (A

lane Heading Degrees Gyro, degrees) near @DegreesToAdd + dnor s0 - dnor 180 <=
if{ l1 } els{ l1 360 - } 0 >
if{ l0 (>K:HEADING_BUG_SET) }
els{ (L:AP Heading, degrees) (>K:HEADING_BUG_SET) }
}
(L:AP Heading Diff, degrees) 0 <
if{ (L:AP Heading, degrees) (A

lane Heading Degrees Gyro, degrees) near @DegreesToAdd - dnor s0 - dnor180 <=
if{ l1 } els{ l1 360 - } 0 <
if{ l0 (>K:HEADING_BUG_SET) }
els{ (L:AP Heading, degrees) (>K:HEADING_BUG_SET) }
}
}
</Value>
</Select>
</Element>
<Element>
<Position X="55" Y="29"/>
<Image Name="BASel-0.bmp">
<Axis X="26" Y="26"/>
</Image>
<Rotate>
<Value>(L:AP Bank Limit Position,enum)</Value>
<Nonlinearity>
<Item Value="0" Degrees="0"/>
<Item Value="1" Degrees="30"/>
<Item Value="2" Degrees="60"/>
<Item Value="3" Degrees="90"/>
<Item Value="4" Degrees="120"/>
<Item Value="5" Degrees="150"/>
</Nonlinearity>
</Rotate>
</Element>
<Mouse>
<Area Left="0" Top="0" Width="30" Height="52">
<Tooltip>Dec Max Items</Tooltip>
<Cursor Type="DownArrow"/>
<Click Repeat="Yes">
(L:AP Bank Limit Position,enum) 1 < if{ 0 (>L:AP Bank Limit Position,enum) } els{ (L:AP Bank Limit Position,enum) 1 - (>L:AP Bank Limit Position,enum) }</Click>
</Area>
<Area Left="85" Top="0" Width="30" Height="52">
<Tooltip>Inc Max Items</Tooltip>
<Cursor Type="UpArrow"/>
<Click Repeat="Yes">
(L:AP Bank Limit Position,enum) 5 > if{ 6 (>L:AP Bank Limit Position,enum) } els{ (L:AP Bank Limit Position,enum) 1 + (>L:AP Bank Limit Position,enum) }</Click>
</Area>
</Mouse>
</Gauge>