Mercurial > templog
changeset 563:dd809548424c
integer division
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 13 Jun 2015 21:56:51 +0800 |
parents | 55cae4f27e75 |
children | 59cb8449ef97 |
files | py/config.py web/templog.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/py/config.py Wed Jun 10 00:13:26 2015 +0800 +++ b/py/config.py Sat Jun 13 21:56:51 2015 +0800 @@ -8,7 +8,7 @@ FRIDGE_WORT_INVALID_TIME = 300 # 5 mins # 12 hours of "offline" readings stored -MAX_READINGS = 12*60*60 / SENSOR_SLEEP +MAX_READINGS = 12*60*60 // SENSOR_SLEEP PARAMS_FILE = os.path.join(os.path.dirname(__file__), 'tempserver.conf')
--- a/web/templog.py Wed Jun 10 00:13:26 2015 +0800 +++ b/web/templog.py Sat Jun 13 21:56:51 2015 +0800 @@ -115,11 +115,11 @@ + timedelta(minutes=(float(xpos) / (config.GRAPH_WIDTH * config.ZOOM)) * minutes) minutes = int(minutes / ZOOM_SCALE) - end = click_time + timedelta(minutes=minutes/2) + end = click_time + timedelta(minutes=minutes//2) else: # zoom out minutes = int(minutes*ZOOM_SCALE) - end += timedelta(minutes=minutes/2) + end += timedelta(minutes=minutes//2) if end > datetime.now(): end = datetime.now()