Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions piweatherrock/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def __init__(self):
self.daily = None
self.hourly = None
self.info = None
self.hourcap = 0
self.caphour = False

def main(self, config_file):
with open(config_file, "r") as f:
Expand Down Expand Up @@ -179,6 +181,11 @@ def screen_switcher(self):
if self.seconds != time.localtime().tm_sec:
self.seconds = time.localtime().tm_sec
self.daily.disp_daily(self.my_weather_rock)
# At first Daily screen of the new hour, capture it
if self.config["caphour"]:
if time.localtime().tm_hour != self.hourcap:
self.my_weather_rock.screen_cap()
self.hourcap = time.localtime().tm_hour

# Once the screen is updated, we have a full second to get the
# weather. Once per minute, check to see if its time to get a
Expand Down