-
Notifications
You must be signed in to change notification settings - Fork 80
Converting Code to New API #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Cleaned up code and converted to easier to use JSON format.
Updated metar.py to include new API
Updated configuration settings for wind and lightning animations, and adjusted daytime dimming options.
gth758y
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together. It worked for me, but I'd suggest adding some error handling for incomplete METARs. For instance, VUO is currently not reporting a visibility, which caused this error: ValueError: invalid literal for int() with base 10: ''
… nearest airport flt cat if missing
|
Thanks for the tip! I should have added a more robust section there, just kinda threw something together to get it working. I've added all that functionality and even added a new feature. If REPLACE_CAT_WITH_CLOSEST (a new config option) is set to True, then the code will find the nearest METAR (from your airports list) and show that category so that you don't just have a blank there. |
… it existed in the display airports file
Hi all!
Just noticed my METARMap failing - no idea why it took me so long to notice. Saw a few people offering fixes, but I went a bit more nuclear. The new metar.py should be good to go now and has been working for me, including lightning and wind gusts. I also moved to JSON instead of XML and cleaned up a bunch of the code. Ideally I would have done more but didn't really understand how the external display code worked and didn't want to cause that to break.
Things I was unable to test:
Let me know if anyone sees any issues with the updates! Should hopefully be plug and play, I tried to match both the inputs and outputs of the old code.