From 07d0e433a8da1440ea8885e053d9aafc6507a9c8 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 12 Feb 2016 16:19:00 +0100 Subject: [PATCH 1/3] JSON: made some essential settings visible by default: conical support, brim settings, raft settings (CURA-877) --- resources/machines/fdmprinter.json | 57 ++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index cb8c8466a8..5f7911f79d 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -346,6 +346,7 @@ "min_value": "0", "min_value_warning": "0.2", "max_value_warning": "5", + "visible": false, "children": { "wall_thickness": { "label": "Wall Thickness", @@ -356,7 +357,7 @@ "min_value_warning": "0.2", "max_value_warning": "5", "type": "float", - "visible": false, + "visible": true, "children": { "wall_line_count": { "label": "Wall Line Count", @@ -386,7 +387,7 @@ "max_value": "5", "min_value_warning": "0.6", "type": "float", - "visible": false, + "visible": true, "children": { "top_thickness": { "label": "Top Thickness", @@ -1295,7 +1296,7 @@ "description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.", "type": "boolean", "default": false, - "visible": false, + "visible": true, "enabled": "support_enable" }, "support_conical_angle": { @@ -1579,6 +1580,7 @@ "max_value_warning": "100.0", "enabled": "adhesion_type == \"brim\"", "global_only": "print_sequence != \"one_at_a_time\"", + "visible": true, "children": { "brim_line_count": { "label": "Brim Line Count", @@ -1589,7 +1591,8 @@ "max_value_warning": "300", "inherit_function": "math.ceil(parent_value / skirt_line_width)", "enabled": "adhesion_type == \"brim\"", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "print_sequence != \"one_at_a_time\"", + "visible": false } } }, @@ -1601,7 +1604,8 @@ "default": 5, "min_value_warning": "0", "max_value_warning": "10", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": false }, "raft_airgap": { "label": "Raft Air-gap", @@ -1611,7 +1615,8 @@ "default": 0.35, "min_value": "0", "max_value_warning": "1.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": true }, "raft_surface_layers": { "label": "Raft Top Layers", @@ -1620,7 +1625,8 @@ "default": 2, "min_value": "0", "max_value_warning": "20", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": true }, "raft_surface_thickness": { "label": "Raft Top Layer Thickness", @@ -1630,7 +1636,8 @@ "default": 0.1, "min_value": "0", "max_value_warning": "2.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": false }, "raft_surface_line_width": { "label": "Raft Top Line Width", @@ -1640,7 +1647,8 @@ "default": 0.3, "min_value": "0.0001", "max_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": false }, "raft_surface_line_spacing": { "label": "Raft Top Spacing", @@ -1651,7 +1659,8 @@ "min_value": "0.0001", "max_value_warning": "5.0", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "raft_surface_line_width" + "inherit_function": "raft_surface_line_width", + "visible": false }, "raft_interface_thickness": { "label": "Raft Middle Thickness", @@ -1661,7 +1670,8 @@ "default": 0.27, "min_value": "0", "max_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": false }, "raft_interface_line_width": { "label": "Raft Middle Line Width", @@ -1671,7 +1681,8 @@ "default": 1, "min_value": "0.0001", "max_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": false }, "raft_interface_line_spacing": { "label": "Raft Middle Spacing", @@ -1681,7 +1692,8 @@ "default": 1.0, "min_value": "0", "max_value_warning": "15.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": false }, "raft_base_thickness": { "label": "Raft Base Thickness", @@ -1691,7 +1703,8 @@ "default": 0.3, "min_value": "0", "max_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": false }, "raft_base_line_width": { "label": "Raft Base Line Width", @@ -1701,7 +1714,8 @@ "default": 1, "min_value": "0.0001", "max_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": false }, "raft_base_line_spacing": { "label": "Raft Line Spacing", @@ -1711,7 +1725,8 @@ "default": 3.0, "min_value": "0.0001", "max_value_warning": "100", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "visible": false }, "raft_speed": { "label": "Raft Print Speed", @@ -1723,6 +1738,7 @@ "max_value_warning": "200", "enabled": "adhesion_type == \"raft\"", "inherit_function": "speed_print / 60 * 30", + "visible": false, "children": { "raft_surface_speed": { "label": "Raft Surface Print Speed", @@ -1733,7 +1749,8 @@ "min_value": "0.1", "max_value_warning": "100", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "parent_value" + "inherit_function": "parent_value", + "visible": false }, "raft_interface_speed": { "label": "Raft Interface Print Speed", @@ -1744,7 +1761,8 @@ "min_value": "0.1", "max_value_warning": "150", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value" + "inherit_function": "0.5 * parent_value", + "visible": false }, "raft_base_speed": { "label": "Raft Base Print Speed", @@ -1755,7 +1773,8 @@ "min_value": "0.1", "max_value_warning": "200", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value" + "inherit_function": "0.5 * parent_value", + "visible": false } } }, From 9379b0a97ba85bcf9aa4bb73f8d6be790799995c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 12 Feb 2016 17:07:35 +0100 Subject: [PATCH 2/3] Update translation from machine name to hex file There was an incongruence in the translation from the machine name to hex file. Sometimes the machine name was wrong. Sometimes the hex file was wrong. Contributes to issue CURA-440. --- plugins/USBPrinting/USBPrinterManager.py | 20 +++++++++++-------- .../machines/ultimaker2_extended_plus.json | 2 +- resources/machines/ultimaker2plus.json | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index 88c696c2c9..5982196cb8 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -133,30 +133,34 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): def _getDefaultFirmwareName(self): machine_type = Application.getInstance().getMachineManager().getActiveMachineInstance().getMachineDefinition().getId() - firmware_name = "" baudrate = 250000 if sys.platform.startswith("linux"): baudrate = 115200 if machine_type == "ultimaker_original": firmware_name = "MarlinUltimaker" firmware_name += "-%d" % (baudrate) + return firmware_name + ".hex" elif machine_type == "ultimaker_original_plus": firmware_name = "MarlinUltimaker-UMOP-%d" % (baudrate) - elif machine_type == "Witbox": + return firmware_name + ".hex" + elif machine_type == "bq_witbox": return "MarlinWitbox.hex" - elif machine_type == "ultimaker2go": + elif machine_type == "ultimaker2_go": return "MarlinUltimaker2go.hex" - elif machine_type == "ultimaker2extended": + elif machine_type == "ultimaker2_extended": return "MarlinUltimaker2extended.hex" elif machine_type == "ultimaker2": return "MarlinUltimaker2.hex" + elif machine_type == "ultimaker2plus": + return "MarlinUltimaker2plus.hex" + elif machine_type == "ultimaker2_extended_plus": + return "MarlinUltimaker2extended-plus.hex" + else: + Logger.log("e", "I don't know of any firmware for machine %s.", machine_type) + raise FileNotFoundError() ##TODO: Add check for multiple extruders - if firmware_name != "": - firmware_name += ".hex" - return firmware_name - def _addRemovePorts(self, serial_ports): # First, find and add all new or changed keys for serial_port in list(serial_ports): diff --git a/resources/machines/ultimaker2_extended_plus.json b/resources/machines/ultimaker2_extended_plus.json index 5f74df23c7..403340cbe3 100644 --- a/resources/machines/ultimaker2_extended_plus.json +++ b/resources/machines/ultimaker2_extended_plus.json @@ -1,5 +1,5 @@ { - "id": "ultimaker2_extended_plus_base", + "id": "ultimaker2_extended_plus", "version": 1, "name": "Ultimaker 2 Extended+", "manufacturer": "Ultimaker", diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json index b75e66122d..8c1c24663f 100644 --- a/resources/machines/ultimaker2plus.json +++ b/resources/machines/ultimaker2plus.json @@ -1,5 +1,5 @@ { - "id": "ultimaker2plus_base", + "id": "ultimaker2plus", "version": 1, "name": "Ultimaker 2+", "manufacturer": "Ultimaker", From 69331696f0de67998a943460d6354071b6c0870c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 15 Feb 2016 11:03:44 +0100 Subject: [PATCH 3/3] Revert UM2+ machine names This was causing problems in the listing of the printers due to the variants. I still don't really know why it was causing these problems but I've reverted the changes and it seems to have been fixed now. Contributes to issue CURA-440. --- resources/machines/ultimaker2_extended_plus.json | 2 +- resources/machines/ultimaker2plus.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/machines/ultimaker2_extended_plus.json b/resources/machines/ultimaker2_extended_plus.json index 403340cbe3..5f74df23c7 100644 --- a/resources/machines/ultimaker2_extended_plus.json +++ b/resources/machines/ultimaker2_extended_plus.json @@ -1,5 +1,5 @@ { - "id": "ultimaker2_extended_plus", + "id": "ultimaker2_extended_plus_base", "version": 1, "name": "Ultimaker 2 Extended+", "manufacturer": "Ultimaker", diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json index 8c1c24663f..b75e66122d 100644 --- a/resources/machines/ultimaker2plus.json +++ b/resources/machines/ultimaker2plus.json @@ -1,5 +1,5 @@ { - "id": "ultimaker2plus", + "id": "ultimaker2plus_base", "version": 1, "name": "Ultimaker 2+", "manufacturer": "Ultimaker",