Fix: Manually added printer by ip address shows proper printer type

CURA-5264
This commit is contained in:
Aleksei S 2018-05-03 17:14:56 +02:00
parent 5b8f426ea2
commit c5e9acf664

View File

@ -189,10 +189,14 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
b"name": system_info["name"].encode("utf-8"),
b"address": address.encode("utf-8"),
b"firmware_version": system_info["firmware"].encode("utf-8"),
b"manual": b"true",
b"machine": system_info["variant"].encode("utf-8")
b"manual": b"true"
}
if "hardware" in system_info and 'typeid' in system_info["hardware"]:
properties[b"machine"] = str(system_info['hardware']["typeid"]).encode("utf-8")
else:
properties[b"machine"] = system_info["variant"].encode("utf-8")
if has_cluster_capable_firmware:
# Cluster needs an additional request, before it's completed.
properties[b"incomplete"] = b"true"