-
Notifications
You must be signed in to change notification settings - Fork 70
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
SimpleWeatherService: Generate random weather data #138
Conversation
Thank you for the PR. I don't like to have to restart the sim to get new data. Furthermore I can't test the 'no-data' case anymore.
Could you restructure the code such that it is bound to a key binding. Just as I've done for the heart rate measurements or even better the notifications? Maybe use 'w' key to cycle through the weather data and 'shift+w' to have 'no-weather-data'
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
9e4f899
to
925d402
Compare
@NeroBurner yes, that was my first iteration, but had issues refreshing the weather since the instance of weatherService in |
Adding weather to the sim exposed a bug in the PTS face, where the value will always be considered dirty and attempt to display a formatted string even if the weather data is cleared. I've submitted a fix here: InfiniTimeOrg/InfiniTime#1965 edit: This fix is now merged upstream |
925d402
to
45a795e
Compare
I also added forecast data now. |
c9564d5
to
3648ffe
Compare
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.
sorry for the long delay to do this review. Thank you looks perfect! Just some extra code I suspect is a leftover of refactoring. But works just as I wanted. Perfect!
Please inform me if the extra code should stay in (and why). After that I'll happily merge :)
@@ -80,11 +80,18 @@ class SimpleWeatherService { | |||
int16_t minTemperature; | |||
int16_t maxTemperature; | |||
Icons iconId; | |||
|
|||
bool operator==(const Day& other) const; |
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.
where does this function come from? I don't think it is needed for the current implementation, and it is not in the current InfiniTime version of SimpleWeatherService.h
Absolutely! Thanks for the review. The extra code is just operator overrides to support the Forecast/Day structs. Without it, any screen that relies on I currently added it to the InfiniTime SimpleWeatherService in InfiniTimeOrg/InfiniTime#1995, but I can submit it as a separate PR to add just the overrides if you prefer. |
6e89f1b
to
0a98a85
Compare
I've submitted a patch for InfiniTime with only the operator overrides: InfiniTimeOrg/InfiniTime#2011 |
That makes sense! Then yes please keep the operator overrides. They are indeed useful and I am positive they will find their way into InfiniTime eventually 😁 |
One VERY last thing. Please update the readme.md as well with the new key to show and clear weather data 🙇♂️ |
Add a new simulation key handler for weather data: - 'w' will generate new weather, cycling through the various conditions - 'W' will clear the weather data
0a98a85
to
30abc55
Compare
Done! |
Merged! Thanks a lot! |
Generates random weather and forecast data. Also adds a new simulation key handler for weather data:
Needed to build the sim for the weather app in InfiniTimeOrg/InfiniTime#1995