comparison graph.py @ 20:d4356465dce1

Set limits for battery voltages to make graph comparison easier
author Daniel O'Connor <darius@dons.net.au>
date Tue, 27 Feb 2018 16:12:36 +1030
parents 4d97dfb07169
children
comparison
equal deleted inserted replaced
19:4d97dfb07169 20:d4356465dce1
21 self.limits = limits 21 self.limits = limits
22 self.conv = conv 22 self.conv = conv
23 self.annofn = annofn 23 self.annofn = annofn
24 24
25 columns = [ 25 columns = [
26 Column('main_voltage', 'Battery Voltage', 'eprolog', 'Vdc'), 26 Column('main_voltage', 'Battery Voltage', 'eprolog', 'Vdc', (10, 30)),
27 Column('aux_voltage', 'Aux Voltage', 'eprolog', 'Vdc'), 27 Column('aux_voltage', 'Aux Voltage', 'eprolog', 'Vdc', (10, 30)),
28 Column('battery_curr', 'Battery Current', 'eprolog', 'A'), 28 Column('battery_curr', 'Battery Current', 'eprolog', 'A'),
29 Column('amp_hours', 'Battery Amp Hours', 'eprolog', 'Ah'), 29 Column('amp_hours', 'Battery Amp Hours', 'eprolog', 'Ah'),
30 Column('state_of_charge', 'State of Charge', 'eprolog', '%', (0, 100), annofn = lambda xdata, ydata: 'DoD: %.1f' % (100 - ydata.min())), 30 Column('state_of_charge', 'State of Charge', 'eprolog', '%', (0, 100), annofn = lambda xdata, ydata: 'DoD: %.1f' % (100 - ydata.min())),
31 Column('time_remaining', 'Time Remaining', 'eprolog', 'min'), 31 Column('time_remaining', 'Time Remaining', 'eprolog', 'min'),
32 Column('battery_temp', 'Battery Temperature', 'eprolog', 'C'), 32 Column('battery_temp', 'Battery Temperature', 'eprolog', 'C'),