Commit 7301d7e8 authored by Guillaume Seguin's avatar Guillaume Seguin

Merge branch 'experimental' of git://github.com/kliment/Printrun into split-gui

parents 55ff6580 ab7c2782
...@@ -49,7 +49,10 @@ def dosify(name): ...@@ -49,7 +49,10 @@ def dosify(name):
return os.path.split(name)[1].split(".")[0][:8]+".g" return os.path.split(name)[1].split(".")[0][:8]+".g"
def parse_temperature_report(report, key): def parse_temperature_report(report, key):
if key in report:
return float(filter(lambda x: x.startswith(key), report.split())[0].split(":")[1].split("/")[0]) return float(filter(lambda x: x.startswith(key), report.split())[0].split(":")[1].split("/")[0])
else:
return -1.0
def format_time(timestamp): def format_time(timestamp):
return datetime.datetime.fromtimestamp(timestamp).strftime("%H:%M:%S") return datetime.datetime.fromtimestamp(timestamp).strftime("%H:%M:%S")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment