mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
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.
This commit is contained in:
parent
6d27c26260
commit
9379b0a97b
3 changed files with 14 additions and 10 deletions
|
@ -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):
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"id": "ultimaker2_extended_plus_base",
|
"id": "ultimaker2_extended_plus",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"name": "Ultimaker 2 Extended+",
|
"name": "Ultimaker 2 Extended+",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"id": "ultimaker2plus_base",
|
"id": "ultimaker2plus",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"name": "Ultimaker 2+",
|
"name": "Ultimaker 2+",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue