Commit graph

1961 commits

Author SHA1 Message Date
Gina Häußge
47b7acdfbc Merge branch 'dev/python3A' of https://github.com/ByReaL/OctoPrint into pr/ByReaL/dev/python3A
Conflicts:
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/printer/standard.py
2016-07-15 12:28:19 +02:00
Gina Häußge
e961234458 Explicitly use floor division where necessary 2016-07-15 11:42:01 +02:00
Gina Häußge
76a04cbe9d Merge branch 'dev/python3B' of https://github.com/ByReaL/OctoPrint into pr/ByReaL/dev/python3B 2016-07-15 11:28:55 +02:00
Gina Häußge
3cb045380e Merge pull request #1414 from ByReaL/dev/python3D
python3: os.umask(002) to os.umask(0o002)
2016-07-15 11:14:11 +02:00
Gina Häußge
31d56c11c1 Merge pull request #1413 from ByReaL/dev/python3C
python3: xrange got removed from python 3
2016-07-15 11:13:54 +02:00
MirceaDan
bf320a8c43 python3: os.umask(002) to os.umask(0o002)
os.umask(0o002) is the python 2/3 way
2016-07-15 01:18:11 -07:00
MirceaDan
3dae8d90d7 python3: xrange got removed from python 3
python3 range is = python2 xrange
to make python 2 range = with python3 range i used teh future package
and did
from builtins import range
2016-07-15 00:56:45 -07:00
MirceaDan
c33a9f9aa2 from __future__ import absolute_import, division, print_function
changed the behavior to import division and print to be consistent
across all app and similar with python 3.x
2016-07-15 00:16:58 -07:00
MirceaDan
149cc8c7c5 python 3 changes exceptions, queue and asesrtEqual
1) import Queue is now lower caps

2) exceptions
except KeyError as e:

3) assertEquals is deprecated but assertEqual does exactly same thing
2016-07-14 23:53:39 -07:00
Gina Häußge
28814db207 Merge branch 'maintenance' into devel
Conflicts:
	setup.py
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/printer/standard.py
2016-07-14 19:47:38 +02:00
Gina Häußge
92f9ed465e Removed two unused locks from StateMonitor 2016-07-14 19:46:44 +02:00
Gina Häußge
0a8a7ba589 Fixed some imports 2016-07-14 19:43:22 +02:00
Gina Häußge
bfcd00e466 Fix: Send non-protocol messages from the printer to clients
Solves #1385
2016-07-14 19:42:43 +02:00
Gina Häußge
20fc7f25bc Fix: Ensure log entries and messages from printer are unicode
Otherwise even one line that can't be converted while sending the
backlog to the client can kill the whole backlog.
2016-07-14 19:20:05 +02:00
Gina Häußge
1e7ea28195 Merge branch 'fix/serialRxBufferHandling' into maintenance 2016-07-13 17:24:13 +02:00
Gina Häußge
937487037a Shorter timeout during heatup & no scary message on end
Set read timeout on serial port to a much shorter value (default 2.0s)
during a heatup. Firmware should usually send the current temperature
back every second, so if that stops we can consider the heatup to be finished
even if we don't see an ok.

That is important in cases such as SD printing, where we might see a
heatup sequence we didn't trigger ourselves, during which we shouldn't spam
the printer with commands it potentially can't process but after which we
still should take up normal communication again. In case of a heatup sequence
triggered by an SD print we won't see an ok and hence only can now through a
timeout that things are now done printer side. In such a case the user should not
get thrown a scary timeout message in their general direction either.

Solves #1409
2016-07-13 17:21:45 +02:00
Gina Häußge
9cd47bc5e2 Merge branch 'maintenance' into devel 2016-07-13 13:11:08 +02:00
Gina Häußge
2cc9631791 Reset printAfterSelect once it's triggered
Should solve #1407
2016-07-13 13:01:33 +02:00
Gina Häußge
27227e271d Don't try to calculate min/max for empty bounding box 2016-07-13 12:50:16 +02:00
Gina Häußge
99ec1efda7 Merge branch 'fix/serialRxBufferHandling' into devel
Conflicts:
	src/octoprint/plugins/virtual_printer/virtual.py
2016-07-12 17:54:07 +02:00
Gina Häußge
2b9aef5874 Keep sending if serial line was only sent partially
So far the sending routine did not track the amount of bytes that were
actually sent. This is now fixed such that if the number of sent bytes
is less then the number of bytes of the whole message, the sending
rountine will continue to send the unsent parts of the message until
it succeeds (or a timeout occurs).

Also adjusted the virtual printer to imitate a real serial interface with
regards to having it return the written bytes and allowing a partial
sending (returning the number of bytes that actually were sent).
2016-07-12 17:48:47 +02:00
Gina Häußge
a33338684e Merge branch 'fix/slicingDocs' into devel 2016-07-12 11:52:59 +02:00
Gina Häußge
58ee5f17f7 Fix simulation of moves on virtual printer 2016-07-08 16:44:40 +02:00
Gina Häußge
9b6b4a9228 Have path set for SD files and strip leading / 2016-07-08 15:45:13 +02:00
Gina Häußge
42e54f0fbc Fix missing path attribute for sd files on API 2016-07-08 15:44:37 +02:00
Gina Häußge
7909672f51 Fix wrong location assignment for selected file 2016-07-08 15:43:48 +02:00
Gina Häußge
5bf5e336ec Extend payload in various events
Added name and path various event print job events and
the upload event, deprecated the file property.

Had to move event triggering of the print job events to
the printer implementation, since the file manager
is not available in the comm layer. Added new callbacks
to the PrinterInterface to allow for that to be possible.
2016-07-08 12:54:58 +02:00
Gina Häußge
3a4902367b New event placeholders for path & origin 2016-07-08 12:52:40 +02:00
Gina Häußge
0fd510a51f Less scary message on config.yaml parsing error 2016-07-08 12:35:46 +02:00
Gina Häußge
55ed4211f9 Fix highlighting of selected file in file list in frontend 2016-07-08 11:14:40 +02:00
Gina Häußge
db2c3bf10b Have frontend's printer state also track file path
Also display it on mouse over on the selected file's name.
2016-07-08 11:13:14 +02:00
Gina Häußge
d91c6256b4 Have GCODE viewer use file path instead of name
That way it should also work for GCODE files contained in folders.
2016-07-08 10:57:33 +02:00
Gina Häußge
dfb8f51238 Extend payload in MetadataAnalysis events
Added name, path and origin, deprecated file property.
2016-07-08 10:50:13 +02:00
Gina Häußge
2e8d104864 Fix resource URLs for files in folders 2016-07-08 10:42:50 +02:00
Gina Häußge
a7fe2d5148 Clean up old AND invalid entries in preemptive cache config 2016-07-07 10:22:37 +02:00
Gina Häußge
d96a91ecc3 Fix modal background of update confirmation not vanishing 2016-07-06 15:30:36 +02:00
Gina Häußge
0015d844a8 Merge branch 'improve/templateErrorResilience' into devel
Conflicts:
	src/octoprint/server/__init__.py
2016-07-06 15:12:19 +02:00
Gina Häußge
924d5c8d7d More error resilience in template rendering
Wrapped potentially external and problematic includes in
custom try-endtry-blocks
2016-07-06 15:09:38 +02:00
Gina Häußge
5126fc1093 Fixed an import error introduced through moving the jinja trycatch extension
(cherry picked from commit 3ea77c7)
2016-07-06 15:03:43 +02:00
Gina Häußge
162c4f11dd Moved jinja ExceptionHandlerExtension to octoprint.util.jinja
(cherry picked from commit 3d0fc8d)
2016-07-06 15:03:34 +02:00
Gina Häußge
240fe70902 Custom try-catch block for jinja
Allows some more error checking in templates. Not used at the moment but
might come in handy in the future.
(cherry picked from commit 7708eea)
2016-07-06 15:01:55 +02:00
Gina Häußge
5802c11689 Fixed a bug (variable not yet defined) 2016-07-06 14:06:38 +02:00
Gina Häußge
07dc0499d0 Merge branch 'gcode_arc_rendering' of https://github.com/eyck/OctoPrint into pr/eyck/gcode_arc_rendering 2016-07-06 13:38:54 +02:00
Gina Häußge
a2cd46899c Merge branch 'improve/intermediaryUrlsAndTimeouts' into devel
Conflicts:
	AUTHORS.md
	src/octoprint/plugins/virtual_printer/virtual.py
2016-07-06 13:32:03 +02:00
Gina Häußge
eeaf68d61a Better timeout defaults for intermediary page
In some situations an error could be displayed otherwise since
online.gif was available, intermediary.gif wasn't anymore, but pinging
the latter timed out before the next ping of the former.

(cherry picked from commit 7809ba8)
2016-07-06 13:16:01 +02:00
Gina Häußge
674d625150 Transfer query & fragment on intermediary page reload
Also user window.location.reload if URL to reload is the same as the current one,
otherwise reloading will be a no-op if a fragment is provided.

(cherry picked from commit a367902)
2016-07-06 13:15:50 +02:00
MoonshineSG
bfecb5fadf fix intermediary.html for url with parameters
(cherry picked from commit 2cc5eaf)
2016-07-06 13:15:34 +02:00
Mark Walker
5eefee3a4d RepRapFirmware style M23 select file
RepRapFirmware enumerates the gcode files starting at /gcode, it will
also interpret any relative path as being relative to that folder.
However a full absolute path will actually interpret as from the real
root of the SD card :-(

(cherry-picked from ac68570)
2016-07-06 05:17:44 +00:00
Mark Walker
02b0e906f1 Allow M23 "File opened" response with no filename
(cherry-picked from ba4b7c0)
2016-07-06 05:17:29 +00:00
Mark Walker
3069e05766 Add RepRapPro style file opened to virtual printer
(cherry-picked from 257c4ed)
Conflicts:
	src/octoprint/plugins/virtual_printer/virtual.py
2016-07-06 05:14:10 +00:00