From: daid Date: Thu, 15 Mar 2012 15:31:49 +0000 (+0100) Subject: Updated the E calibration with a heatup button. Also disable extrude/heat button... X-Git-Tag: RC1~86 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6ebc6f64d37488911207716905ba84bae49fff99;p=cura.git Updated the E calibration with a heatup button. Also disable extrude/heat button during extrusion. --- diff --git a/SkeinPyPy_NewUI/newui/configWizard.py b/SkeinPyPy_NewUI/newui/configWizard.py index 5c6360dc..60f5682d 100644 --- a/SkeinPyPy_NewUI/newui/configWizard.py +++ b/SkeinPyPy_NewUI/newui/configWizard.py @@ -328,9 +328,13 @@ class UltimakerCalibrateStepsPerEPage(InfoPage): self.stepsPerEInput = wx.TextCtrl(self, -1, settings.getPreference('steps_per_e', '865.888')) self.GetSizer().Add(self.stepsPerEInput, 0, wx.LEFT, 5) self.AddText("You can repeat these steps to get better calibration.") + self.AddSeperator() + self.AddText("If you still have filament in your printer which needs\nheat to remove, press the heat up button below:") + self.heatButton = self.AddButton("Heatup for filament removal") self.saveLengthButton.Bind(wx.EVT_BUTTON, self.OnSaveLengthClick) self.extrudeButton.Bind(wx.EVT_BUTTON, self.OnExtrudeClick) + self.heatButton.Bind(wx.EVT_BUTTON, self.OnHeatClick) def OnSaveLengthClick(self, e): currentEValue = float(self.stepsPerEInput.GetValue()) @@ -340,9 +344,11 @@ class UltimakerCalibrateStepsPerEPage(InfoPage): self.lengthInput.SetValue("100") def OnExtrudeClick(self, e): - threading.Thread(target=self.OnRun).start() + threading.Thread(target=self.OnExtrudeRun).start() - def OnRun(self): + def OnExtrudeRun(self): + self.heatButton.Enable(False) + self.extrudeButton.Enable(False) currentEValue = float(self.stepsPerEInput.GetValue()) self.comm = machineCom.MachineCom() while True: @@ -355,7 +361,26 @@ class UltimakerCalibrateStepsPerEPage(InfoPage): self.sendGCommand("M92 E%f" % (currentEValue)); self.sendGCommand("G92 E0"); self.sendGCommand("G1 E100 F300"); - time.sleep(5) + time.sleep(10) + self.comm.close() + self.extrudeButton.Enable() + self.heatButton.Enable() + + def OnHeatClick(self, e): + threading.Thread(target=self.OnHeatRun).start() + + def OnHeatRun(self, e): + self.comm = machineCom.MachineCom() + while True: + line = self.comm.readline() + if line == '': + return + if line.startswith('start'): + break + self.sendGCommand('M104 S200') #Set the temperature to 200C, should be enough to get PLA and ABS out. + wx.MessageBox('Wait till you can remove the filament from the machine, and press OK.\n(Temperature is set to 200C)', 'Machine heatup', wx.OK | wx.ICON_INFORMATION) + self.sendGCommand('M104 S0') + time.sleep(1) self.comm.close() def sendGCommand(self, cmd):