Added stubs for checking if a print is at all possible

CURA-1036
This commit is contained in:
Jaime van Kessel 2016-06-17 11:34:28 +02:00
parent a36157c538
commit 44c2a09118

View file

@ -129,6 +129,19 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
def requestWrite(self, node, file_name = None, filter_by_machine = False): def requestWrite(self, node, file_name = None, filter_by_machine = False):
self._gcode = getattr(Application.getInstance().getController().getScene(), "gcode_list") self._gcode = getattr(Application.getInstance().getController().getScene(), "gcode_list")
# TODO: Implement all checks.
# Check if cartridges are loaded at all (Error)
#self._json_printer_state["heads"][0]["extruders"][0]["hotend"]["id"] != ""
# Check if there is material loaded at all (Error)
#self._json_printer_state["heads"][0]["extruders"][0]["active_material"]["GUID"] != ""
# Check if there is enough material (Warning)
#self._json_printer_state["heads"][0]["extruders"][0]["active_material"]["length_remaining"]
#TODO: Check if the cartridge is the right ID (give warning otherwise)
self.startPrint() self.startPrint()
def isConnected(self): def isConnected(self):