Hi folks,
The following code contains a bug, but I cannot see what it might be!
The main part of the gauge is working perfectly but the mouse section is not. When I have it 'as written' below then the left click is working but the right click is not. If I swap the order, then the right click works but the left does not. I have verified elsewhere that the code inside each section is working and also I have three other gauges with exactly the same template but there both clicks are working! Please help, have I done something silly here?
Cheers,
Geoff
The following code contains a bug, but I cannot see what it might be!
The main part of the gauge is working perfectly but the mouse section is not. When I have it 'as written' below then the left click is working but the right click is not. If I swap the order, then the right click works but the left does not. I have verified elsewhere that the code inside each section is working and also I have three other gauges with exactly the same template but there both clicks are working! Please help, have I done something silly here?
Code:
<Mouse>
<Help ID="HELPID_AUTOPILOT_AUTOTHROTTLE"/>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_AUTOTHROTTLE"/>
<Area>
<Cursor Type="Hand"/>
<Click Repeat="No" Kind="LeftSingle+RightSingle">
(M:Event) 'LeftSingle' scmi 0 == if{
[COLOR="DarkSlateGray"](L:isg_vnav, enum) 1 == if{ 1 (>L:isg_vnav_clicked, number) (A:Autopilot altitude lock, bool) 1 == (L:gctoga, enum) 0 == && (L:CLMB,enum) 0 == & (A:Autopilot approach hold, bool) ! & (A:Indicated Altitude, feet) (A:Autopilot altitude lock var, feet) - abs 750 > & (L:Autoflare,bool) ! & (A:Sim on ground, bool) ! & (A:AIRSPEED TRUE,knots) 10 > & (A:RADIO HEIGHT,feet) 1000 > & (A:AUTOPILOT THROTTLE ARM,bool) & if{ 1 (>L:levelchangeactive,bool) (A:PLANE ALTITUDE,feet) (A:AUTOPILOT ALTITUDE LOCK VAR,feet) > if{ -3.5 s13 } els{ (A:PLANE ALTITUDE,feet) (A:AUTOPILOT ALTITUDE LOCK VAR,feet) - abs 2200 > if{ 4.5 s13 } els{ 3.5 s13 } } l13 0 != if{ (L:FPAhold, enum) 0 == if{ 180 pi / s0 l13 l0 / tg s4 l4 (A:AIRSPEED TRUE,knots) * 101.26859 * s5 l5 100 / near 100 * (>K:AP_VS_VAR_SET_ENGLISH) } els{ l13 (>L:FPASet,enum) } } } } els{ (L:FMSspeedoff,bool) if{ 0 (>L:FMSspeedoff,bool) (L:appspeedX,bool) if{ 1 (>L:appspeed,bool) 0 (>L:appspeedX,bool) } } els{ (L:appspeed,bool) if{ 1 (>L:FMSspeedoff,bool) 0 (>L:appspeed,bool) 1 (>L:appspeedX,bool) (L:goaroundspeed,enum) (A:Autopilot airspeed hold var, knots) 5 + > (L:goaroundspeed,enum) 0 != && if{ (L:goaroundspeed,enum) (>K:AP_SPD_VAR_SET,knots) 0 (>L:goaroundspeed,enum) } } els{ (L:isg_lnav, enum) 1 == (L:gctoga, enum) 0 == && if{ (L:FMSsetspeed,bool) if{ 0 (>L:FMSsetspeedX,bool) 0 (>L:FMSsetspeed,bool) } els{ 1 (>L:isg_vnav_clicked, number) } } els{ (L:FMSsetspeed,bool) if{ 0 (>L:FMSsetspeedX,bool) 0 (>L:FMSsetspeed,bool) } els{ 1 (>L:FMSsetspeed,bool) } } } }[/COLOR]
1 (>L:BUTTON_NORM,number) 2 (>L:atswitchtime,enum)
}
(M:Event) 'RightSingle' scmi 0 == if{
1 (>L:BUTTON_NORM,number) 2 (>L:atswitchtime,enum)
[COLOR="DarkSlateGray"](A:RADIO HEIGHT,feet) 50 > (A:GROUND VELOCITY, knots) 50 < (L:gctoga, enum) 1 == || || if{ (L:attmemory,bool) if{ 0 (>L:attmemory,bool) } 0 (>K:AUTO_THROTTLE_ARM) } els{ (A:Autopilot throttle arm,bool) if{ 0 (>K:AUTO_THROTTLE_ARM) } els{ (L:attmemory,bool) if{ 0 (>L:attmemory,bool) } els{ 0 (>K:AUTO_THROTTLE_ARM) } } [/COLOR]
}
</Click>
</Area>
</Mouse>
Cheers,
Geoff




