From 9963c523c012c9e14d78bd8362624797267fb5db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 9 Jun 2013 18:13:12 +0200 Subject: [PATCH] Do not display -1mm when printing from sd --- octoprint/printer.py | 2 +- octoprint/static/js/ui.js | 5 +++++ octoprint/templates/index.jinja2 | 2 +- octoprint/util/comm.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/octoprint/printer.py b/octoprint/printer.py index 76bc285..8ddc707 100644 --- a/octoprint/printer.py +++ b/octoprint/printer.py @@ -201,7 +201,7 @@ class Printer(): if self._comm.isPrinting(): return - self._setCurrentZ(-1) + self._setCurrentZ(None) if self._sdFile is not None: # we are working in sd mode self._sdPrinting = True diff --git a/octoprint/static/js/ui.js b/octoprint/static/js/ui.js index fc3c779..3ddd486 100644 --- a/octoprint/static/js/ui.js +++ b/octoprint/static/js/ui.js @@ -231,6 +231,11 @@ function PrinterStateViewModel(loginStateViewModel) { var currentLine = self.currentLine() ? self.currentLine() : "-"; return currentLine + " / " + self.totalLines(); }); + self.heightString = ko.computed(function() { + if (!self.currentHeight()) + return "-"; + return self.currentHeight(); + }) self.progressString = ko.computed(function() { if (!self.progress()) return 0; diff --git a/octoprint/templates/index.jinja2 b/octoprint/templates/index.jinja2 index d5530fe..fc78ec8 100644 --- a/octoprint/templates/index.jinja2 +++ b/octoprint/templates/index.jinja2 @@ -112,7 +112,7 @@ Filament:
Estimated Print Time:
Line:
- Height:
+ Height:
Print Time:
Print Time Left:
diff --git a/octoprint/util/comm.py b/octoprint/util/comm.py index 3954872..c846e93 100644 --- a/octoprint/util/comm.py +++ b/octoprint/util/comm.py @@ -358,7 +358,7 @@ class MachineCom(object): self._commandQueue = queue.Queue() self._logQueue = queue.Queue(256) self._feedRateModifier = {} - self._currentZ = -1 + self._currentZ = None self._heatupWaitStartTime = 0 self._heatupWaitTimeLost = 0.0 self._printStartTime = None