mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Remove unusde code
CURA-1339
This commit is contained in:
parent
34b76f3c1e
commit
92c0c4b637
1 changed files with 2 additions and 14 deletions
|
@ -320,19 +320,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||||
|
|
||||||
if "M109" in cmd or "M190" in cmd:
|
if "M109" in cmd or "M190" in cmd:
|
||||||
self._heatup_wait_start_time = time.time()
|
self._heatup_wait_start_time = time.time()
|
||||||
if "M104" in cmd or "M109" in cmd:
|
|
||||||
try:
|
|
||||||
t = 0
|
|
||||||
if "T" in cmd:
|
|
||||||
t = int(re.search("T([0-9]+)", cmd).group(1))
|
|
||||||
self._target_extruder_temperatures[t] = float(re.search("S([0-9]+)", cmd).group(1))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
if "M140" in cmd or "M190" in cmd:
|
|
||||||
try:
|
|
||||||
self._target_bed_temperature = float(re.search("S([0-9]+)", cmd).group(1))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
try:
|
try:
|
||||||
command = (cmd + "\n").encode()
|
command = (cmd + "\n").encode()
|
||||||
self._serial.write(b"\n")
|
self._serial.write(b"\n")
|
||||||
|
@ -370,7 +358,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||||
## Send a command to printer.
|
## Send a command to printer.
|
||||||
# \param cmd string with g-code
|
# \param cmd string with g-code
|
||||||
def sendCommand(self, cmd):
|
def sendCommand(self, cmd):
|
||||||
if not self._progress:
|
if self._progress:
|
||||||
self._command_queue.put(cmd)
|
self._command_queue.put(cmd)
|
||||||
elif self._connection_state == ConnectionState.CONNECTED:
|
elif self._connection_state == ConnectionState.CONNECTED:
|
||||||
self._sendCommand(cmd)
|
self._sendCommand(cmd)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue