mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:59:02 +08:00
Convert estimated time to int
This commit is contained in:
parent
17e18e76d7
commit
c778f3fa23
@ -398,7 +398,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||
line = line[:line.find(";")]
|
||||
|
||||
line = line.strip()
|
||||
|
||||
|
||||
# Don't send empty lines. But we do have to send something, so send M105 instead.
|
||||
# Don't send the M0 or M1 to the machine, as M0 and M1 are handled as an LCD menu pause.
|
||||
if line == "" or line == "M0" or line == "M1":
|
||||
@ -429,7 +429,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||
print_job.updateTimeElapsed(elapsed_time)
|
||||
estimated_time = self._print_estimated_time
|
||||
if progress > .1:
|
||||
estimated_time = self._print_estimated_time * (1 - progress) + elapsed_time
|
||||
estimated_time = int(self._print_estimated_time * (1 - progress) + elapsed_time)
|
||||
print_job.updateTimeTotal(estimated_time)
|
||||
|
||||
self._gcode_position += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user