Merge branch 'master' of github.com:Ultimaker/Cura

This commit is contained in:
Jaime van Kessel 2017-02-13 11:07:25 +01:00
commit ce5f435be9
18 changed files with 47 additions and 23 deletions

View File

@ -435,6 +435,7 @@ class CuraApplication(QtApplication):
self.__single_instance_server = QLocalServer()
self.__single_instance_server.newConnection.connect(self._singleInstanceServerNewConnection)
self.__single_instance_server.listen("ultimaker-cura")
Logger.log("d","Single-instance: Listening on: " + repr(self.__single_instance_server.fullServerName()))
def _singleInstanceServerNewConnection(self):
Logger.log("i", "New connection recevied on our single-instance server")
@ -442,9 +443,11 @@ class CuraApplication(QtApplication):
if remote_cura_connection is not None:
def readCommands():
Logger.log("d", "Single-instance: readCommands()")
line = remote_cura_connection.readLine()
while len(line) != 0: # There is also a .canReadLine()
try:
Logger.log("d", "Single-instance: Read command line: " + repr(line))
payload = json.loads(str(line, encoding="ASCII").strip())
command = payload["command"]
@ -464,6 +467,10 @@ class CuraApplication(QtApplication):
# 'alert' or flashing the icon in the taskbar is the best thing we do now.
self.getMainWindow().alert(0)
# Command: Close the socket connection. We're done.
elif command == "close-connection":
remote_cura_connection.close()
else:
Logger.log("w", "Received an unrecognized command " + str(command))
except json.decoder.JSONDecodeError as ex:
@ -471,7 +478,11 @@ class CuraApplication(QtApplication):
line = remote_cura_connection.readLine()
remote_cura_connection.readyRead.connect(readCommands)
remote_cura_connection.disconnected.connect(readCommands) # Get any last commands before it is destroyed.
def disconnected():
Logger.log("d", "Single-instance: Disconnected")
readCommands()
Logger.log("d", "Single-instance: Finished disconnected")
remote_cura_connection.disconnected.connect(disconnected) # Get any last commands before it is destroyed.
## Perform any checks before creating the main application.
#
@ -487,6 +498,7 @@ class CuraApplication(QtApplication):
if "single_instance" in parsed_command_line and parsed_command_line["single_instance"]:
Logger.log("i", "Checking for the presence of an ready running Cura instance.")
single_instance_socket = QLocalSocket()
Logger.log("d", "preStartUp(): full server name: " + single_instance_socket.fullServerName())
single_instance_socket.connectToServer("ultimaker-cura")
single_instance_socket.waitForConnected()
if single_instance_socket.state() == QLocalSocket.ConnectedState:
@ -506,8 +518,12 @@ class CuraApplication(QtApplication):
for filename in parsed_command_line["file"]:
payload = {"command": "open", "filePath": filename}
single_instance_socket.write(bytes(json.dumps(payload) + "\n", encoding="ASCII"))
payload = {"command": "close-connection"}
single_instance_socket.write(bytes(json.dumps(payload) + "\n", encoding="ASCII"))
single_instance_socket.flush()
single_instance_socket.close()
single_instance_socket.waitForDisconnected()
return False
return True

View File

@ -267,7 +267,7 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
pass
else:
if only_list_usb:
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*")
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*") + glob.glob("/dev/tty.wchusb*") + glob.glob("/dev/cu.wchusb*")
base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list
else:
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.*") + glob.glob("/dev/tty.usb*") + glob.glob("/dev/rfcomm*") + glob.glob("/dev/serial/by-id/*")

View File

@ -18,7 +18,7 @@ material_final_print_temperature = =material_print_temperature - 10
prime_tower_size = 16
skin_overlap = 20
speed_print = 60
speed_layer_0 = =round(speed_print * 30 / 60)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 35 / 60)
speed_wall = =math.ceil(speed_print * 45 / 60)
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)

View File

@ -19,7 +19,7 @@ material_final_print_temperature = =material_print_temperature - 10
material_standby_temperature = 100
prime_tower_size = 16
speed_print = 60
speed_layer_0 = =round(speed_print * 30 / 60)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 60)
speed_wall = =math.ceil(speed_print * 40 / 60)
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)

View File

@ -19,7 +19,7 @@ material_initial_print_temperature = =material_print_temperature - 5
material_final_print_temperature = =material_print_temperature - 10
prime_tower_size = 16
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 50)
speed_wall = =math.ceil(speed_print * 30 / 50)

View File

@ -17,7 +17,7 @@ material_final_print_temperature = =material_print_temperature - 10
material_standby_temperature = 100
prime_tower_size = 16
speed_print = 55
speed_layer_0 = =round(speed_print * 30 / 55)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 55)
speed_wall = =math.ceil(speed_print * 30 / 55)

View File

@ -17,7 +17,7 @@ material_standby_temperature = 100
prime_tower_size = 17
skin_overlap = 20
speed_print = 60
speed_layer_0 = =round(speed_print * 30 / 60)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 35 / 60)
speed_wall = =math.ceil(speed_print * 45 / 60)
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)

View File

@ -17,7 +17,7 @@ material_final_print_temperature = =material_print_temperature - 10
material_standby_temperature = 100
prime_tower_size = 17
speed_print = 60
speed_layer_0 = =round(speed_print * 30 / 60)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 60)
speed_wall = =math.ceil(speed_print * 40 / 60)
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)

View File

@ -19,7 +19,7 @@ material_final_print_temperature = =material_print_temperature - 10
material_standby_temperature = 100
prime_tower_size = 17
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 50)
speed_wall = =math.ceil(speed_print * 30 / 50)

View File

@ -17,7 +17,7 @@ material_final_print_temperature = =material_print_temperature - 10
material_standby_temperature = 100
prime_tower_size = 17
speed_print = 55
speed_layer_0 = =round(speed_print * 30 / 55)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 55)
speed_wall = =math.ceil(speed_print * 30 / 55)

View File

@ -18,6 +18,7 @@ material_print_temperature = =default_material_print_temperature + 5
material_standby_temperature = 100
prime_tower_enable = False
skin_overlap = 20
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 35 / 70)
speed_wall = =math.ceil(speed_print * 50 / 70)
speed_wall_0 = =math.ceil(speed_wall * 35 / 50)

View File

@ -17,7 +17,7 @@ machine_nozzle_heat_up_speed = 1.6
material_standby_temperature = 100
prime_tower_enable = False
speed_print = 80
speed_layer_0 = =round(speed_print * 30 / 80)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 80)
speed_wall = =math.ceil(speed_print * 40 / 80)
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)

View File

@ -20,7 +20,7 @@ material_standby_temperature = 100
prime_tower_enable = False
skin_overlap = 10
speed_print = 60
speed_layer_0 = =round(speed_print * 30 / 60)
speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 60)
speed_wall = =math.ceil(speed_print * 30 / 60)
top_bottom_thickness = 1

View File

@ -18,6 +18,7 @@ machine_nozzle_heat_up_speed = 1.6
material_standby_temperature = 100
prime_tower_enable = False
skin_overlap = 10
speed_layer_0 = 20
top_bottom_thickness = 1
wall_thickness = 1

View File

@ -12,13 +12,15 @@ material = generic_pva_ultimaker3_BB_0.4
[values]
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
acceleration_support_infill = =acceleration_support
acceleration_support_interface = =acceleration_support
jerk_support = =math.ceil(jerk_print * 5 / 25)
jerk_support_infill = =jerk_support
jerk_support_interface = =jerk_support
material_print_temperature = =default_material_print_temperature + 10
material_standby_temperature = 100
skin_overlap = 20
support_interface_height = 0.8
prime_tower_enable = False
speed_support_interface = =math.ceil(speed_support * 20 / 25)
jerk_support_interface = =math.ceil(jerk_support * 1 / 5)
acceleration_support_interface = =math.ceil(acceleration_support * 100 / 500 )
support_xy_distance = =round(line_width * 1.5, 2)

View File

@ -12,13 +12,14 @@ material = generic_pva_ultimaker3_BB_0.4
[values]
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
acceleration_support_infill = =acceleration_support
acceleration_support_interface = =acceleration_support
jerk_support = =math.ceil(jerk_print * 5 / 25)
jerk_support_infill = =jerk_support
jerk_support_interface = =jerk_support
material_print_temperature = =default_material_print_temperature + 5
material_standby_temperature = 100
skin_overlap = 15
support_interface_height = 0.8
prime_tower_enable = False
speed_support_interface = =math.ceil(speed_support * 20 / 25)
jerk_support_interface = =math.ceil(jerk_support * 1 / 5)
acceleration_support_interface = =math.ceil(acceleration_support * 100 / 500 )
support_xy_distance = =round(line_width * 1.5, 2)

View File

@ -12,12 +12,14 @@ material = generic_pva_ultimaker3_BB_0.4
[values]
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
acceleration_support_infill = =acceleration_support
acceleration_support_interface = =acceleration_support
jerk_support = =math.ceil(jerk_print * 5 / 25)
jerk_support_infill = =jerk_support
jerk_support_interface = =jerk_support
support_infill_rate = 25
support_interface_height = 0.8
material_standby_temperature = 100
prime_tower_enable = False
speed_support_interface = =math.ceil(speed_support * 20 / 25)
jerk_support_interface = =math.ceil(jerk_support * 1 / 5)
acceleration_support_interface = =math.ceil(acceleration_support * 100 / 500 )
support_xy_distance = =round(line_width * 1.5, 2)

View File

@ -12,12 +12,13 @@ material = generic_pva_ultimaker3_BB_0.4
[values]
acceleration_support = =math.ceil(acceleration_print * 500 / 4000)
acceleration_support_infill = =acceleration_support
acceleration_support_interface = =acceleration_support
jerk_support = =math.ceil(jerk_print * 5 / 25)
jerk_support_infill = =jerk_support
jerk_support_interface = =jerk_support
support_infill_rate = 25
support_interface_height = 0.8
material_standby_temperature = 100
prime_tower_enable = False
speed_support_interface = =math.ceil(speed_support * 20 / 25)
jerk_support_interface = =math.ceil(jerk_support * 1 / 5)
acceleration_support_interface = =math.ceil(acceleration_support * 100 / 500 )
support_xy_distance = =round(line_width * 1.5, 2)