Do not display -1mm when printing from sd

master
Gina Häußge 2013-06-09 18:13:12 +02:00
parent 4509eab816
commit 9963c523c0
4 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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;

View File

@ -112,7 +112,7 @@
Filament: <strong data-bind="text: filament"></strong><br>
Estimated Print Time: <strong data-bind="text: estimatedPrintTime"></strong><br>
Line: <strong data-bind="text: lineString"></strong><br>
Height: <strong data-bind="text: currentHeight"></strong><br>
Height: <strong data-bind="text: heightString"></strong><br>
Print Time: <strong data-bind="text: printTime"></strong><br>
Print Time Left: <strong data-bind="text: printTimeLeft"></strong><br>

View File

@ -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