Notifications
Clear all

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

Feature Request - Smoother High Wind Blink

7 Posts
3 Users
0 Reactions
339 Views
(@golfcharlie)
New Member
Joined: 2 years ago
Posts: 4
Topic starter  

Hi, would it be possible to modify the the high wind blink from an on/off blink to either a bright/dim or even better yet something like what Harrison Liddiard did with his ( https://harrisonliddiard.com/project/aviation-weather-map/ ) where he has it oscillate faster or slower based on the wind speed?

 

Thanks!


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

I like the idea. For now, there won't be any changes. But if version 5 sees the light of day, I'll try to add that feature. I'm keeping a list of such suggestions.

If you want a different color other than black, you can edit the 'metar-v4.py' file at around line 1624. Change;

color = color_black

to

color = (R,G,B)

Brighter colors would be higher numbers (255) and darker would be lower (50)

Hope this helps in the meantime. - Mark


   
ReplyQuote
(@golfcharlie)
New Member
Joined: 2 years ago
Posts: 4
Topic starter  

Thanks, Mark. I updated the code and pasted below in case anyone else is interested:

#Check winds and set the 2nd half of cycles to black to create blink effect
if hiwindblink: #bypass if "hiwindblink" is set to 0
	if (int(airportwinds) >= max_wind_speed and (cycle_num == 3 or cycle_num == 4 or cycle_num == 5)):
        color = (int(color[0]/2), int(color[1]/2), int(color[2]/2)) # dim the current color by half
        print(("HIGH WINDS-> " + airportcode + " Winds = " + str(airportwinds) + " ")) #debug
        logger.info(("HIGH WINDS-> " + airportcode + " Winds = " + str(airportwinds) + " ")) #debug

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

Thank you for that! Tell us which file (I assume metar-v4.py) and what line number, or area to make finding it a bit easier. - Mark


   
ReplyQuote
(@arandomuser)
New Member
Joined: 3 years ago
Posts: 3
 

This is interesting. Mark, if you recall there was another thread with a feature request for a gradient in brightness (instead of being stuck at two discrete levels). https://github.com/liddiard/aviation-weather-map/blob/master/light_sensor.py seems to circumvent the limitation to get an approximate measure of ambient brightness. 


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

Thanks for pointing that code out. It's an inspired solution, to use a photo resister. I really like the way he codes, its clear and concise. At some point I'll have to try a photo resister to see if I can get the same results. - Mark


   
ReplyQuote
(@golfcharlie)
New Member
Joined: 2 years ago
Posts: 4
Topic starter  

Thank you for that! Tell us which file (I assume metar-v4.py) and what line number, or area to make finding it a bit easier. - Mark

 

@markyharris Sorry Mark, I missed your reply on this. Yes, it's in the metar-v4.py file, approximately around line 1620.

This post was modified 2 years ago by GolfCharlie

   
ReplyQuote
Share: