Progress of firmware update now works correctly

This commit is contained in:
Jaime van Kessel 2015-04-17 13:31:02 +02:00
parent cc9e67533c
commit 5133d0b2a1
2 changed files with 3 additions and 2 deletions

View file

@ -9,7 +9,7 @@ Rectangle
Text
{
text: "Updating firmware"
text: manager.progress == 0 ? "Starting firmware update, may take a while.": manager.progress > 99 ? "Firmware update completed.": "Updating firmware."
}
ProgressBar
{

View file

@ -410,7 +410,8 @@ class PrinterConnection(SignalEmitter):
progressChanged = Signal()
def setProgress(self, progress,max_progress = 100):
self._progress = progress
self._progress = progress / max_progress * 100 #Convert to scale of 0-100
#self._progress = progress
self.progressChanged.emit(self._progress, self._serial_port)
def cancelPrint(self):