mirror of https://github.com/Desuuuu/klipper.git
graphstats: Fix so that older files (predating mcu_awake) still work
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
4a6254fac3
commit
19090bdd5b
|
@ -81,7 +81,7 @@ def plot_mcu(data, maxbw, outname, graph_awake=False):
|
|||
times.append(datetime.datetime.utcfromtimestamp(st))
|
||||
bwdeltas.append(100. * (bw - lastbw) / (maxbw * timedelta))
|
||||
loads.append(100. * load / .001)
|
||||
awake.append(100. * float(d['mcu_awake']) / STATS_INTERVAL)
|
||||
awake.append(100. * float(d.get('mcu_awake', 0.)) / STATS_INTERVAL)
|
||||
lasttime = st
|
||||
lastbw = bw
|
||||
|
||||
|
|
Loading…
Reference in New Issue