mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Merge branch 'connection_rework'
This commit is contained in:
commit
fe68be4f62
8 changed files with 498 additions and 276 deletions
|
@ -18,11 +18,11 @@ Item
|
|||
property int platform_width: UM.MachineManager.getSettingValue("machine_width")
|
||||
property int platform_height: UM.MachineManager.getSettingValue("machine_depth")
|
||||
anchors.fill: parent;
|
||||
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||
property variant printer_connection: Cura.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||
Component.onCompleted:
|
||||
{
|
||||
printer_connection.homeBed()
|
||||
printer_connection.moveHeadRelative(0, 0, 3)
|
||||
printer_connection.moveHead(0, 0, 3)
|
||||
printer_connection.homeHead()
|
||||
}
|
||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||
|
@ -73,23 +73,23 @@ Item
|
|||
{
|
||||
if(wizardPage.leveling_state == 0)
|
||||
{
|
||||
printer_connection.moveHeadRelative(0, 0, 3)
|
||||
printer_connection.moveHead(0, 0, 3)
|
||||
printer_connection.homeHead()
|
||||
printer_connection.moveHeadRelative(0, 0, 3)
|
||||
printer_connection.moveHeadRelative(platform_width - 10, 0, 0)
|
||||
printer_connection.moveHeadRelative(0, 0, -3)
|
||||
printer_connection.moveHead(0, 0, 3)
|
||||
printer_connection.moveHead(platform_width - 10, 0, 0)
|
||||
printer_connection.moveHead(0, 0, -3)
|
||||
}
|
||||
if(wizardPage.leveling_state == 1)
|
||||
{
|
||||
printer_connection.moveHeadRelative(0, 0, 3)
|
||||
printer_connection.moveHeadRelative(-platform_width/2, platform_height - 10, 0)
|
||||
printer_connection.moveHeadRelative(0, 0, -3)
|
||||
printer_connection.moveHead(0, 0, 3)
|
||||
printer_connection.moveHead(-platform_width/2, platform_height - 10, 0)
|
||||
printer_connection.moveHead(0, 0, -3)
|
||||
}
|
||||
if(wizardPage.leveling_state == 2)
|
||||
{
|
||||
printer_connection.moveHeadRelative(0, 0, 3)
|
||||
printer_connection.moveHeadRelative(-platform_width/2 + 10, -(platform_height + 10), 0)
|
||||
printer_connection.moveHeadRelative(0, 0, -3)
|
||||
printer_connection.moveHead(0, 0, 3)
|
||||
printer_connection.moveHead(-platform_width/2 + 10, -(platform_height + 10), 0)
|
||||
printer_connection.moveHead(0, 0, -3)
|
||||
}
|
||||
wizardPage.leveling_state++
|
||||
if (wizardPage.leveling_state >= 3){
|
||||
|
|
|
@ -31,9 +31,9 @@ Item
|
|||
}
|
||||
|
||||
property variant printer_connection: {
|
||||
if (UM.USBPrinterManager.connectedPrinterList.rowCount() != 0){
|
||||
if (Cura.USBPrinterManager.connectedPrinterList.rowCount() != 0){
|
||||
wizardPage.checkupProgress.connection = true
|
||||
return UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||
return Cura.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||
}
|
||||
else {
|
||||
return null
|
||||
|
@ -140,7 +140,7 @@ Item
|
|||
anchors.left: connectionLabel.right
|
||||
anchors.top: parent.top
|
||||
wrapMode: Text.WordWrap
|
||||
text: UM.USBPrinterManager.connectedPrinterList.rowCount() > 0 || base.addOriginalProgress.checkUp[0] ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete")
|
||||
text: Cura.USBPrinterManager.connectedPrinterList.rowCount() > 0 || base.addOriginalProgress.checkUp[0] ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete")
|
||||
}
|
||||
//////////////////////////////////////////////////////////
|
||||
Label
|
||||
|
@ -237,7 +237,7 @@ Item
|
|||
if(printer_connection != null)
|
||||
{
|
||||
nozzleTempStatus.text = catalog.i18nc("@info:progress","Checking")
|
||||
printer_connection.heatupNozzle(190)
|
||||
printer_connection.setTargetHotendTemperature(0, 190)
|
||||
wizardPage.extruder_target_temp = 190
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ Item
|
|||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
width: wizardPage.rightRow * 0.2
|
||||
wrapMode: Text.WordWrap
|
||||
text: printer_connection != null ? printer_connection.extruderTemperature + "°C" : "0°C"
|
||||
text: printer_connection != null ? printer_connection.hotendTemperatures[0] + "°C" : "0°C"
|
||||
font.bold: true
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -293,7 +293,7 @@ Item
|
|||
if(printer_connection != null)
|
||||
{
|
||||
bedTempStatus.text = catalog.i18nc("@info:progress","Checking")
|
||||
printer_connection.heatupBed(60)
|
||||
printer_connection.setTargetBedTemperature(60)
|
||||
wizardPage.bed_target_temp = 60
|
||||
}
|
||||
}
|
||||
|
@ -346,16 +346,16 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
onExtruderTemperatureChanged:
|
||||
onHotendTemperaturesChanged:
|
||||
{
|
||||
if(printer_connection.extruderTemperature > wizardPage.extruder_target_temp - 10 && printer_connection.extruderTemperature < wizardPage.extruder_target_temp + 10)
|
||||
if(printer_connection.hotendTemperatures[0] > wizardPage.extruder_target_temp - 10 && printer_connection.hotendTemperatures[0] < wizardPage.extruder_target_temp + 10)
|
||||
{
|
||||
if(printer_connection != null)
|
||||
{
|
||||
nozzleTempStatus.text = catalog.i18nc("@info:status","Works")
|
||||
wizardPage.checkupProgress.nozzleTemp = true
|
||||
checkTotalCheckUp()
|
||||
printer_connection.heatupNozzle(0)
|
||||
printer_connection.setTargetHotendTemperature(0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -366,7 +366,7 @@ Item
|
|||
bedTempStatus.text = catalog.i18nc("@info:status","Works")
|
||||
wizardPage.checkupProgress.bedTemp = true
|
||||
checkTotalCheckUp()
|
||||
printer_connection.heatupBed(0)
|
||||
printer_connection.setTargetBedTemperature(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ Item
|
|||
|
||||
SystemPalette{id: palette}
|
||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.rowCount() != 0 ? UM.USBPrinterManager.connectedPrinterList.getItem(0).printer : null
|
||||
property variant printer_connection: Cura.USBPrinterManager.connectedPrinterList.rowCount() != 0 ? Cura.USBPrinterManager.connectedPrinterList.getItem(0).printer : null
|
||||
Label
|
||||
{
|
||||
id: pageTitle
|
||||
|
@ -62,7 +62,7 @@ Item
|
|||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
text: catalog.i18nc("@action:button","Upgrade to Marlin Firmware");
|
||||
onClicked: UM.USBPrinterManager.updateAllFirmware()
|
||||
onClicked: Cura.USBPrinterManager.updateAllFirmware()
|
||||
}
|
||||
Button {
|
||||
id: skipUpgradeButton
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue