Notifications
Clear all

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

Settings to change the frequency of the blinks and possibly the legend base color

3 Posts
2 Users
0 Reactions
1,170 Views
(@vancek)
Active Member
Joined: 5 years ago
Posts: 13
Topic starter  

Hi Guys,

First off, what a great project.  I'm very impressed with the amount of thought you've put into this package.  I was playing with some of the others out there and longing for a number of features, then I found Livesectional.  You have already thought of and coded everything, along with a support forum!

I'm working on a personal project that will have between 400 and 500 pixels and everything is working great so far.  I have two questions/tweaks that I'd like to play with.

1) Is it possible to change the delay between sequences of blinks.  It appears to wait for 2 seconds.  I'd like to play with extending this timer.  I didn't see it in the script that holds the variables and I can certainly dig for it in the code, just curious if you can give a pointer to it or possibly work that into a variable in a future release?

2) For the legend, I'd like to play with what it would look like without a 'base color'.  I'm not in front of it currently, but for example, instead of having it Red and then flashing for rain or lightning, just leave it off and just blink the indicated colors for the rain.

Thoughts on these?

Thanks again!
Vance


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

Hi Lance, That is going to be an awesome map with that many LED's. I can't wait to see a picture of it.

If I understand your first question; Yes you can change the delays for the cycle times. Open metar-v31.py and go down to around line 132. You will find these variables there.

#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 them.
cycle5_wait = .5

Just change them to your liking. One note though. To keep the Lightning effect looking good, be sure cycle2_wait and cycle4_wait are very short. These are the cycles that the lightning is flashed. I didn't build these into the web interface for people to change since we had so many other variables I didn't want to overload the user any more than I've done already. 🙂

For your second question; if you don't mind wading a little deeper into the code you can accomplish your request. Open metar-v31.py and go down to around line 460. You should see the code below. The red highlighted variables are the ones you would need to change to what ever color you want. For instance if you wanted the base color to be black just substitute 'color_black' for each of them. If you wanted the weather color for the whole time, then in the case of snow, you would substitute color_snow1. As a side note, the reason that there are two different weather colors, i.e. snow1 and snow2, is to allow for a blinking effect. And those colors are user definable in the web interface so if a blinking effect is not desired, just set both snow1 and snow2 to the same color. I hope this helps. - Mark

if i == leg_pin_snow and legend_snow:
if (cycle_num == 3 or cycle_num == 5): #Check for Snow
color = color_snow1

if (cycle_num == 4):
color = color_snow2

elif (cycle_num == 0 or cycle_num == 1 or cycle_num == 2):
color=color_lifr

if i == leg_pin_rain and legend_rain:
if (cycle_num == 3 or cycle_num == 5): #Check for Rain
color = color_rain1

if (cycle_num == 4):
color = color_rain2

elif (cycle_num == 0 or cycle_num == 1 or cycle_num == 2):
color=color_vfr

if i == leg_pin_frrain and legend_frrain:
if (cycle_num == 3 or cycle_num == 5): #Check for Freezing Rain
color = color_frrain1

if (cycle_num == 4):
color = color_frrain2

elif (cycle_num == 0 or cycle_num == 1 or cycle_num == 2):
color = color_mvfr

if i == leg_pin_dustsandash and legend_dustsandash:
if (cycle_num == 3 or cycle_num == 5): #Check for Dust, Sand or Ash
color = color_dustsandash1

if (cycle_num == 4):
color = color_dustsandash2

elif (cycle_num == 0 or cycle_num == 1 or cycle_num == 2):
color=color_vfr

if i == leg_pin_fog and legend_fog:
if (cycle_num == 3 or cycle_num == 5): #Check for Fog
color = color_fog1

if (cycle_num == 4):
color = color_fog2

elif (cycle_num == 0 or cycle_num == 1 or cycle_num == 2):
color=color_ifr


   
ReplyQuote
(@vancek)
Active Member
Joined: 5 years ago
Posts: 13
Topic starter  

Mark, thank you for the quick response!  I'll definitely post some photos when I get it done, hopefully in the next couple weeks.


   
ReplyQuote
Share: