Skip to content
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

Draw forecast of now+[3,6,9,12] hours #5

Merged
merged 1 commit into from Apr 13, 2018

Conversation

mwick83
Copy link
Contributor

@mwick83 mwick83 commented Nov 12, 2017

Previously the absolute hours 3,6,9,12 were drawn.

A simple helper function handles the 24 hour wrap around. Note that if minutes are 30+, one additional hour is added for rounding.

Previously the absolute hours 3,6,9,12 were drawn.

A simple helper function handles the 24 hour wrap around. Note that if
minutes are 30+, one additional hour is added for rounding.
@@ -292,11 +292,24 @@ void drawCurrentWeather() {

}

unsigned int hourAddWrap(unsigned int hour, unsigned int add) {
hour += add;
if(hour > 23) hour -= 24;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, just tested for a while and it looks good.

@marcelstoer
Copy link
Member

Thanks 👍 👏

@marcelstoer marcelstoer merged commit 6891438 into ThingPulse:master Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants