# HG changeset patch # User Daniel O'Connor # Date 1505114316 -34200 # Node ID 22d31cee19b1e9f3cf6e0f1d99a8c900b175f054 # Parent 27540ac7879d807e9287e34f569a1543ffdeaee7 Misc tidyup, no functional change diff -r 27540ac7879d -r 22d31cee19b1 agl.py --- 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]