Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>2015-11-12 23:27:24 +0300
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>2015-11-12 23:27:24 +0300
commit2625e42f7f2f3ef4c97d24ba08e76cb1206c4753 (patch)
treeb4b8dfc37eeda7f0586f51e1bbf169aad11c2eb6
parent9386bbc5431ea51a69d17582dc8fbd815df5d3e4 (diff)
Remove \n from sendCommand
The sendCommand is already adding a \n, having the \n in the argument made it send an empty line to the serialCommunication process which would then interpret it as an unknown (empty) command, which caused [''] to be printed in stderr. Fixes T321
-rw-r--r--Cura/util/printerConnection/serialConnection.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/Cura/util/printerConnection/serialConnection.py b/Cura/util/printerConnection/serialConnection.py
index 81af319683..a33528820d 100644
--- a/Cura/util/printerConnection/serialConnection.py
+++ b/Cura/util/printerConnection/serialConnection.py
@@ -171,7 +171,7 @@ class serialConnection(printerConnectionBase.printerConnectionBase):
if x is not None and y is not None:
# Set E relative positioning
self.sendCommand("M83")
-
+
# Retract 1mm
retract = ("E-%f" % retract_amount)
@@ -179,21 +179,21 @@ class serialConnection(printerConnectionBase.printerConnectionBase):
newZ = self._ZPosition + moveZ
if maxZ < newZ:
newZ = maxZ
-
+
if newZ > self._ZPosition:
move = ("Z%f " % (newZ))
else: #No z movement, too close to max height
move = ""
- retract_and_move = "G1 {} {}F120\n".format(retract, move)
+ retract_and_move = "G1 {} {}F120".format(retract, move)
self.sendCommand(retract_and_move)
#Move the head away
- self.sendCommand("G1 X%f Y%f F9000\n" % (parkX, parkY))
+ self.sendCommand("G1 X%f Y%f F9000" % (parkX, parkY))
#Disable the E steppers
- self.sendCommand("M84 E0\n")
+ self.sendCommand("M84 E0")
# Set E absolute positioning
- self.sendCommand("M82\n")
+ self.sendCommand("M82")
self._pausePosition = (x, y, self._ZPosition, f, e)
self._process.stdin.write("PAUSE\n")
@@ -202,22 +202,22 @@ class serialConnection(printerConnectionBase.printerConnectionBase):
retract_amount = profile.getProfileSettingFloat('retraction_amount')
# Set E relative positioning
self.sendCommand("M83")
-
+
#Prime the nozzle when changing filament
- self.sendCommand("G1 E%f F120\n" % (retract_amount)) #Push the filament out
- self.sendCommand("G1 E-%f F120\n" % (retract_amount)) #retract again
+ self.sendCommand("G1 E%f F120" % (retract_amount)) #Push the filament out
+ self.sendCommand("G1 E-%f F120" % (retract_amount)) #retract again
# Position the toolhead to the correct position again
- self.sendCommand("G1 X%f Y%f Z%f F%d\n" % self._pausePosition[0:4])
+ self.sendCommand("G1 X%f Y%f Z%f F%d" % self._pausePosition[0:4])
# Prime the nozzle again
- self.sendCommand("G1 E%f F120\n" % (retract_amount))
+ self.sendCommand("G1 E%f F120" % (retract_amount))
# Set proper feedrate
- self.sendCommand("G1 F%d\n" % (self._pausePosition[3]))
+ self.sendCommand("G1 F%d" % (self._pausePosition[3]))
# Set E absolute position to cancel out any extrude/retract that occured
- self.sendCommand("G92 E%f\n" % (self._pausePosition[4]))
+ self.sendCommand("G92 E%f" % (self._pausePosition[4]))
# Set E absolute positioning
- self.sendCommand("M82\n")
+ self.sendCommand("M82")
self._process.stdin.write("RESUME\n")
self._pausePosition = None