Notifications
Clear all

10/18/2023 Map Stopped Working?
Visit this post for the fix

Blink rate for high winds

6 Posts
2 Users
0 Reactions
694 Views
(@captain_ron)
Estimable Member
Joined: 5 years ago
Posts: 162
Topic starter  

I would like a user adjustable setting for the blink rate of the LED's when the winds are above the set limit. As it it every 2 seconds it blinks to off and back on. With the blinking for showing rain I find it a little confusing to spot each one.

Or maybe it's a text change in a file is fine too.


   
Quote
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 557
 

Ron, 

Be sure that the logging setting is set to 'Info' and not 'Debug'. This will noticeably slow down the blink rate in 'Debug' mode.

If you would like to change the rates, you'll have to open metar-v4.py and scroll down looking for these settings around line 240;

#LED Cycle times - Can change if necessary.
cycle0_wait = .9 #These cycle times all added together will equal the total amount of time the LED takes to finish displaying one cycle.
cycle1_wait = .9 #Each cycle, depending on flight category, winds and weather reported will have various colors assigned.
cycle2_wait = .08 #For instance, VFR with 20 kts winds will have the first 3 cycles assigned Green and the last 3 Black for blink effect.
cycle3_wait = .1 #The cycle times then reflect how long each color cycle will stay on, producing blinking or flashing effects.
cycle4_wait = .08 #Lightning effect uses the short intervals at cycle 2 and cycle 4 to create the quick flash. So be careful if you change $
cycle5_wait = .5

Feel free to change these settings as you wish. - Mark

 

 


   
ReplyQuote
(@captain_ron)
Estimable Member
Joined: 5 years ago
Posts: 162
Topic starter  

I gather I need to plug into a monitor again as the metar-v4.py file isn't seen in the file directory if plugged into a computer. Whats the command to edit the file?


   
ReplyQuote
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 557
 

Yes, this is changing the code directly. 

at the command line prompt type;

cd /NeoSectional

sudo nano -c metar-v4.py

Then scroll down to the settings listed, change the values then hit ctrl-s to save then ctrl-x to exit. Then run the map and see if its the way you like.

- Mark


   
ReplyQuote
(@captain_ron)
Estimable Member
Joined: 5 years ago
Posts: 162
Topic starter  

It looks like the blink times are the same no matter what the category of the light, ie high winds, rain or lightning? Correct?


   
ReplyQuote
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 557
 

The code grabs all the weather for all the airports in the 'airports' file all at once. It then decodes the flight category for each of those airports and assigns the proper color(s) to the proper LED pin associated with the proper airport.

The code then cycles through the string of LED's 6 times. Each cycle has a different period of time assigned to them. This allows for the colors to be changed during each individual cycle. This creates the high winds blinking effect along with the lightning effect. 

So for example; the high wind blinking at a VFR airport looks like this;

cycle0_wait = .9 - Assign Green and show for .9 seconds
cycle1_wait = .9  - Assign Green and show for .9 seconds
cycle2_wait = .08 - Assign Green and show for .08 seconds (So LED is Green for a total of almost 2 seconds)
cycle3_wait = .1  - Assign Black and show for .1 seconds
cycle4_wait = .08 - Assign Black and show for .08 seconds
cycle5_wait = .5 - Assign Black and show for .5 seconds (So LED is Black for a total of almost .7 seconds)

The times associated with each cycle are shown above, but can be edited in the metar-v4.py script if desired. - Mark


   
ReplyQuote
Share: