From c1d9c1ea125aee1b61a745f2231706a10297ae31 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 29 Jul 2016 14:29:35 +0200 Subject: [PATCH 1/2] Add button to start bedleveling wizard Prevents the printer from homing unexpectedly --- .../BedLevelMachineAction.py | 6 ++++++ .../BedLevelMachineAction.qml | 20 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/plugins/UltimakerMachineActions/BedLevelMachineAction.py b/plugins/UltimakerMachineActions/BedLevelMachineAction.py index 7dad841340..12df7d6843 100644 --- a/plugins/UltimakerMachineActions/BedLevelMachineAction.py +++ b/plugins/UltimakerMachineActions/BedLevelMachineAction.py @@ -18,6 +18,11 @@ class BedLevelMachineAction(MachineAction): pass def _reset(self): + self._bed_level_position = 0 + pass + + @pyqtSlot() + def startBedLeveling(self): self._bed_level_position = 0 printer_output_devices = self._getPrinterOutputDevices() if printer_output_devices: @@ -52,4 +57,5 @@ class BedLevelMachineAction(MachineAction): output_device.moveHead(0, 0, -3) self._bed_level_position += 1 elif self._bed_level_position >= 3: + output_device.sendCommand("M18") # Turn off all motors so the user can move the axes self.setFinished() \ No newline at end of file diff --git a/plugins/UltimakerMachineActions/BedLevelMachineAction.qml b/plugins/UltimakerMachineActions/BedLevelMachineAction.qml index 602e945922..c7c4074120 100644 --- a/plugins/UltimakerMachineActions/BedLevelMachineAction.qml +++ b/plugins/UltimakerMachineActions/BedLevelMachineAction.qml @@ -55,13 +55,29 @@ Cura.MachineAction anchors.horizontalCenter: parent.horizontalCenter width: childrenRect.width spacing: UM.Theme.getSize("default_margin").width + + Button + { + id: startBedLevelingButton + text: catalog.i18nc("@action:button","Start Bed Leveling") + onClicked: + { + startBedLevelingButton.visible = false; + bedlevelingButton.visible = true; + checkupMachineAction.heatupHotendStarted = false; + checkupMachineAction.heatupBedStarted = false; + manager.startCheck(); + } + } + Button { id: bedlevelingButton - text: catalog.i18nc("@action:button","Move to Next Position"); + text: catalog.i18nc("@action:button","Move to Next Position") + visible: false onClicked: { - manager.moveToNextLevelPosition() + manager.moveToNextLevelPosition(); } } } From 2576aaca6265e1de0523e0461657aadf08837521 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 29 Jul 2016 14:30:36 +0200 Subject: [PATCH 2/2] Hide start check button once the check has started --- plugins/UltimakerMachineActions/UMOCheckupMachineAction.py | 1 + .../UltimakerMachineActions/UMOCheckupMachineAction.qml | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py index b46c92a82c..355b4dd0c1 100644 --- a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py +++ b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.py @@ -155,6 +155,7 @@ class UMOCheckupMachineAction(MachineAction): if output_devices: self._output_device = output_devices[0] try: + self._output_device.sendCommand("M18") # Turn off all motors so the user can move the axes self._output_device.startPollEndstop() self._output_device.bedTemperatureChanged.connect(self.bedTemperatureChanged) self._output_device.hotendTemperaturesChanged.connect(self.hotendTemperatureChanged) diff --git a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml index 27953874cd..0bdbc27527 100644 --- a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml +++ b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml @@ -53,9 +53,10 @@ Cura.MachineAction text: catalog.i18nc("@action:button","Start Printer Check"); onClicked: { - checkupMachineAction.heatupHotendStarted = false - checkupMachineAction.heatupBedStarted = false - manager.startCheck() + checkupMachineAction.heatupHotendStarted = false; + checkupMachineAction.heatupBedStarted = false; + manager.startCheck(); + startCheckButton.visible = false; } } }