Sign in to follow this  
Guest

engine running?

Recommended Posts

Hi,I wonder how I can tell if one engine is running or not. I tried the following but it doesn't work ?BrgdsEugen(A:General eng1 starter, bool) (A:General eng2 starter, bool) ^

Share this post


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

Hey Eugen.I know nothing of XML, but if you look in the TokenVariables document from the SDK, you will see one called RECIP_ENGINE1_COMBUSTION, set as a Bool. If it is TRUE, then the engine is running, since there is combustion happening.

Share this post


Link to post
Share on other sites

Hi,I could'nt find that one in a-vars for xml however, I found something simular however I did'nt manage to get it to work. (A:ENG1 COMBUSTION, bool) (A:ENG2 COMBUSTION, bool) ^ Any other ideas ? BrgdsEugen

Share this post


Link to post
Share on other sites

Hey Eugen.You could always check the fuel flow, to see if any is being used. In C it is RECIP_ENGINE1_FUELFLOW_PPH

Share this post


Link to post
Share on other sites

What's the problem %((A:ENG1 COMBUSTION, bool))%!d! %((A:ENG2 COMBUSTION, bool))%!d! %((A:ENG1 COMBUSTION, bool) (A:ENG2 COMBUSTION,bool) ^ )%!d!works fine.Arne Bartels

Share this post


Link to post
Share on other sites

Here is what I "believe" happened to me using bitwise booleans instead of "normal" booleans (when I was a code infant). Sometimes an A:Variable you *think* only has a on/off function, actually has three outputs. So you use bool instead of enum as "type". I compared a A:Var,bool with my own L:Var,bool using some bit operation and the result was "not logical", nothing ever made sense. When I switched to "normal" booleans (& & instead of & i.e.) it worked. The bitwise bool didn't work because it was bit1 that "activated" the boolean result, but it was bit0 which I needed, which was still "off".In bits and pieces:10 produces a bool check of true (should it?)01 also produces a bool check of true (obviously)1 & 1 does not equal 1 & 2 (01 & 01 differs from 01 & 10).Please correct me if I'm wrong here, this is something I have just brief recollection of an old problem, but might have been caused by other factors.Umm, in any case this was a crappy explanation. Can anyone verify this? But as good practice (I hope), always use regular booleans when dealing with builtin variables that might have more to them than it first looks. Save the bitwise booleans for special occasions :DUmm, a possible example (not tested). Fuel selector,bool would yield 1 (true) whereas Fuel selector,enum would yield 4. Mytest,bool is set to 1 (true) Fuel selector,bool Mytest,bool &&amp does not yield the same output as Fuel selector,bool Mytest,bool & since the bitwise comparison 100 001 & only takes bit 0 into account... Or? Other languages might crash when doing "ugly" type mixing like this.Anyone?

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