Skip to content

Commit

Permalink
Update bot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
oldnapalm authored Jul 14, 2020
1 parent 29f09fd commit f1c4b70
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ def disable_event():
print("Main wait loop")
while True:
try:
power = w.get()
t = int(time.time())
if power and t >= last + 1:
power_meter.update(power)
last = t
if t >= last + 1:
power = w.get()
if power:
power_meter.update(power)
last = t
master.update_idletasks()
master.update()
except (KeyboardInterrupt, SystemExit):
Expand Down

0 comments on commit f1c4b70

Please sign in to comment.