diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-12-07 09:53:24 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-12-07 09:53:24 -0500 |
commit | d339839a91ab9845072e53335821c8195cae81cf (patch) | |
tree | 556121c22e76df31b4a44b5c0406970a6b27d6d4 /scripts/graphstats.py | |
parent | c4a37756eaf922aee83f8ee51e2ac7353b6036c4 (diff) | |
download | kutter-d339839a91ab9845072e53335821c8195cae81cf.tar.gz kutter-d339839a91ab9845072e53335821c8195cae81cf.tar.xz kutter-d339839a91ab9845072e53335821c8195cae81cf.zip |
graphstats: Allow graphing of temperature_sensor logs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts/graphstats.py')
-rwxr-xr-x | scripts/graphstats.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/graphstats.py b/scripts/graphstats.py index 1eeae57f..743152bd 100755 --- a/scripts/graphstats.py +++ b/scripts/graphstats.py @@ -228,8 +228,8 @@ def plot_temperature(data, heater): continue times.append(datetime.datetime.utcfromtimestamp(d['#sampletime'])) temps.append(float(temp)) - pwm.append(float(d[pwm_key])) - targets.append(float(d[target_key])) + pwm.append(float(d.get(pwm_key, 0.))) + targets.append(float(d.get(target_key, 0.))) # Build plot fig, ax1 = matplotlib.pyplot.subplots() ax1.set_title("Temperature of heater %s" % (heater,)) |