# Warning Light for Gear in movement

## Recommended Posts

Hi!I've a problm with a warning light for the gear, which should show up if the gear is in movement(up or down). So, I took the (A:GEAR TOTAL PCT EXTENDED,percent) variable. I've tried different things like if{} and other things.I just will post 2 versions of those I've tried.----------------------------------------------------------------------(A:GEAR TOTAL PCT EXTENDED,percent) 90 < (A:GEAR TOTAL PCT EXTENDED,percent) 10 > &.----------------------------------------------------------------------With if{}, I've done it this way:(A:GEAR TOTAL PCT EXTENDED,percent) 90 < if{ 1 (A:GEAR TOTAL PCT EXTENDED,percent) 10 > } & ----------------------------------------------------------------------I really don't understand why it doesn't work!Regards,Harry :-)

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

The point is to use && instead of & or &. & is bitwise AND, && is logic or boolean AND (that's what you need almost all the time). Arne Bartels

##### Share on other sites

So, the one missing & wasn't the problem, but the problem was the A-variable. The (A:GEAR TOTAL PCT EXTENDED,percent) doesn't work. So I took the (A:Gear Left Psition,percent) as Jan has it in his gauge.And this works!!!Anybody knows why the (A:GEAR TOTAL PCT EXTENDED,percent) doesn't work???Works fine also with just one &(A:GEAR LEFT POSITION,percent) 90 < (A:GEAR LEFT POSITION,percent) 10 > & (L:warntest,bool) | Regards,Harry

##### Share on other sites

My own approach to gear in transit detection is:(A:GEAR HANDLE POSITION,position) (A:GEAR LEFT POSITION,position) !=which in the quoted example would give:This detects any condition when the gear position does not correspond exactly with the gear lever position.Regards,Trevor.

##### Share on other sites

@Trevor: Good idea! I've now changed it as you wrote it above.But instead of left gear I take the 'GEAR CENTER POSITION', as this one takes the most time for moving up/down.Regards,Harry :-)

##### Share on other sites

Hi,My solution which I use.BrgdsEugen(A:Gear left position,percent)

##### Share on other sites

Hi Eugen!So, if the last Case is independant from any value, it's always visible if the other 2 cases aren't true?!But why does FS know that is more important then the without any Value!? Because without Value is should always be true, even if the gear is 100% out!!! Regards,Harri :-)

##### Share on other sites

Hi Harry, without any value should be read as else and must be the last one. If any prior case is executed it will be ignored. Otherwise it will be executed.Regards,Trevor

## Create an account

Register a new account

• Tom Allensworth,
Founder of AVSIM Online

• ### Hot Spots

• Flight Simulation's Premier Resource!

AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!