Sign in to follow this  
Guest gert1966

Whats wrong ?

Recommended Posts

I'm trying to catch the TO/GA event to replace it with my own... Is there something I don't see? (L:TO_GA_TRIGGERS, number) 1 == if{ 0 (>L:TO_GA_TRIGGERS, number) } (L:TO_GA_TRIGGERS, number) 0 == if{ 1 (>L:TO_GA_TRIGGERS, number) } (A:AUTOPILOT TAKEOFF POWER ACTIVE, bool) 1 == if{ (>K:AUTO_THROTTLE_TO_GA) } Th point is that on initial TO/GA activation the Lvar gets set to 1 but on reactivation it's not set to 0 ..... as it should... Can someone shed some light on this ?( I tried the if{ } els{} but didn't work also ) regards, Gert

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,Not sure what you 're trying to achieve, but did you try:(A:AUTOPILOT TAKEOFF POWER ACTIVE,bool) ! if{ (>K:AUTO_THROTTLE_TO_GA) 1 (>L:TO_GA_TRIGGERS,number) } els{ (>K:AUTO_THROTTLE_TO_GA) 0 (>L:TO_GA_TRIGGERS,number) } Can be put in a section too:(A:AUTOPILOT TAKEOFF POWER ACTIVE,bool) ! if{ (>K:AUTO_THROTTLE_TO_GA) 1 (>L:TO_GA_TRIGGERS,number) } els{ (>K:AUTO_THROTTLE_TO_GA) 0 (>L:TO_GA_TRIGGERS,number) } Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi Jan, Om het ff in het nederlands te doen, ik wil de default TO/GA trigger omzeilen. Deze mag niet meer de default TO/GA functie aanzetten daar ik een eigen autothrottle systeem aan het bouwen ben en zelf wel met hardware werk maar andere gebruikers misschien niet..... Wat ik probeer te doen is de actie weer ongedaan te maken en mijn eigen TO/GA trigger variabele in plaats daarvan te zetten. Het punt is ... aan gaat wel maar uit gaat dus niet..and for the Englisch speaking, I want to override the default TO/GA trigger. This may not be used, because im developing my own autothrottle system. I myself use hard ware to trigger this event, but others may not. What i try to do is to cancel the event and to set my own var instead. The point is that i can set the var to 1 but not to 0...regards Gert

Share this post


Link to post
Share on other sites

Well,That is correct.Everytime you call TOGA, (L:TO_GA_TRIGGERS, number) will be first 0 and immediatly thereafter 1.And that is because of the code.Probably when you reverse the code it will always be 0.Try: (L:TO_GA_TRIGGERS, number) 0 == if{ 1 (>L:TO_GA_TRIGGERS, number) } (L:TO_GA_TRIGGERS, number) 1 == if{ 0 (>L:TO_GA_TRIGGERS, number) } (A:AUTOPILOT TAKEOFF POWER ACTIVE, bool) 1 == if{ (>K:AUTO_THROTTLE_TO_GA) } Tell if i am wrong.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi,I think Jan's initial code, with a little amendment, is maybe the only one that will work, at least for this tiny piece of code:(A:AUTOPILOT TAKEOFF POWER ACTIVE,bool) ! if{ (>K:AUTO_THROTTLE_TO_GA) } els{ (L:TO_GA_TRIGGERS,number) ! (>L:TO_GA_TRIGGERS,number) } When TOGA is first pressed, AVar value is 0 because it hasn't been updated yet, remember events are processed before the standard code.But as you don't want TOGA to execute, just fire TOGA again by code to cancel, which is going to send a new TOGA event. Immediately after the code-executed TOGA, the event is processed again and this time your LVar is updated with 1 or 0, depending whether you launched or canceled the command via your hardware switch.Hope this makes sense!Tom

Share this post


Link to post
Share on other sites

Yeah, I get the point, i've been coding all day and sometimes you don't see it anymore. A fresh look by an outsider will mostly solve the problem. ;-) I has to be an if{} els{} clause to make this code work properly...Thanks guys, Regards, Gert

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this