Merge branch 'maintenance' of github.com:foosel/OctoPrint into dev/permission

This commit is contained in:
Marc Hannappel committed 2017-11-02 08:33:32 +01:00
commit d45d2f5123
3 files changed
+14 -5

No files matched your search

+2
View File
@@ -7,4 +7,6 @@
# variables INSTALL_REQUIRES and EXTRA_REQUIRES.
###
# let's force the regular pypi URL, with https, just to be sure
-i https://pypi.python.org/simple
.
+1 -1
View File
@@ -1118,7 +1118,7 @@ class Settings(object):
reboot="systemRestartCommand",
restart="serverRestartCommand")
if "system" in config and "actions" in config["system"]:
if "system" in config and "actions" in config["system"] and isinstance(config["system"]["actions"], (list, tuple)):
actions = config["system"]["actions"]
to_delete = []
for index, spec in enumerate(actions):
+11 -4
View File
@@ -955,7 +955,7 @@ class MachineCom(object):
self._recordFilePosition()
self._callback.on_comm_print_job_cancelled()
def cancelPrint(self, firmware_error=None):
def cancelPrint(self, firmware_error=None, disable_log_position=False):
if not self.isOperational():
return
@@ -988,7 +988,7 @@ class MachineCom(object):
except:
pass
if self._log_position_on_cancel:
if self._log_position_on_cancel and not disable_log_position:
self.sendCommand("M400", on_sent=_on_M400_sent)
else:
self._cancel_preparation_done()
@@ -1583,7 +1583,7 @@ class MachineCom(object):
"Resetting line numbers to be on the safe side"
self._log(message)
self._logger.warn(message)
self.resetLineNumbers()
self._onExternalReset()
else:
verb = "streaming to SD" if self.isStreaming() else "printing"
@@ -1591,7 +1591,8 @@ class MachineCom(object):
"Aborting job since printer lost state.".format(verb)
self._log(message)
self._logger.warn(message)
self.cancelPrint()
self.cancelPrint(disable_log_position=True)
self._onExternalReset()
eventManager().fire(Events.PRINTER_RESET)
@@ -1805,6 +1806,12 @@ class MachineCom(object):
eventManager().fire(Events.CONNECTED, payload)
self.sendGcodeScript("afterPrinterConnected", replacements=dict(event=payload))
def _onExternalReset(self):
self.resetLineNumbers()
if self._temperature_autoreporting:
self._set_autoreport_temperature()
def _getTemperatureTimerInterval(self):
busy_default = 4.0
target_default = 2.0