mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Added way to stop the heating of bed / hotend in checkup
CURA-1385
This commit is contained in:
parent
67938b5739
commit
a76f6375c7
2 changed files with 35 additions and 4 deletions
|
@ -160,6 +160,16 @@ class UMOCheckupMachineAction(MachineAction):
|
||||||
except AttributeError as e: # Connection is probably not a USB connection. Something went pretty wrong if this happens.
|
except AttributeError as e: # Connection is probably not a USB connection. Something went pretty wrong if this happens.
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def cooldownHotend(self):
|
||||||
|
if self._output_device is not None:
|
||||||
|
self._output_device.setTargetHotendTemperature(0, 0)
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def cooldownBed(self):
|
||||||
|
if self._output_device is not None:
|
||||||
|
self._output_device.setTargetBedTemperature(0)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def heatupHotend(self):
|
def heatupHotend(self):
|
||||||
if self._output_device is not None:
|
if self._output_device is not None:
|
||||||
|
|
|
@ -15,6 +15,8 @@ Cura.MachineAction
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
property int leftRow: checkupMachineAction.width * 0.40
|
property int leftRow: checkupMachineAction.width * 0.40
|
||||||
property int rightRow: checkupMachineAction.width * 0.60
|
property int rightRow: checkupMachineAction.width * 0.60
|
||||||
|
property bool heatupHotendStarted: false
|
||||||
|
property bool heatupBedStarted: false
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
@ -51,6 +53,8 @@ Cura.MachineAction
|
||||||
text: catalog.i18nc("@action:button","Start Printer Check");
|
text: catalog.i18nc("@action:button","Start Printer Check");
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
checkupMachineAction.heatupHotendStarted = false
|
||||||
|
checkupMachineAction.heatupBedStarted = false
|
||||||
manager.startCheck()
|
manager.startCheck()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,10 +185,19 @@ Cura.MachineAction
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width/2
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width/2
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button","Start Heating")
|
text: checkupMachineAction.heatupHotendStarted ? catalog.i18nc("@action:button","Stop Heating") : catalog.i18nc("@action:button","Start Heating")
|
||||||
|
//
|
||||||
onClicked:
|
onClicked:
|
||||||
|
{
|
||||||
|
if (checkupMachineAction.heatupHotendStarted)
|
||||||
|
{
|
||||||
|
manager.cooldownHotend()
|
||||||
|
checkupMachineAction.heatupHotendStarted = false
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
manager.heatupHotend()
|
manager.heatupHotend()
|
||||||
|
checkupMachineAction.heatupHotendStarted = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,10 +243,18 @@ Cura.MachineAction
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width/2
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width/2
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button","Start Heating")
|
text: checkupMachineAction.heatupBedStarted ?catalog.i18nc("@action:button","Stop Heating") : catalog.i18nc("@action:button","Start Heating")
|
||||||
onClicked:
|
onClicked:
|
||||||
|
{
|
||||||
|
if (checkupMachineAction.heatupBedStarted)
|
||||||
|
{
|
||||||
|
manager.cooldownBed()
|
||||||
|
checkupMachineAction.heatupBedStarted = false
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
manager.heatupBed()
|
manager.heatupBed()
|
||||||
|
checkupMachineAction.heatupBedStarted = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue