Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

2D Panel Lever Delay?

Featured Replies

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,

I think you need to change Delay to Pixels_Per_Second. Note the underlines...Don

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

  • 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,

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..."

  • 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.Jan
Jan, 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

 

Angel-Simulations-Small.png

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.