Compare commits

..
8 Commits
Author SHA1 Message Date
Gina Häußge afdb98a92f Postponing the release of 1.2.15 until tomorrow 2016-07-29 21:50:45 +02:00
Gina Häußge 7b48270239 Preparing release of 1.2.15 2016-07-29 16:30:55 +02:00
Gina Häußge 90340487f7 Merge branch 'fix/revertTimeoutAdjustment' into maintenance 2016-07-29 08:54:11 +02:00
Gina Häußge 1f19fd1e1d Partially revert 937487037
This commit might be at the root of the problems reported
in #1423
2016-07-29 07:45:03 +02:00
Gina Häußge 9b13eb8a6c Support serial hook handlers to not return written bytes 2016-07-29 00:13:03 +02:00
Gina Häußge 444a36d0f0 state_string must always be initialized
See #1425
2016-07-28 23:24:29 +02:00
Gina Häußge 7c5cc8d256 Make sure we have at least two timestamps in lastmodified calculation
Otherwise our max(*timestamps) call might fail
2016-07-28 15:19:34 +02:00
Gina Häußge e76a3ea54f maintenance is now 1.2.15.dev 2016-07-28 14:30:21 +02:00
6 changed files with 39 additions and 21 deletions

No files matched your search

+4 -4
View File
@@ -16,11 +16,11 @@ rc
HEAD
\(detached.*
# maintenance is currently the branch for preparation of maintenance release 1.2.14
# maintenance is currently the branch for preparation of maintenance release 1.2.15
# so are any fix/... and improve/... branches
maintenance 1.2.14 cb2e0d449f607bbc89c7ad13c983a0cf11bbfdee pep440-dev
fix/.* 1.2.14 cb2e0d449f607bbc89c7ad13c983a0cf11bbfdee pep440-dev
improve/.* 1.2.14 cb2e0d449f607bbc89c7ad13c983a0cf11bbfdee pep440-dev
maintenance 1.2.15 14969e5508b7b66f38abaf0f96bb7dc5b9ebe929 pep440-dev
fix/.* 1.2.15 14969e5508b7b66f38abaf0f96bb7dc5b9ebe929 pep440-dev
improve/.* 1.2.15 14969e5508b7b66f38abaf0f96bb7dc5b9ebe929 pep440-dev
# every other branch is a development branch and thus gets resolved to 1.3.0-dev for now
.* 1.3.0 198d3450d94be1a2 pep440-dev
+14
View File
@@ -1,5 +1,19 @@
# OctoPrint Changelog
## 1.2.15 (2016-07-30)
### Improvements
* [#1425](https://github.com/foosel/OctoPrint/issues/1425) - Added a compatibility work around for plugins implementing the [`octoprint.comm.transport.serial_factory` hook](http://docs.octoprint.org/en/master/plugins/hooks.html#octoprint-comm-transport-serial-factory) but whose handler's `write` method did not return the number of written bytes (e.g. [GPX plugin including v2.5.2](http://plugins.octoprint.org/plugins/gpx/), [M33 Fio plugin including v1.2](http://plugins.octoprint.org/plugins/m33fio/)).
### Bug Fixes
* [#1423](https://github.com/foosel/OctoPrint/issues/1423) - Fixed an issue with certain printers dropping or garbling communication when setting the read timeout of the serial line. Removed the dynamic timeout setting introduced by [#1409](https://github.com/foosel/OctoPrint/issues/1409) to solve this.
* [#1425](https://github.com/foosel/OctoPrint/issues/1425) - Fixed an error when trying to close a printer connection that had not yet been opened and was `None`
* Fixed "Last Modified" header calculation for views where only one source file was present
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.14...1.2.15))
## 1.2.14 (2016-07-28)
### Improvements
+1
View File
@@ -918,6 +918,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
"""
oldState = self._state
state_string = None
if self._comm is not None:
state_string = self._comm.getStateString()
+1 -1
View File
@@ -530,7 +530,7 @@ def _files_for_index():
def _compute_date(files):
from datetime import datetime
timestamps = map(lambda path: os.stat(path).st_mtime, files)
timestamps = map(lambda path: os.stat(path).st_mtime, files) + [0] if files else []
max_timestamp = max(*timestamps) if timestamps else None
if max_timestamp:
# we set the micros to 0 since microseconds are not speced for HTTP
-1
View File
@@ -81,7 +81,6 @@ default_settings = {
"detection": 0.5,
"connection": 10,
"communication": 30,
"heatup": 2,
"temperature": 5,
"sdStatus": 1
},
+19 -15
View File
@@ -975,10 +975,7 @@ class MachineCom(object):
break
if line.strip() is not "":
self._consecutive_timeouts = 0
if self._heating:
self._timeout = get_new_timeout("heatup", self._timeout_intervals)
else:
self._timeout = get_new_timeout("communication", self._timeout_intervals)
self._timeout = get_new_timeout("communication", self._timeout_intervals)
##~~ debugging output handling
if line.startswith("//"):
@@ -1081,7 +1078,8 @@ class MachineCom(object):
elif ' T:' in line or line.startswith('T:') or ' T0:' in line or line.startswith('T0:') or ((' B:' in line or line.startswith('B:')) and not 'A:' in line):
if not disable_external_heatup_detection and not line.strip().startswith("ok") and not self._heating:
self._logger.debug("Externally triggered heatup detected")
self._track_heatup()
self._heating = True
self._heatupWaitStartTime = time.time()
self._processTemperatures(line)
self._callback.on_comm_temperature_update(self._temp, self._bedTemp)
@@ -1352,17 +1350,11 @@ class MachineCom(object):
self._log(message + " " + general_message)
self._clear_to_send.set()
def _track_heatup(self):
self._heating = True
self._heatupWaitStartTime = time.time()
self._serial.timeout = settings().getFloat(["serial", "timeout", "heatup"])
def _finish_heatup(self):
if self._heatupWaitStartTime:
self._heatupWaitTimeLost = self._heatupWaitTimeLost + (time.time() - self._heatupWaitStartTime)
self._heatupWaitStartTime = None
self._heating = False
self._serial.timeout = settings().getFloat(["serial", "timeout", "communication"])
def _continue_sending(self):
while self._active:
@@ -2036,11 +2028,21 @@ class MachineCom(object):
old_written = written
try:
written += self._serial.write(to_send)
result = self._serial.write(to_send)
if result is None or not isinstance(result, int):
# probably some plugin not returning the written bytes, assuming all of them
written += len(cmd)
else:
written += result
except serial.SerialTimeoutException:
self._log("Serial timeout while writing to serial port, trying again.")
try:
written += self._serial.write(to_send)
result = self._serial.write(to_send)
if result is None or not isinstance(result, int):
# probably some plugin not returning the written bytes, assuming all of them
written += len(cmd)
else:
written += result
except:
if not self._connection_closing:
self._logger.exception("Unexpected error while writing to serial port")
@@ -2152,13 +2154,15 @@ class MachineCom(object):
pass
def _gcode_M109_sent(self, cmd, cmd_type=None):
self._heatupWaitStartTime = time.time()
self._long_running_command = True
self._track_heatup()
self._heating = True
self._gcode_M104_sent(cmd, cmd_type, wait=True)
def _gcode_M190_sent(self, cmd, cmd_type=None):
self._heatupWaitStartTime = time.time()
self._long_running_command = True
self._track_heatup()
self._heating = True
self._gcode_M140_sent(cmd, cmd_type, wait=True)
def _gcode_M110_sending(self, cmd, cmd_type=None):