Merge branch '2.1' of https://github.com/Ultimaker/Cura into 2.1

This commit is contained in:
Jaime van Kessel 2016-02-15 14:18:12 +01:00
commit 9bf783df4d
2 changed files with 50 additions and 27 deletions

View File

@ -133,30 +133,34 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension):
def _getDefaultFirmwareName(self): def _getDefaultFirmwareName(self):
machine_type = Application.getInstance().getMachineManager().getActiveMachineInstance().getMachineDefinition().getId() machine_type = Application.getInstance().getMachineManager().getActiveMachineInstance().getMachineDefinition().getId()
firmware_name = ""
baudrate = 250000 baudrate = 250000
if sys.platform.startswith("linux"): if sys.platform.startswith("linux"):
baudrate = 115200 baudrate = 115200
if machine_type == "ultimaker_original": if machine_type == "ultimaker_original":
firmware_name = "MarlinUltimaker" firmware_name = "MarlinUltimaker"
firmware_name += "-%d" % (baudrate) firmware_name += "-%d" % (baudrate)
return firmware_name + ".hex"
elif machine_type == "ultimaker_original_plus": elif machine_type == "ultimaker_original_plus":
firmware_name = "MarlinUltimaker-UMOP-%d" % (baudrate) firmware_name = "MarlinUltimaker-UMOP-%d" % (baudrate)
elif machine_type == "Witbox": return firmware_name + ".hex"
elif machine_type == "bq_witbox":
return "MarlinWitbox.hex" return "MarlinWitbox.hex"
elif machine_type == "ultimaker2go": elif machine_type == "ultimaker2_go":
return "MarlinUltimaker2go.hex" return "MarlinUltimaker2go.hex"
elif machine_type == "ultimaker2extended": elif machine_type == "ultimaker2_extended":
return "MarlinUltimaker2extended.hex" return "MarlinUltimaker2extended.hex"
elif machine_type == "ultimaker2": elif machine_type == "ultimaker2":
return "MarlinUltimaker2.hex" 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 ##TODO: Add check for multiple extruders
if firmware_name != "":
firmware_name += ".hex"
return firmware_name
def _addRemovePorts(self, serial_ports): def _addRemovePorts(self, serial_ports):
# First, find and add all new or changed keys # First, find and add all new or changed keys
for serial_port in list(serial_ports): for serial_port in list(serial_ports):

View File

@ -346,6 +346,7 @@
"min_value": "0", "min_value": "0",
"min_value_warning": "0.2", "min_value_warning": "0.2",
"max_value_warning": "5", "max_value_warning": "5",
"visible": false,
"children": { "children": {
"wall_thickness": { "wall_thickness": {
"label": "Wall Thickness", "label": "Wall Thickness",
@ -356,7 +357,7 @@
"min_value_warning": "0.2", "min_value_warning": "0.2",
"max_value_warning": "5", "max_value_warning": "5",
"type": "float", "type": "float",
"visible": false, "visible": true,
"children": { "children": {
"wall_line_count": { "wall_line_count": {
"label": "Wall Line Count", "label": "Wall Line Count",
@ -386,7 +387,7 @@
"max_value": "5", "max_value": "5",
"min_value_warning": "0.6", "min_value_warning": "0.6",
"type": "float", "type": "float",
"visible": false, "visible": true,
"children": { "children": {
"top_thickness": { "top_thickness": {
"label": "Top Thickness", "label": "Top Thickness",
@ -1295,7 +1296,7 @@
"description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.", "description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.",
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"visible": false, "visible": true,
"enabled": "support_enable" "enabled": "support_enable"
}, },
"support_conical_angle": { "support_conical_angle": {
@ -1579,6 +1580,7 @@
"max_value_warning": "100.0", "max_value_warning": "100.0",
"enabled": "adhesion_type == \"brim\"", "enabled": "adhesion_type == \"brim\"",
"global_only": "print_sequence != \"one_at_a_time\"", "global_only": "print_sequence != \"one_at_a_time\"",
"visible": true,
"children": { "children": {
"brim_line_count": { "brim_line_count": {
"label": "Brim Line Count", "label": "Brim Line Count",
@ -1589,7 +1591,8 @@
"max_value_warning": "300", "max_value_warning": "300",
"inherit_function": "math.ceil(parent_value / skirt_line_width)", "inherit_function": "math.ceil(parent_value / skirt_line_width)",
"enabled": "adhesion_type == \"brim\"", "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, "default": 5,
"min_value_warning": "0", "min_value_warning": "0",
"max_value_warning": "10", "max_value_warning": "10",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": false
}, },
"raft_airgap": { "raft_airgap": {
"label": "Raft Air-gap", "label": "Raft Air-gap",
@ -1611,7 +1615,8 @@
"default": 0.35, "default": 0.35,
"min_value": "0", "min_value": "0",
"max_value_warning": "1.0", "max_value_warning": "1.0",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": true
}, },
"raft_surface_layers": { "raft_surface_layers": {
"label": "Raft Top Layers", "label": "Raft Top Layers",
@ -1620,7 +1625,8 @@
"default": 2, "default": 2,
"min_value": "0", "min_value": "0",
"max_value_warning": "20", "max_value_warning": "20",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": true
}, },
"raft_surface_thickness": { "raft_surface_thickness": {
"label": "Raft Top Layer Thickness", "label": "Raft Top Layer Thickness",
@ -1630,7 +1636,8 @@
"default": 0.1, "default": 0.1,
"min_value": "0", "min_value": "0",
"max_value_warning": "2.0", "max_value_warning": "2.0",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": false
}, },
"raft_surface_line_width": { "raft_surface_line_width": {
"label": "Raft Top Line Width", "label": "Raft Top Line Width",
@ -1640,7 +1647,8 @@
"default": 0.3, "default": 0.3,
"min_value": "0.0001", "min_value": "0.0001",
"max_value_warning": "machine_nozzle_size * 2", "max_value_warning": "machine_nozzle_size * 2",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": false
}, },
"raft_surface_line_spacing": { "raft_surface_line_spacing": {
"label": "Raft Top Spacing", "label": "Raft Top Spacing",
@ -1651,7 +1659,8 @@
"min_value": "0.0001", "min_value": "0.0001",
"max_value_warning": "5.0", "max_value_warning": "5.0",
"enabled": "adhesion_type == \"raft\"", "enabled": "adhesion_type == \"raft\"",
"inherit_function": "raft_surface_line_width" "inherit_function": "raft_surface_line_width",
"visible": false
}, },
"raft_interface_thickness": { "raft_interface_thickness": {
"label": "Raft Middle Thickness", "label": "Raft Middle Thickness",
@ -1661,7 +1670,8 @@
"default": 0.27, "default": 0.27,
"min_value": "0", "min_value": "0",
"max_value_warning": "5.0", "max_value_warning": "5.0",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": false
}, },
"raft_interface_line_width": { "raft_interface_line_width": {
"label": "Raft Middle Line Width", "label": "Raft Middle Line Width",
@ -1671,7 +1681,8 @@
"default": 1, "default": 1,
"min_value": "0.0001", "min_value": "0.0001",
"max_value_warning": "machine_nozzle_size * 2", "max_value_warning": "machine_nozzle_size * 2",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": false
}, },
"raft_interface_line_spacing": { "raft_interface_line_spacing": {
"label": "Raft Middle Spacing", "label": "Raft Middle Spacing",
@ -1681,7 +1692,8 @@
"default": 1.0, "default": 1.0,
"min_value": "0", "min_value": "0",
"max_value_warning": "15.0", "max_value_warning": "15.0",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": false
}, },
"raft_base_thickness": { "raft_base_thickness": {
"label": "Raft Base Thickness", "label": "Raft Base Thickness",
@ -1691,7 +1703,8 @@
"default": 0.3, "default": 0.3,
"min_value": "0", "min_value": "0",
"max_value_warning": "5.0", "max_value_warning": "5.0",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": false
}, },
"raft_base_line_width": { "raft_base_line_width": {
"label": "Raft Base Line Width", "label": "Raft Base Line Width",
@ -1701,7 +1714,8 @@
"default": 1, "default": 1,
"min_value": "0.0001", "min_value": "0.0001",
"max_value_warning": "machine_nozzle_size * 2", "max_value_warning": "machine_nozzle_size * 2",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": false
}, },
"raft_base_line_spacing": { "raft_base_line_spacing": {
"label": "Raft Line Spacing", "label": "Raft Line Spacing",
@ -1711,7 +1725,8 @@
"default": 3.0, "default": 3.0,
"min_value": "0.0001", "min_value": "0.0001",
"max_value_warning": "100", "max_value_warning": "100",
"enabled": "adhesion_type == \"raft\"" "enabled": "adhesion_type == \"raft\"",
"visible": false
}, },
"raft_speed": { "raft_speed": {
"label": "Raft Print Speed", "label": "Raft Print Speed",
@ -1723,6 +1738,7 @@
"max_value_warning": "200", "max_value_warning": "200",
"enabled": "adhesion_type == \"raft\"", "enabled": "adhesion_type == \"raft\"",
"inherit_function": "speed_print / 60 * 30", "inherit_function": "speed_print / 60 * 30",
"visible": false,
"children": { "children": {
"raft_surface_speed": { "raft_surface_speed": {
"label": "Raft Surface Print Speed", "label": "Raft Surface Print Speed",
@ -1733,7 +1749,8 @@
"min_value": "0.1", "min_value": "0.1",
"max_value_warning": "100", "max_value_warning": "100",
"enabled": "adhesion_type == \"raft\"", "enabled": "adhesion_type == \"raft\"",
"inherit_function": "parent_value" "inherit_function": "parent_value",
"visible": false
}, },
"raft_interface_speed": { "raft_interface_speed": {
"label": "Raft Interface Print Speed", "label": "Raft Interface Print Speed",
@ -1744,7 +1761,8 @@
"min_value": "0.1", "min_value": "0.1",
"max_value_warning": "150", "max_value_warning": "150",
"enabled": "adhesion_type == \"raft\"", "enabled": "adhesion_type == \"raft\"",
"inherit_function": "0.5 * parent_value" "inherit_function": "0.5 * parent_value",
"visible": false
}, },
"raft_base_speed": { "raft_base_speed": {
"label": "Raft Base Print Speed", "label": "Raft Base Print Speed",
@ -1755,7 +1773,8 @@
"min_value": "0.1", "min_value": "0.1",
"max_value_warning": "200", "max_value_warning": "200",
"enabled": "adhesion_type == \"raft\"", "enabled": "adhesion_type == \"raft\"",
"inherit_function": "0.5 * parent_value" "inherit_function": "0.5 * parent_value",
"visible": false
} }
} }
}, },