May 3, 200323 yr Hi,I am working with my autopilot and logic behind it is quite complex :-)The autopilot has two ap buttons ap1 and ap2.The are a number of rules directing if posible to click and the actions taken.If you are on ground only one autopilot can be engaged if one engine is running and only one engine. However you can also toggle between ap1 and ap2.If you are airborn you can toggle between ap1 and ap2. The only case when both ap1 and ap2 can be engaged at the same time is when approach is active.The code below is quite complex and I was thinking of adding as well three hold events. The code only deals with the ap1 and ap2 lights Could this be done in a simpler way?The code for ap1 is not working for engaging when ap1 or ap2 are not active and trying to engage ap1.Any suggestions ?BrgdsEugen(A:SIM ON GROUND,bool) if{ (L:ENG Mode, bool) if{ (L:AP1, bool) if{ 0 (>L:AP1, bool) } els{ (L:AP2, bool) if{ 0 (>L:AP2, bool) 1 (>L:AP1, bool) } els{ 1 (>L:AP1, bool } } els{ } } els{ (L:AP1, bool) if{ 0 (>L:AP1, bool) } els{ (L:AP2, bool) if{(A:Autopilot approach hold, bool) if{ 1 (>L:AP1, bool) } els{ 0 (>L:AP2, bool) 1 (>L:AP1, bool) } } els{ 1 (>L:AP1, bool) } } }
Create an account or sign in to comment