mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Getting "machine_heated_bed" (hopefully) correctly + little fix
This commit is contained in:
parent
253bb5f43c
commit
5128ea41c4
@ -129,9 +129,14 @@ class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin,
|
|||||||
return USBPrinterOutputDeviceManager._instance
|
return USBPrinterOutputDeviceManager._instance
|
||||||
|
|
||||||
def _getDefaultFirmwareName(self):
|
def _getDefaultFirmwareName(self):
|
||||||
|
# Detecting id of the current machine
|
||||||
machine_manager_model = MachineManagerModel()
|
machine_manager_model = MachineManagerModel()
|
||||||
machine_id = machine_manager_model.activeDefinitionId
|
machine_id = machine_manager_model.activeDefinitionId
|
||||||
|
|
||||||
|
# Detecting whether it has a heated bed
|
||||||
|
_active_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
|
machine_has_heated_bed = _active_container_stack.getProperty("machine_heated_bed", "value")
|
||||||
|
|
||||||
if platform.system() == "Linux":
|
if platform.system() == "Linux":
|
||||||
baudrate = 115200
|
baudrate = 115200
|
||||||
else:
|
else:
|
||||||
@ -156,8 +161,8 @@ class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin,
|
|||||||
##TODO: Add check for multiple extruders
|
##TODO: Add check for multiple extruders
|
||||||
hex_file = None
|
hex_file = None
|
||||||
if machine_id in machine_without_extras.keys(): # The machine needs to be defined here!
|
if machine_id in machine_without_extras.keys(): # The machine needs to be defined here!
|
||||||
if machine_id in machine_with_heated_bed.keys() and machine_manager_model.hasHeatedBed:
|
if machine_id in machine_with_heated_bed.keys() and machine_has_heated_bed:
|
||||||
Logger.log("d", "Choosing firmware with heated bed enabled for machine %s.", machine_type)
|
Logger.log("d", "Choosing firmware with heated bed enabled for machine %s.", machine_id)
|
||||||
hex_file = machine_with_heated_bed[machine_id] # Return firmware with heated bed enabled
|
hex_file = machine_with_heated_bed[machine_id] # Return firmware with heated bed enabled
|
||||||
else:
|
else:
|
||||||
Logger.log("d", "Choosing basic firmware for machine %s.", machine_id)
|
Logger.log("d", "Choosing basic firmware for machine %s.", machine_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user