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.

Pilot controlled lighting - lights remains on...

Featured Replies

Hello,I've been trying to make working PCL. I've been following advices in this topic -> http://forums.avsim.net/dcboard.php?az=sho...ing_type=search I've problem with setting correct conditionals so lights will remain off ( all day & night ) until 296 is set on ADF. Curretly lights are always "on" and settting 296 makes them brigther ( see attach ). Pls help :-zhelp :-zhelp regardsEricsonHere's code of my api file :; --- Created by FsRegen v0.31bmif (0)Area( 5 %1 %2 1 )RotatedCall( :symbol 0 0 %5 )Jump( :endsymbl ):symbolRefPoint( 7 : 0.5 %1 %2 )Points( 0-12 0 -11-12 0 1011 0 1011 0 -110 0 0)Poly( a 0 1 2 3 )Poly( a 0 4 3 )Return:endsymblEndAmifendArea( 5 %1 %2 22 )perspectivecall( :OBJ )shadowcall( :OBJ )jump( : ):OBJmif( %11 )refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 %13 %14 )melserefpoint( 7 :END %4 %1 %2 v1= %10 %13 %14 )mifendrotatedcall( :ROT 0 0 %5 )return:ROTIfVarRange( :lowdetail 33B 0 250 )callLibobj( 0 95EFE115 41E4370D EC5FD7A7 FE5936E7 )Jump( :further ):lowdetailcallLibobj( 0 4556113F 466621EF 6FDE6F88 CCDE2C8D ):further Call( :Lamps ) IfVarRange( :SkipPart3 7BC 0x296 0x296 ) ;condition Call32( :Lamps ) ;if ADF freq. is 296kHz, call part 3 :SkipPart3 ;otherwise VectorJump( :West 32767 0 0 0 ) VectorJump( :SouthEast 0 0 32767 0 ):NorthEast Return:SouthEast Return:West VectorJump( :SouthWest 0 0 32767 0 ):NorthWest Return:SouthWest Return:Lamps;Lamp: Object 1RGBLcolor( BF 247 233 145 ) Dot( 0 52 0 ):EndofLamp0 Return:ENDreturnEndA

  • Commercial Member

Hi,You do call the :Lamps label twice. Both before and after the check of the ADF frequency you can the dot. So when you call it twice it would indeed be brighter. I would suggest code like this (I don't think the VectorJump commands have any purpose here, so I removed these as well):[tt]Area( 5 %1 %2 22 )perspectivecall( :OBJ )shadowcall( :OBJ )jump( : ):OBJmif( %11 )refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 %13 %14 )melserefpoint( 7 :END %4 %1 %2 v1= %10 %13 %14 )mifendrotatedcall( :ROT 0 0 %5 )return:ROTIfVarRange( :lowdetail 33B 0 250 )callLibobj( 0 95EFE115 41E4370D EC5FD7A7 FE5936E7 )Jump( :further ):lowdetailcallLibobj( 0 4556113F 466621EF 6FDE6F88 CCDE2C8D ):furtherIfVarRange( :SkipPart3 7BC 0x296 0x296 ) ;conditionCall32( :Lamps ) ;if ADF freq. is 296kHz, call part 3:SkipPart3 ;otherwiseReturn:Lamps;Lamp: Object 1RGBLcolor( BF 247 233 145 )Dot( 0 52 0 ):EndofLamp0Return:ENDreturnEndA[/tt]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

  • Author

Hi,your code works great ! :D Thanks ! :-wave regardsEricson

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.