March 4, 201115 yr Hi,I have this gauge for an FS2004 2D lever quadrant. It moves a 2D lever between the top and bottom of its travel (i.e. I only want it to be at the top or bottom of the quadrant (0 and 100 of my L: variable) - it's a two position lever). The problem is that the delay line (which works fine in a carb heat lever) will not cause the lever to move slowly between the top and bottom - it jumps back and forth instantly. The visual element code is: <!-- ========================= Left Prop ========================= --> <Element> <Position X="105" Y="261"/> <Image Name="prop.bmp" UseTransparency="Yes"> <Axis X="0" Y="0"/> </Image> <Shift> <Value Minimum="0" Maximum="100">(L:Prop1 Pitch Lever, number)</Value> <Scale Y="-2.3"/> <Delay PixelsPerSecond="1"/> </Shift> </Element> And the mouse code is: <!-- Prop L - 2 position "switch" --> <Area Left="100" Top="12" Width="30" Height="300"> <Tooltip>PROP1 PITCH CONTROL %((L:Prop1 Pitch Lever, number))%!d!%%</Tooltip> <Cursor Type="Hand"/> <Click> (L:Prop1 Pitch Lever, number) 50 < if{ 100.0 (>L:Prop1 Pitch Lever, number) } els{ 0 (>L:Prop1 Pitch Lever, number) } </Click> I have tried putting numbers in the Delay line from 1 to 1000 and it makes no difference.Any ideas?Thanks, Tom Gibson CalClassic Propliner Page
March 5, 201115 yr Author Thanks.Didn't seem to help, unfortunately... Tom Gibson CalClassic Propliner Page
March 5, 201115 yr Hi,I have this gauge for an FS2004 2D lever quadrant. It moves a 2D lever between the top and bottom of its travel (i.e. I only want it to be at the top or bottom of the quadrant (0 and 100 of my L: variable) - it's a two position lever). The problem is that the delay line (which works fine in a carb heat lever) will not cause the lever to move slowly between the top and bottom - it jumps back and forth instantly. The visual element code is: <!-- ========================= Left Prop ========================= --> <Element> <Position X="105" Y="261"/> <Image Name="prop.bmp" UseTransparency="Yes"> <Axis X="0" Y="0"/> </Image> <Shift> <Value Minimum="0" Maximum="100">(L:Prop1 Pitch Lever, number)</Value> <Scale Y="-2.3"/> <Delay PixelsPerSecond="1"/> </Shift> </Element> And the mouse code is: <!-- Prop L - 2 position "switch" --> <Area Left="100" Top="12" Width="30" Height="300"> <Tooltip>PROP1 PITCH CONTROL %((L:Prop1 Pitch Lever, number))%!d!%%</Tooltip> <Cursor Type="Hand"/> <Click> (L:Prop1 Pitch Lever, number) 50 < if{ 100.0 (>L:Prop1 Pitch Lever, number) } els{ 0 (>L:Prop1 Pitch Lever, number) } </Click> I have tried putting numbers in the Delay line from 1 to 1000 and it makes no difference.Any ideas?Thanks, Hi Tom,Although I never used this sort of code, the indentation in your code snippet suggest that the delay should be within the Scale tag.So: <Scale Y="-2.3"> <Delay PixelsPerSecond="1"/> </Scale> Don't have a clue if that helps :( If you can't get it working within the animation, you can always bypass that by having an extra LVar:So an boolean Lvar that indicates the position (on or off), and your current L:var displaying the lever. The latter changing value slowly.Something like: (L:Var1,bool)if{ (L:Var2,number) 5 + 100 min (>L:Var2,number)}els{ (L:Var2,number) 5 - 0 max (>L:Var2,number)} So if you change L:Var1 from False to True, L:Var2 will change from 0 to 100 in 20 steps, in 0.9 sec (with max. update freq 18 * per sec). Vice versa.I used such code in a few variants to prevent axis levers (or axis commanded by keys), to jump from one to another extreme value.Calling it "lever-smoothing" :( Just a workaround of course, the other way would be better. Cheers, Rob Barendregt
March 6, 201115 yr Author Hi,Thanks for the workaround.I found that you cannot delay a shift that is longer than 199 pixels in travel. Turns out 199 pixels delays just fine - 200 pixels jumps back and forth. If there is an intermediate stop (like there would be if you were using a hardware lever, 3 position move, etc.) each step just has to be less than 200 pixels.Thanks again, Tom Gibson CalClassic Propliner Page
March 6, 201115 yr Hi,May be off topic, but is there a way to delay a function like:(A:ELEVATOR TRIM POSITION,degrees) 0 > if{ (>K:ELEV_TRIM_DN) } Using this code the trimming is way too fast.Jan Jan "Beatus ille qui procul negotiis..."
March 6, 201115 yr Commercial Member Hi,May be off topic, but is there a way to delay a function like:(A:ELEVATOR TRIM POSITION,degrees) 0 > if{ (>K:ELEV_TRIM_DN) } Using this code the trimming is way too fast.JanJan, couldn't you just use ELEVATOR_TRIM_SET and have it set to a custom L:Var for which you can control the rate based on whatever condition you'd like? Good Day, Engjell Berisha
Create an account or sign in to comment