changeset 8:22d31cee19b1

Misc tidyup, no functional change
author Daniel O'Connor <darius@dons.net.au>
date Mon, 11 Sep 2017 16:48:36 +0930
parents 27540ac7879d
children e2807c99e107
files agl.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/agl.py	Mon Sep 11 16:48:10 2017 +0930
+++ b/agl.py	Mon Sep 11 16:48:36 2017 +0930
@@ -133,7 +133,11 @@
 }
 
 convs = {
-    'battery_power' : lambda a: a / 1000.0
+    'battery_power' : lambda a: a / 1000.0,
+}
+
+scale_limits = {
+    'battery_charge' : (0, 100),
 }
 
 names = {
@@ -200,7 +204,7 @@
     if ary.shape[0] == 0:
         print('No data')
         return
-    # Convert naive UTC to proper UTC then adjust to local time
+    # Convert TZ naive UTC to TZ aware UTC then adjust to local time
     xdata = map(lambda f: f.replace(tzinfo = utc).astimezone(lt), ary[:,0])
     for idx in range(len(cols)):
         ydata = ary[:,idx + 1]