Compare commits

...
71 Commits
Author SHA1 Message Date
Gina Häußge 14969e5508 Preparing release of 1.2.14 2016-07-28 12:15:22 +02:00
Gina Häußge f671006582 Use circle instead of info symbol for print time left quality indicator 2016-07-28 11:37:27 +02:00
Gina Häußge bd352f4658 Make sure to clear_to_send in timeout handling for active resends 2016-07-28 11:30:23 +02:00
Gina Häußge 046536dd70 If a line is filtered while printing, read next line to continue sending
We want to make sure that while printing we always continue sending something,
either from the command queue or the printed file.
2016-07-28 11:18:57 +02:00
Gina Häußge f9cb29ac91 A bunch of documentation fixes and updates 2016-07-28 09:43:41 +02:00
Gina Häußge fad2e8f1b8 Visual distinction of state panel UI clusters 2016-07-27 18:38:40 +02:00
Gina Häußge f2ecb96c83 Add indicator of origin of print time left estimate to UI 2016-07-27 18:38:17 +02:00
Gina Häußge 0a81e8b161 Use centered text in progress bars
* print progress shows percentage
  * upload progress shows what it always showed, but fully centered
  * GCODE viewer progress shows what it always showed, but fully centered
2016-07-27 15:05:16 +02:00
Gina Häußge eb822c83a3 Add LESS/CSS for (centered) text in progress bars & knockout helper 2016-07-27 15:04:07 +02:00
Gina Häußge ec8427cbb8 Fix a bug causing the "Streaming ..." text to vanish on transfer to SD 2016-07-27 14:46:00 +02:00
Gina Häußge 3585eb05a2 Fix a tiny typo 2016-07-27 10:13:11 +02:00
Gina Häußge 1fd776153c Another attempt at saner print time estimation
Seriously though, this topic is driving me nuts...

  * track origin of print time left estimate
  * less draconian threshold for estimation helper for all prints, not just
    sd prints
  * sanity check estimated/statistical total print time, if not sane force "dumb"
    estimate
  * force "dumb" estimate if no other estimate is available after set percentage or
    print time
2016-07-26 18:06:21 +02:00
Gina Häußge 75012472a2 Revert "Synchronize access to selected file"
This reverts commit b5e19f0676.
2016-07-26 11:18:10 +02:00
Gina Häußge 55d5df7f14 Report CLOSED/CLOSED_WITH_ERROR states as "Offline"
Provide error string for the latter case in state as well.
2016-07-22 10:51:38 +02:00
Gina Häußge 6e73c31a68 Report correct printer state even after disconnecting
Error string on close with error would get lost, that happens no longer
2016-07-22 10:50:48 +02:00
Gina Häußge d7ae147764 Tickle printer on timeout when idle and blocked 2016-07-22 09:46:58 +02:00
Gina Häußge 9eb1485e84 Add max timeouts configuration to settings 2016-07-21 18:46:54 +02:00
Gina Häußge 4f11f6362b Saner defaults for max timeouts
10 max consecutive with 30s default communication timeout
is a bit too long to wait
2016-07-21 18:46:34 +02:00
Gina Häußge 4f1a55c2df Added AWOL debug command to virtual printer 2016-07-21 16:25:49 +02:00
Gina Häußge cfc5f45aa5 Merge branch 'maintenance' into fix/timeoutDetection
Conflicts:
	src/octoprint/settings.py
	src/octoprint/util/comm.py
2016-07-21 16:13:35 +02:00
Gina Häußge 2f26104b98 Better sleep debug command in virtual printer 2016-07-21 16:11:09 +02:00
Gina Häußge b5e19f0676 Synchronize access to selected file 2016-07-21 16:10:57 +02:00
Gina Häußge 3614033b0d No endless circles if we can't write any bytes to serial 2016-07-21 16:10:00 +02:00
Gina Häußge 44ec821294 Track consecutive timeouts
Should allow to detect if a device actually has gone missing.

See #1388
2016-07-21 16:02:28 +02:00
Gina Häußge c6225aa834 Introduce single output method in virtual printer for easier debugging 2016-07-21 13:25:39 +02:00
Gina Häußge 5d21399a73 Custom markdown filter, 3rd party one wasn't thread safe 2016-07-21 11:50:29 +02:00
Gina Häußge d61371a495 Make sure to include all md files in manifest 2016-07-18 12:13:16 +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 297c434d64 Ease up a bit on the version pinning 2016-07-14 11:41:39 +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 2cc9631791 Reset printAfterSelect once it's triggered
Should solve #1407
2016-07-13 13:01:33 +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 0fec3aeca9 Merge branch 'patch-1' of https://github.com/cvignac/OctoPrint into maintenance 2016-07-12 11:52:27 +02:00
cvignac 12fcfda481 Typo correction in slicing.rst
In 'Retrieve all slicing profiles' :
'GET /api/slicing/profiles' -> 'GET /api/slicing'
2016-07-10 15:40:24 +03: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 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 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 bef989961d Added @MoonshineSG to AUTHORS.md 2016-07-06 13:30:28 +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
Gina Häußge 8c80e3ac4a Scalar3D => Vector3D 2016-07-05 14:53:16 +02:00
Gina Häußge 79d660f377 Further GCODE interpreter fixes & optimizations
* Introduce Vector3D type to help with coordinate back and
    forth calculations
  * Fix typo in movement calculation (Y twice instead of Y and Z)
  * Removed some code duplication
2016-07-05 13:22:16 +02:00
Salandora 2ae2405792 Add diff part to retract too because of things like G1 X-10 Y-10 Z1 E-5
(cherry picked from commit de325c3)
2016-07-05 13:16:07 +02:00
Salandora 6e42e3e0ef Add calculation for moves in Z direction
(cherry picked from commit b9cf42f)
2016-07-05 13:16:02 +02:00
Salandora ad3ae405f6 Check for moveType == move instead of x,y,z is not None, otherwise x,y,z,e moves wouldn't be seen as extrude/retract moves
(cherry picked from commit 1b6a46c)
2016-07-05 13:15:55 +02:00
Gina Häußge 93b247b088 Display fuzzy time estimates in frontend 2016-07-05 13:15:20 +02:00
Gina Häußge 6018bf8428 Fix overeager preemptive caching, even on broken protocols 2016-07-04 19:28:20 +02:00
Gina Häußge a49bc9ca75 Fixed wrong placeholders in format string for exception 2016-07-04 19:02:12 +02:00
Gina Häußge cdbc8fcfbd Merge branch 'improve/wrongUploadError' into maintenance 2016-07-04 13:20:30 +02:00
Gina Häußge e453201c1a Better "upload error" message with supported extensions 2016-07-04 13:20:15 +02:00
Gina Häußge ec97765c80 Scroll to uploaded file, highlight it 2016-07-04 13:17:16 +02:00
Gina Häußge be34f7309d Scroll to uploaded file, highlight it 2016-07-04 13:14:38 +02:00
Gina Häußge dbf1273e9d Use first destination extension for default target name 2016-07-02 18:10:05 +02:00
Gina Häußge 944775abde Fixed registered destination extensions in cura plugin 2016-07-02 18:07:59 +02:00
Gina Häußge e7c21b1978 Support alternative source file types in SlicerPlugin
Also limit list of slicers in slicer dialog to compatible slicers.

Implements #935
2016-07-02 18:05:11 +02:00
Gina Häußge 73a85646c5 Added only pause/resume sub commands to job API
Implements #1393
2016-06-30 12:56:18 +02:00
Gina Häußge 0376bc4235 Only use first value for X-Scheme for reverse proxy setup
Solves #1391
2016-06-29 12:16:28 +02:00
Gina Häußge c70708e915 Fixed changelog for 1.2.13
Will stay this way now for 1.2.13 though, already released. Follow up versions
should reflect the contents of the release notes however.
2016-06-16 13:26:30 +02:00
Gina Häußge 01c5b77f7b maintenance branch is now 1.2.14.dev 2016-06-16 13:14:33 +02:00
57 changed files with 2316 additions and 998 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.13
# maintenance is currently the branch for preparation of maintenance release 1.2.14
# so are any fix/... and improve/... branches
maintenance 1.2.13 685ce16c85eea9c4f11586ea99c9a84aca382bd4 pep440-dev
fix/.* 1.2.13 685ce16c85eea9c4f11586ea99c9a84aca382bd4 pep440-dev
improve/.* 1.2.13 685ce16c85eea9c4f11586ea99c9a84aca382bd4 pep440-dev
maintenance 1.2.14 cb2e0d449f607bbc89c7ad13c983a0cf11bbfdee pep440-dev
fix/.* 1.2.14 cb2e0d449f607bbc89c7ad13c983a0cf11bbfdee pep440-dev
improve/.* 1.2.14 cb2e0d449f607bbc89c7ad13c983a0cf11bbfdee 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
+1
View File
@@ -61,6 +61,7 @@ date of first contribution):
* ["geoporalis"](https://github.com/geoporalis)
* [Andrew Malota](https://github.com/2bitoperations)
* [Kyle Evans](https://github.com/kevans91)
* [Ovidiu Hossu](https://github.com/MoonshineSG)
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
[Daid Braam](https://github.com/daid). Parts of its communication layer and
+40 -1
View File
@@ -1,12 +1,51 @@
# OctoPrint Changelog
## 1.2.14 (2016-07-28)
### Improvements
* [#935](https://github.com/foosel/OctoPrint/issues/935) - Support alternative source file types and target extensions in [SlicerPlugins](http://docs.octoprint.org/en/master/plugins/mixins.html#slicerplugin).
* [#1393](https://github.com/foosel/OctoPrint/issues/1393) - Added dedicated sub commands on the job API to pause and resume a print job (instead of only offering a toggle option).
* Better "upload error" message with a list of supported extensions (instead of hardcoded ones)
* Use fuzzy times for print time estimation from GCODE analysis
* Allow M23 "File opened" response with no filename (RepRapPro)
* Allow intermediary startup page to forward query parameters and fragments from initial call to actual web frontend
* More error resilience when rendering templates (e.g. from plugins)
* Make sure that all bytes of a line to send to the printer have actually been sent
* "Tickle" printer when encountering a communication timeout while idle
* Report `CLOSED`/`CLOSED_WITH_ERROR` states as "Offline" in frontend for more consistency with startup `NONE` state which already was reported as "Offline"
* Another attempt at a saner print time estimation: Force linear (way less accurate) estimate if calculation of more accurate version takes too long, sanity check calculated estimate and use linear estimate if it looks wrong, improved threshold values for calculation. Read [the second half of this post on the mailing list](https://groups.google.com/forum/#!msg/octoprint/WWpm1FCUkAs/X3HomTM5DgAJ) on why accurate print time estimation is so difficult to achieve.
* Display print job progress percentage on progress bar.
* Added an indicator for print time left prediction accuracy and explanation of its origin as tooltip.
* Improved visual distinction of "State" sidebar panel info clusters.
### Bug Fixes
* [#1385](https://github.com/foosel/OctoPrint/issues/1385) - Send all non-protocol messages from printer to clients.
* [#1388](https://github.com/foosel/OctoPrint/issues/1388) - Track consecutive timeouts even when idle and disconnect from printer when it's not responding any longer.
* [#1391](https://github.com/foosel/OctoPrint/issues/1391) - Only use the first value from the X-Scheme header for the reverse proxy setup. Otherwise there could be problems when multiple reverse proxies were configured chained together, each adding their own header to the mix.
* [#1407](https://github.com/foosel/OctoPrint/issues/1407) - If a file is uploaded with the "print" flag set to true, make sure to clear that flag after the print job has been triggered so that now all following uploaded or selected files will start printing on their own.
* [#1409](https://github.com/foosel/OctoPrint/issues/1409) - Don't report a communication timeout after a heatup triggered by a print from SD.
* Fixed scrolling to freshly uploaded files, also now highlighting the file entry for better visibility.
* Fixed overeager preemptive caching of invalid protocols.
* Fix modal background of update confirmation not vanishing
* Ensure log entries and messages from printer are sent to frontend already converted to utf-8. Otherwise even one line in the log that can't be converted automatically without error can cause updates from the backend to not arrive.
* Report correct printer state including error strings even after disconnecting
* While printing, be sure to read the next line from file and send that if the current line was filtered
* Small fixes in the GCODE analysis
* Small fixes in the documentation
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.13...1.2.14))
## 1.2.13 (2016-06-16)
### Bug Fixes
* [#1373](https://github.com/foosel/OctoPrint/issues/1373): Don't parse `B:` as bed temperature when it shows up as part of a position report from `M114`.
* [#1374](https://github.com/foosel/OctoPrint/issues/1374): Don't try to perform a passive login when the components we'd need to inform about a change in login state aren't yet available. Solves a bug that lead - among other things - to the Plugin Manager and the Software Update Plugin not showing anything but misleading errors until the user logged out and back in.
* Fixed the temperature graph looking staying uninitialized until a connection to a printer was established.
* Fixed the temperature graph staying uninitialized until a connection to a printer was established.
* Fixed an error causing issues during frontend startup if the browser doesn't support tracking browser visibility.
* Fixed an error causing issues during frontend startup if the browser doesn't support the capabilities needed for the GCODE viewer.
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.12...1.2.13))
+2 -4
View File
@@ -4,8 +4,6 @@ recursive-include src/octoprint/plugins *
recursive-include src/octoprint/translations *
include versioneer.py
include src/octoprint/_version.py
include AUTHORS.md
include CHANGELOG.md
include LICENSE
include README.md
include requirements.txt
include *.md
exclude CONTRIBUTING.md
+15 -10
View File
@@ -7,34 +7,37 @@ thanks to everyone who contributed!
## Patreon Patrons
* 3D Moniak
* alephobjects
* alephobjects
* Andrew Moorby
* Arnljot Arntsen
* Aurelio Bernal Ramírez
* Bart Zudell
* Brad Jackson
* Brad Mooneyham
* Brent Fiegle
* Brian E. Tyler
* Charles Mitchell
* Christian Petropolis
* COLLE+McVOY
* CreativeTools
* COLLE+McVOY
* CreativeTools
* D Brian Kimmel
* DeltaMaker 3D Printers
* Doug Johnson
* E3D BigBox
* Erik de Bruijn
* Ernesto Martinez
* Exovite
* Exovite
* Frank Sander
* georgeroblesjr
* georgeroblesjr
* Gregor Luetolf
* J. Eckert
* Jason Galarneau
* Joe Korzeniewski
* Joshua Gregory
* Kaile Riser
* Kale Stedman
* Kevin Freeheart
* Kazuhiro Ogura
* Korneel Bullens
* Kyle Gress
* Makespace Madrid
* Mark Lane
@@ -43,18 +46,20 @@ thanks to everyone who contributed!
* Masayoshi Mitsui
* Michael McDargh
* Miguel Angel Salmeron
* Mikey
* Mikey
* Miles Flavel
* Mohammed Khorakiwala
* Noe Ruiz
* Paul Generes
* Peter Grace
* Peter Schmehl
* PRINT3Dforum.com
* Roger Strolz
* Roy Cortes
* Samer Najia
* SD3D
* SD3D
* Shane Ekerbicer
* Simon
* Simon Hallam
* Stefan Krister
* stefi davis
* Steven Pearson
@@ -63,4 +68,4 @@ thanks to everyone who contributed!
* Thomas Sanladerer
* Trent Shumay
and 734 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
and 844 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
+3 -2
View File
@@ -390,8 +390,9 @@ Issue a file command
}
:param target: The target location on which to delete the file, either ``local`` (for OctoPrint's ``uploads``
folder) or ``sdcard`` for the printer's SD card (if available)
:param target: The target location on which the file to send the command for is located, either
``local`` (for OctoPrint's ``uploads`` folder) or ``sdcard`` for the printer's SD card
(if available)
:param filename: The filename of the file for which to issue the command
:json string command: The command to issue for the file, currently only ``select`` is supported
:json boolean print: ``select`` and ``slice`` command: Optional, whether to start printing the file directly after selection
+67 -9
View File
@@ -19,17 +19,38 @@ Issue a job command
Starts the print of the currently selected file. For selecting a file, see :ref:`Issue a file command <sec-api-fileops-filecommand>`.
If a print job is already active, a :http:statuscode:`409` will be returned.
cancel
Cancels the current print job. If no print job is active (either paused or printing), a :http:statuscode:`409`
will be returned.
restart
Restart the print of the currently selected file from the beginning. There must be an active print job for this to work
and the print job must currently be paused. If either is not the case, a :http:statuscode:`409` will be returned.
pause
Pauses/unpauses the current print job. If no print job is active (either paused or printing), a :http:statuscode:`409`
will be returned.
Equivalent to issuing a ``cancel`` command while paused, directly followed by a ``start`` command.
cancel
Cancels the current print job. If no print job is active (either paused or printing), a :http:statuscode:`409`
will be returned.
pause
Pauses/resumes/toggles the current print job. Accepts one optional additional parameter ``action``
specifying which action to take. Valid values for this parameter are:
pause
Pauses the current job if it's printing, does nothing if it's already paused.
resume
Resumes the current job if it's paused, does nothing if it's printing.
toggle
Toggles the pause state of the job, pausing it if it's printing and resuming it if it's currently paused.
In order to stay backwards compatible to earlier iterations of this API, the default
action to take if no ``action`` parameter is supplied is to toggle the print job status.
If no print job is active (either paused or printing), a :http:statuscode:`409` will be returned.
.. note::
While the approach to implement pause/resume/toggle behaviour through sub commands via the ``action``
parameter instead of having dedicated ``pause``, ``resume`` and ``toggle`` commands seems clumsy, this path
was chosen to have the API stay backwards compatible to prior versions which only offered the toggle
behaviour under the ``pause`` command.
Upon success, a status code of :http:statuscode:`204` and an empty body is returned.
@@ -50,6 +71,23 @@ Issue a job command
HTTP/1.1 204 No Content
**Example Cancel Request**
.. sourcecode:: http
POST /api/job HTTP/1.1
Host: example.com
Content-Type: application/json
X-Api-Key: abcdef...
{
"command": "cancel"
}
.. sourcecode:: http
HTTP/1.1 204 No Content
**Example Restart Request**
.. sourcecode:: http
@@ -77,14 +115,15 @@ Issue a job command
X-Api-Key: abcdef...
{
"command": "pause"
"command": "pause",
"action": "pause"
}
.. sourcecode:: http
HTTP/1.1 204 No Content
**Example Cancel Request**
**Example Resume Request**
.. sourcecode:: http
@@ -94,7 +133,26 @@ Issue a job command
X-Api-Key: abcdef...
{
"command": "cancel"
"command": "pause",
"action": "resume"
}
.. sourcecode:: http
HTTP/1.1 204 No Content
**Example Pause Toggle Request**
.. sourcecode:: http
POST /api/job HTTP/1.1
Host: example.com
Content-Type: application/json
X-Api-Key: abcdef...
{
"command": "pause",
"action": "toggle"
}
.. sourcecode:: http
+1 -1
View File
@@ -32,7 +32,7 @@ List All Slicers and Slicing Profiles
.. sourcecode:: http
GET /api/slicing/profiles HTTP/1.1
GET /api/slicing HTTP/1.1
Host: example.com
X-Api-Key: abcdef...
+116 -3
View File
@@ -244,6 +244,9 @@ The following settings are only relevant to you if you want to do OctoPrint deve
# be fully rerendered on request to / on the server.
enabled: true
# Whether to enable the preemptive cache
preemptive: true
# Settings for stylesheet preference. OctoPrint will prefer to use the stylesheet type
# specified here. Usually (on a production install) that will be the compiled css (default).
# Developers may specify less here too.
@@ -260,6 +263,9 @@ The following settings are only relevant to you if you want to do OctoPrint deve
# set to false, no minification will take place either.
minify: true
# Whether to delete generated web assets on server startup (forcing a regeneration)
clean_on_startup: true
# Settings for the virtual printer
virtualPrinter:
@@ -290,6 +296,14 @@ The following settings are only relevant to you if you want to do OctoPrint deve
# < ok T0:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
includeCurrentToolInTemps: true
# Whether to include the selected filename in the M23 File opened response.
#
# True: > M23 filename.gcode
# < File opened: filename.gcode Size: 27
# False: > M23 filename.gcode
# > File opened
includeFilenameInOpened: true
# The maximum movement speeds of the simulated printer's axes, in mm/s
movementSpeed:
x: 6000
@@ -313,6 +327,10 @@ The following settings are only relevant to you if you want to do OctoPrint deve
# < ok T0:34.3/220.0 T1:23.5/0.0 B:43.2/0.0
repetierStyleTargetTemperature: false
# If enabled, uses repetier style resends, sending multiple resends for the same line
# to make sure nothing gets lost on the line
repetierStyleResends: false
# If enabled, reports the first extruder in M105 responses as T instead of T0
#
# True: > M105
@@ -340,9 +358,54 @@ The following settings are only relevant to you if you want to do OctoPrint deve
# side will block
rxBuffer: 64
# Size of
# Size of simulated command buffer
commandBuffer: 4
# Whether to support the M112 command with simulated kill
supportM112: true
# Whether to send messages received via M117 back as "echo:" lines
echoOnM117: true
# Whether to simulate broken M29 behaviour (missing ok after response)
brokenM29: true
.. _sec-configuration-config_yaml-estimation:
Estimation
----------
The following settings provide parameters for estimators within OctoPrint. Currently only
the estimation of the left print time during an active job utilizes this section.
.. code-block:: yaml
estimation:
# Parameters for the print time estmation during an ongoing print job
printTime:
# Until which percentage to do a weighted mixture of statistical duration (analysis or
# past prints) with the result from the calculated estimate if that's already available.
# Utilized to compensate for the fact that the earlier in a print job, the least accuracy
# even a stable calculated estimate provides.
statsWeighingUntil: 0.5
# Range the assumed percentage (based on current estimated statistical, calculated or mixed
# total vs elapsed print time so far) needs to be around the actual percentage for the
# result to be used
validityRange: 0.15
# If no estimate could be calculated until this percentage and no statistical data is available,
# use dumb linear estimate
forceDumbFromPercent: 0.3
# If no estimate could be calculated until this many minutes into the print and no statistical
# data is available, use dumb linear estimate
forceDumbAfterMin: 30
# Average fluctuation between individual calculated estimates to consider in stable range. Seconds
# of difference.
stableThreshold: 60
.. _sec-configuration-config_yaml-events:
Events
@@ -426,6 +489,9 @@ Use the following settings to enable or disable OctoPrint features:
# Specifies whether support for SD printing and file management should be enabled
sdSupport: true
# Specifies whether firmware expects relative paths for selecting SD files
sdRelativePath: false
# Whether to always assume that an SD card is present in the printer.
# Needed by some firmwares which don't report the SD card status properly.
sdAlwaysAvailable: false
@@ -443,6 +509,16 @@ Use the following settings to enable or disable OctoPrint features:
# Whether to enable the keyboard control feature in the control tab
keyboardControl: true
# Whether to actively poll the watched folder (true) or to rely on the OS's file system
# notifications instead (false)
pollWatched: false
# Whether to ignore identical resends from the printer (true, repetier) or not (false)
ignoreIdenticalResends: false
# If ignoredIdenticalResends is true, how many consecutive identical resends to ignore
identicalResendsCount: 7
.. _sec-configuration-config_yaml-folder:
Folder
@@ -629,8 +705,24 @@ Use the following settings to configure the serial connection to the printer:
# Command to send in order to initiate a handshake with the printer.
# Defaults to "M110 N0" which simply resets the line numbers in the firmware and which
# should be acknowledged with a simple "ok".
helloCommand:
- M110 N0
helloCommand: M110 N0
# Whether to disconnect on errors or not
disconnectOnErrors: true
# Whether to completely ignore errors from the firmware or not
ignoreErrorsFromFirmware: false
# Whether to log resends to octoprint.log or not. Invaluable debug tool without performance
# impact, leave on if possible please
logResends: true
# Whether to support resends without follow-up ok or not
supportResendsWithoutOk: false
# Whether to "manually" trigger an ok for M29 (a lot of versions of this command are buggy and
# the responds skips on the ok)
triggerOkForM29: true
.. _sec-configuration-config_yaml-server:
@@ -725,6 +817,27 @@ Use the following settings to configure the server:
# Command to shut down the system OctoPrint is running on, defaults to being unset
systemShutdownCommand: sudo shutdown -h now
# Settings of when to display what disk space warning
diskspace:
# Threshold (bytes) after which to consider disk space becoming sparse,
# defaults to 500MB
warning: 63488000
# Threshold (bytes) after which to consider disk space becoming critical,
# defaults to 200MB
critical: 209715200
# Configuration of the preemptive cache
preemptiveCache:
# which server paths to exclude from the preemptive cache
exceptions:
- /some/path
# How many days to leave unused entries in the preemptive cache config
until: 7
.. note::
+24 -24
View File
@@ -15,26 +15,26 @@ import octoprint_setuptools
# Requirements for our application
INSTALL_REQUIRES = [
"flask>=0.9,<0.11",
"werkzeug==0.8.3",
"tornado==4.0.1",
"sockjs-tornado==1.0.1",
"PyYAML==3.10",
"Flask-Login==0.2.2",
"Flask-Principal==0.3.5",
"Flask-Babel==0.9",
"Flask-Assets==0.10",
"Flask-Markdown==0.3",
"pyserial==2.7",
"netaddr==0.7.17",
"watchdog==0.8.3",
"sarge==0.1.4",
"netifaces==0.10",
"pylru==1.0.9",
"rsa==3.2",
"pkginfo==1.2.1",
"requests==2.7.0",
"semantic_version==2.4.2",
"psutil==3.2.1",
"werkzeug>=0.8.3,<0.9",
"tornado>=4.0.1,<4.1",
"sockjs-tornado>=1.0.1,<1.1",
"PyYAML>=3.10,<3.11",
"Flask-Login>=0.2.2,<0.3",
"Flask-Principal>=0.3.5,<0.4",
"Flask-Babel>=0.9,<0.10",
"Flask-Assets>=0.10,<0.11",
"markdown>=2.6.4,<2.7",
"pyserial>=2.7,<2.8",
"netaddr>=0.7.17,<0.8",
"watchdog>=0.8.3,<0.9",
"sarge>=0.1.4,<0.2",
"netifaces>=0.10,<0.11",
"pylru>=1.0.9,<1.1",
"rsa>=3.2,<3.3",
"pkginfo>=1.2.1,<1.3",
"requests>=2.7.0,<2.8",
"semantic_version>=2.4.2,<2.5",
"psutil>=3.2.1,<3.3",
"awesome-slugify>=1.6.5,<1.7",
"feedparser>=5.2.1,<5.3"
]
@@ -44,12 +44,12 @@ EXTRA_REQUIRES = dict(
# Dependencies for developing OctoPrint
develop=[
# Testing dependencies
"mock>=1.0.1",
"nose>=1.3.0",
"mock>=1.0.1,<1.1",
"nose>=1.3.0,<1.4",
"ddt",
# Documentation dependencies
"sphinx>=1.3",
"sphinx>=1.3,<1.4",
"sphinxcontrib-httpdomain",
"sphinx_rtd_theme",
@@ -59,7 +59,7 @@ EXTRA_REQUIRES = dict(
# Dependencies for developing OctoPrint plugins
plugins=[
"cookiecutter"
"cookiecutter>=1.4,<1.5"
]
)
+1 -1
View File
@@ -284,7 +284,7 @@ class FileManager(object):
import time
start_time = time.time()
eventManager().fire(Events.SLICING_STARTED, {"stl": source_path, "gcode": dest_path, "progressAvailable": slicer.get_slicer_properties()["progress_report"] if slicer else False})
eventManager().fire(Events.SLICING_STARTED, {"stl": source_path, "gcode": dest_path, "progressAvailable": slicer.get_slicer_properties().get("progress_report", False) if slicer else False})
import tempfile
f = tempfile.NamedTemporaryFile(suffix=".gco", delete=False)
+2 -2
View File
@@ -398,7 +398,7 @@ class LocalFileStorage(StorageInterface):
folder_path = os.path.join(path, name)
if os.path.exists(folder_path):
if not ignore_existing:
raise RuntimeError("{sanitized_foldername} does already exist in {virtual_path}".format(**locals()))
raise RuntimeError("{name} does already exist in {path}".format(**locals()))
else:
os.mkdir(folder_path)
@@ -415,7 +415,7 @@ class LocalFileStorage(StorageInterface):
if ".metadata.yaml" in contents:
contents.remove(".metadata.yaml")
if contents and not recursive:
raise RuntimeError("{sanitized_foldername} in {virtual_path} is not empty".format(**locals()))
raise RuntimeError("{name} in {path} is not empty".format(**locals()))
import shutil
shutil.rmtree(folder_path)
+10 -1
View File
@@ -1067,6 +1067,13 @@ class SlicerPlugin(OctoPrintPlugin):
against slicers running on the same device will result in an error.
progress_report
``True`` if the slicer can report back slicing progress to OctoPrint ``False`` otherwise.
source_file_types
A list of file types this slicer supports as valid origin file types. These are file types as found in the
paths within the extension tree. Plugins may add additional file types through the :ref:`sec-plugins-hook-filemanager-extensiontree` hook.
The system will test source files contains in incoming slicing requests via :meth:`octoprint.filemanager.valid_file_type` against the
targeted slicer's ``source_file_types``.
destination_extension
The possible extensions of slicing result files.
Returns:
dict: A dict describing the slicer as outlined above.
@@ -1075,7 +1082,9 @@ class SlicerPlugin(OctoPrintPlugin):
type=None,
name=None,
same_device=True,
progress_report=False
progress_report=False,
source_file_types=["model"],
destination_extensions=["gco", "gcode", "g"]
)
def get_slicer_default_profile(self):
+3 -1
View File
@@ -166,7 +166,9 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
type="cura",
name="CuraEngine",
same_device=True,
progress_report=True
progress_report=True,
source_file_types=["stl"],
destination_extensions=["gco", "gcode", "g"]
)
def get_slicer_default_profile(self):
@@ -342,7 +342,7 @@ $(function() {
};
self.confirmUpdate = function() {
self.confirmationDialog.hide();
self.confirmationDialog.modal("hide");
self.performUpdate(self.forceUpdate,
_.map(self.availableAndPossible(), function(info) { return info.key }));
};
+154 -64
View File
@@ -16,7 +16,7 @@ from serial import SerialTimeoutException
from octoprint.settings import settings
from octoprint.plugin import plugin_manager
class VirtualPrinter():
class VirtualPrinter(object):
command_regex = re.compile("[GM]\d+")
sleep_regex = re.compile("sleep (\d+)")
sleep_after_regex = re.compile("sleep_after ([GM]\d+) (\d+)")
@@ -25,17 +25,19 @@ class VirtualPrinter():
def __init__(self, read_timeout=5.0, write_timeout=10.0):
import logging
self._logger = logging.getLogger("octoprint.plugin.virtual_printer.VirtualPrinter")
self._logger = logging.getLogger("octoprint.plugins.virtual_printer.VirtualPrinter")
self._read_timeout = read_timeout
self._write_timeout = write_timeout
self.incoming = CharCountingQueue(settings().getInt(["devel", "virtualPrinter", "rxBuffer"]), name="RxBuffer")
self._rx_buffer_size = settings().getInt(["devel", "virtualPrinter", "rxBuffer"])
self.incoming = CharCountingQueue(self._rx_buffer_size, name="RxBuffer")
self.outgoing = Queue.Queue()
self.buffered = Queue.Queue(maxsize=settings().getInt(["devel", "virtualPrinter", "commandBuffer"]))
for item in ['start\n', 'Marlin: Virtual Marlin!\n', '\x80\n', 'SD card ok\n']:
self.outgoing.put(item)
self._output(item)
self.currentExtruder = 0
self.temp = [0.0] * settings().getInt(["devel", "virtualPrinter", "numExtruders"])
@@ -80,6 +82,8 @@ class VirtualPrinter():
self._incoming_lock = threading.RLock()
self._debug_awol = False
self._debug_sleep = None
self._sleepAfterNext = dict()
self._sleepAfter = dict()
@@ -95,19 +99,37 @@ class VirtualPrinter():
self._triggerResendWithTimeoutAt105 = True
self._triggeredResendWithTimeoutAt105 = False
waitThread = threading.Thread(target=self._sendWaitAfterTimeout)
waitThread = threading.Thread(target=self._sendWaitAfterTimeout, name="octoprint.plugins.virtual_printer.wait_thread")
waitThread.start()
readThread = threading.Thread(target=self._processIncoming)
readThread = threading.Thread(target=self._processIncoming, name="octoprint.plugins.virtual_printer.read_thread")
readThread.start()
bufferThread = threading.Thread(target=self._processBuffer)
bufferThread = threading.Thread(target=self._processBuffer, name="octoprint.plugins.virtual_printer.buffer_thread")
bufferThread.start()
def __str__(self):
return "VIRTUAL(read_timeout={read_timeout},write_timeout={write_timeout},options={options})"\
.format(read_timeout=self._read_timeout, write_timeout=self._write_timeout, options=settings().get(["devel", "virtualPrinter"]))
@property
def timeout(self):
return self._read_timeout
@timeout.setter
def timeout(self, value):
self._logger.debug("Setting read timeout to {}s".format(value))
self._read_timeout = value
@property
def write_timeout(self):
return self._write_timeout
@write_timeout.setter
def write_timeout(self, value):
self._logger.debug("Setting write timeout to {}s".format(value))
self._write_timeout = value
def _clearQueue(self, queue):
try:
while queue.get(block=False):
@@ -117,17 +139,26 @@ class VirtualPrinter():
def _processIncoming(self):
next_wait_timeout = time.time() + self._waitInterval
buf = ""
while self.incoming is not None and not self._killed:
self._simulateTemps()
try:
data = self.incoming.get(timeout=0.01)
self.incoming.task_done()
except Queue.Empty:
if self._sendWait and time.time() > next_wait_timeout:
self.outgoing.put("wait")
self._output("wait")
next_wait_timeout = time.time() + self._waitInterval
continue
buf += data
if "\n" in buf:
data = buf[:buf.find("\n") + 1]
buf = buf[buf.find("\n") + 1:]
else:
continue
next_wait_timeout = time.time() + self._waitInterval
if data is None:
@@ -149,7 +180,7 @@ class VirtualPrinter():
self.currentLine += 1
elif settings().getBoolean(["devel", "virtualPrinter", "forceChecksum"]):
self.outgoing.put("Error: Missing checksum")
self._output("Error: Missing checksum")
continue
# track N = N + 1
@@ -195,7 +226,7 @@ class VirtualPrinter():
if data.strip() == "version":
from octoprint._version import get_versions
self.outgoing.put("OctoPrint VirtualPrinter v" + get_versions()["version"])
self._output("OctoPrint VirtualPrinter v" + get_versions()["version"])
continue
elif data.startswith("!!DEBUG:"):
self._debugTrigger(data[len("!!DEBUG:"):].strip())
@@ -219,7 +250,7 @@ class VirtualPrinter():
self._listSd()
elif 'M21' in data:
self._sdCardReady = True
self.outgoing.put("SD card ok")
self._output("SD card ok")
elif 'M22' in data:
self._sdCardReady = False
elif 'M23' in data:
@@ -257,18 +288,18 @@ class VirtualPrinter():
output = "X:10.00 Y:3.20 Z:5.20 E:1.24 Count: A:1000 B:320 C:1040"
if not self._okBeforeCommandOutput:
output = "ok " + output
self.outgoing.put(output)
self._output(output)
continue
elif "M117" in data:
# we'll just use this to echo a message, to allow playing around with pause triggers
if self._echoOnM117:
self.outgoing.put("echo:%s" % re.search("M117\s+(.*)", data).group(1))
self._output("echo:%s" % re.search("M117\s+(.*)", data).group(1))
elif "M999" in data:
# mirror Marlin behaviour
self.outgoing.put("Resend: 1")
self._output("Resend: 1")
elif data.startswith("T"):
self.currentExtruder = int(re.search("T(\d+)", data).group(1))
self.outgoing.put("Active Extruder: %d" % self.currentExtruder)
self._output("Active Extruder: %d" % self.currentExtruder)
elif "G20" in data:
self._unitModifier = 1.0 / 2.54
if self._lastX is not None:
@@ -316,12 +347,14 @@ class VirtualPrinter():
del self._sleepAfterNext[command]
if interval is not None:
self.outgoing.put("// sleeping for {interval} seconds".format(interval=interval))
self._output("// sleeping for {interval} seconds".format(interval=interval))
time.sleep(interval)
if len(data.strip()) > 0 and not self._okBeforeCommandOutput:
self._sendOk()
self._logger.info("Closing down read loop")
def _calculate_checksum(self, line):
checksum = 0
for c in line:
@@ -332,7 +365,7 @@ class VirtualPrinter():
if not self._supportM112:
return
self._killed = True
self.outgoing.put("echo:EMERGENCY SHUTDOWN DETECTED. KILLED.")
self._output("echo:EMERGENCY SHUTDOWN DETECTED. KILLED.")
def _triggerResend(self, expected=None, actual=None):
with self._incoming_lock:
@@ -342,13 +375,13 @@ class VirtualPrinter():
self.lastN = expected - 1
if actual is None:
self.outgoing.put("Error: Wrong checksum")
self._output("Error: Wrong checksum")
else:
self.outgoing.put("Error: expected line %d got %d" % (expected, actual))
self._output("Error: expected line %d got %d" % (expected, actual))
def request_resend():
self.outgoing.put("Resend:%d" % expected)
self.outgoing.put("ok")
self._output("Resend:%d" % expected)
self._output("ok")
if settings().getBoolean(["devel", "virtualPrinter", "repetierStyleResends"]):
request_resend()
@@ -356,11 +389,11 @@ class VirtualPrinter():
def _debugTrigger(self, data):
if data == "action_pause":
self.outgoing.put("// action:pause")
self._output("// action:pause")
elif data == "action_resume":
self.outgoing.put("// action:resume")
self._output("// action:resume")
elif data == "action_disconnect":
self.outgoing.put("// action:disconnect")
self._output("// action:disconnect")
elif data == "dont_answer":
self._dont_answer = True
elif data == "trigger_resend_lineno":
@@ -370,7 +403,10 @@ class VirtualPrinter():
elif data == "drop_connection":
self._debug_drop_connection = True
elif data == "maxtemp_error":
self.outgoing.put("Error: MAXTEMP triggered!")
self._output("Error: MAXTEMP triggered!")
elif data == "go_awol":
self._output("// Going AWOL")
self._debug_awol = True
else:
try:
sleep_match = VirtualPrinter.sleep_regex.match(data)
@@ -380,28 +416,28 @@ class VirtualPrinter():
if sleep_match is not None:
interval = int(sleep_match.group(1))
self.outgoing.put("// sleeping for {interval} seconds".format(interval=interval))
time.sleep(interval)
self._output("// sleeping for {interval} seconds".format(interval=interval))
self._debug_sleep = interval
elif sleep_after_match is not None:
command = sleep_after_match.group(1)
interval = int(sleep_after_match.group(2))
self._sleepAfter[command] = interval
self.outgoing.put("// going to sleep {interval} seconds after each {command}".format(**locals()))
self._output("// going to sleep {interval} seconds after each {command}".format(**locals()))
elif sleep_after_next_match is not None:
command = sleep_after_next_match.group(1)
interval = int(sleep_after_next_match.group(2))
self._sleepAfterNext[command] = interval
self.outgoing.put("// going to sleep {interval} seconds after next {command}".format(**locals()))
self._output("// going to sleep {interval} seconds after next {command}".format(**locals()))
elif custom_action_match is not None:
action = custom_action_match.group(1)
params = custom_action_match.group(2)
params = params.strip() if params is not None else ""
self.outgoing.put("// action:{action} {params}".format(**locals()).strip())
self._output("// action:{action} {params}".format(**locals()).strip())
except:
pass
def _listSd(self):
self.outgoing.put("Begin file list")
self._output("Begin file list")
if settings().getBoolean(["devel", "virtualPrinter", "extendedSdFileList"]):
items = map(
lambda x: "%s %d" % (x.upper(), os.stat(os.path.join(self._virtualSd, x)).st_size),
@@ -413,20 +449,23 @@ class VirtualPrinter():
os.listdir(self._virtualSd)
)
for item in items:
self.outgoing.put(item)
self.outgoing.put("End file list")
self._output(item)
self._output("End file list")
def _selectSdFile(self, filename):
if filename.startswith("/"):
filename = filename[1:]
file = os.path.join(self._virtualSd, filename.lower())
if not os.path.exists(file) or not os.path.isfile(file):
self.outgoing.put("open failed, File: %s." % filename)
self._output("open failed, File: %s." % filename)
else:
self._selectedSdFile = file
self._selectedSdFileSize = os.stat(file).st_size
self.outgoing.put("File opened: %s Size: %d" % (filename, self._selectedSdFileSize))
self.outgoing.put("File selected")
if settings().getBoolean(["devel", "virtualPrinter", "includeFilenameInOpened"]):
self._output("File opened: %s Size: %d" % (filename, self._selectedSdFileSize))
else:
self._output("File opened")
self._output("File selected")
def _startSdPrint(self):
if self._selectedSdFile is not None:
@@ -443,9 +482,9 @@ class VirtualPrinter():
def _reportSdStatus(self):
if self._sdPrinter is not None and self._sdPrintingSemaphore.is_set:
self.outgoing.put("SD printing byte %d/%d" % (self._selectedSdFilePos, self._selectedSdFileSize))
self._output("SD printing byte %d/%d" % (self._selectedSdFilePos, self._selectedSdFileSize))
else:
self.outgoing.put("Not SD printing")
self._output("Not SD printing")
def _processTemperatureQuery(self):
includeTarget = not settings().getBoolean(["devel", "virtualPrinter", "repetierStyleTargetTemperature"])
@@ -482,7 +521,7 @@ class VirtualPrinter():
if includeOk:
output = "ok " + output
self.outgoing.put(output)
self._output(output)
def _parseHotendCommand(self, line):
tool = 0
@@ -504,7 +543,7 @@ class VirtualPrinter():
if "M109" in line:
self._waitForHeatup("tool%d" % tool)
if settings().getBoolean(["devel", "virtualPrinter", "repetierStyleTargetTemperature"]):
self.outgoing.put("TargetExtr%d:%d" % (tool, self.targetTemp[tool]))
self._output("TargetExtr%d:%d" % (tool, self.targetTemp[tool]))
def _parseBedCommand(self, line):
try:
@@ -515,7 +554,7 @@ class VirtualPrinter():
if "M190" in line:
self._waitForHeatup("bed")
if settings().getBoolean(["devel", "virtualPrinter", "repetierStyleTargetTemperature"]):
self.outgoing.put("TargetBed:%d" % self.bedTargetTemp)
self._output("TargetBed:%d" % self.bedTargetTemp)
def _performMove(self, line):
matchX = re.search("X([0-9.]+)", line)
@@ -566,10 +605,13 @@ class VirtualPrinter():
pass
if duration:
slept = 0
while duration - slept > self._read_timeout and not self._killed:
time.sleep(self._read_timeout)
slept += self._read_timeout
if duration > self._read_timeout:
slept = 0
while duration - slept > self._read_timeout and not self._killed:
time.sleep(self._read_timeout)
slept += self._read_timeout
else:
time.sleep(duration)
def _setPosition(self, line):
matchX = re.search("X([0-9.]+)", line)
@@ -609,13 +651,13 @@ class VirtualPrinter():
if os.path.isfile(file):
os.remove(file)
else:
self.outgoing.put("error writing to file")
self._output("error writing to file")
handle = None
try:
handle = open(file, "w")
except:
self.outgoing.put("error writing to file")
self._output("error writing to file")
if handle is not None:
try:
handle.close()
@@ -624,7 +666,7 @@ class VirtualPrinter():
self._writingToSdHandle = handle
self._writingToSd = True
self._selectedSdFile = file
self.outgoing.put("Writing to file: %s" % filename)
self._output("Writing to file: %s" % filename)
def _finishSdFile(self):
try:
@@ -635,7 +677,7 @@ class VirtualPrinter():
self._writingToSdHandle = None
self._writingToSd = False
self._selectedSdFile = None
self.outgoing.put("Done saving file")
self._output("Done saving file")
def _sdPrintingWorker(self):
self._selectedSdFilePos = 0
@@ -673,7 +715,7 @@ class VirtualPrinter():
self._sdPrintingSemaphore.clear()
self._selectedSdFilePos = 0
self._sdPrinter = None
self.outgoing.put("Done printing file")
self._output("Done printing file")
def _waitForHeatup(self, heater):
delta = 1
@@ -684,12 +726,12 @@ class VirtualPrinter():
toolNum = int(heater[len("tool"):])
while not self._killed and (self.temp[toolNum] < self.targetTemp[toolNum] - delta or self.temp[toolNum] > self.targetTemp[toolNum] + delta):
self._simulateTemps(delta=delta)
self.outgoing.put("T:%0.2f" % self.temp[toolNum])
self._output("T:%0.2f" % self.temp[toolNum])
time.sleep(delay)
elif heater == "bed":
while not self._killed and (self.bedTemp < self.bedTargetTemp - delta or self.bedTemp > self.bedTargetTemp + delta):
self._simulateTemps(delta=delta)
self.outgoing.put("B:%0.2f" % self.bedTemp)
self._output("B:%0.2f" % self.bedTemp)
time.sleep(delay)
except AttributeError:
if self.outgoing is not None:
@@ -732,34 +774,73 @@ class VirtualPrinter():
continue
self._performMove(line)
self.buffered.task_done()
self._logger.info("Closing down buffer loop")
def _output(self, line):
try:
self.outgoing.put(line)
except:
if self.outgoing is None:
pass
def write(self, data):
if self._debug_awol:
return len(data)
if self._debug_drop_connection:
self._logger.info("Debug drop of connection requested, raising SerialTimeoutException")
raise SerialTimeoutException()
with self._incoming_lock:
if self.incoming is None or self.outgoing is None:
return
return 0
if "M112" in data and self._supportM112:
self._kill()
return
return len(data)
try:
self.incoming.put(data, timeout=self._write_timeout)
return self.incoming.put(data, timeout=self._write_timeout, partial=True)
except Queue.Full:
self._logger.info("Incoming queue is full, raising SerialTimeoutException")
raise SerialTimeoutException()
def readline(self):
if self._debug_awol:
time.sleep(self._read_timeout)
return ""
if self._debug_drop_connection:
raise SerialTimeoutException()
if self._debug_sleep > 0:
# if we are supposed to sleep, we sleep not longer than the read timeout
# (and then on the next call sleep again if there's time to sleep left)
sleep_for = min(self._debug_sleep, self._read_timeout)
self._debug_sleep -= sleep_for
time.sleep(sleep_for)
if self._debug_sleep > 0:
# we slept the full read timeout, return an empty line
return ""
# otherwise our left over timeout is the read timeout minus what we already
# slept for
timeout = self._read_timeout - sleep_for
else:
# use the full read timeout as timeout
timeout = self._read_timeout
try:
line = self.outgoing.get(timeout=self._read_timeout)
# fetch a line from the queue, wait no longer than timeout
line = self.outgoing.get(timeout=timeout)
self.outgoing.task_done()
return line
except Queue.Empty:
# queue empty? return empty line
return ""
def close(self):
@@ -773,14 +854,14 @@ class VirtualPrinter():
return
if settings().getBoolean(["devel", "virtualPrinter", "okWithLinenumber"]):
self.outgoing.put("ok %d" % self.lastN)
self._output("ok %d" % self.lastN)
else:
self.outgoing.put("ok")
self._output("ok")
def _sendWaitAfterTimeout(self, timeout=5):
time.sleep(timeout)
if self.outgoing is not None:
self.outgoing.put("wait")
self._output("wait")
class CharCountingQueue(Queue.Queue):
@@ -789,22 +870,26 @@ class CharCountingQueue(Queue.Queue):
self._size = 0
self._name = name
def put(self, item, block=True, timeout=None):
def put(self, item, block=True, timeout=None, partial=False):
self.not_full.acquire()
try:
item_size = self._len(item)
if not self._will_it_fit(item) and partial:
space_left = self.maxsize - self._qsize()
if space_left:
item = item[:space_left]
if not block:
if self._qsize() + item_size >= self.maxsize:
if not self._will_it_fit(item):
raise Queue.Full
elif timeout is None:
while self._qsize() + item_size >= self.maxsize:
while not self._will_it_fit(item):
self.not_full.wait()
elif timeout < 0:
raise ValueError("'timeout' must be a positive number")
else:
endtime = time.time() + timeout
while self._qsize() + item_size >= self.maxsize:
while not self._will_it_fit(item):
remaining = endtime - time.time()
if remaining <= 0.0:
raise Queue.Full
@@ -813,6 +898,8 @@ class CharCountingQueue(Queue.Queue):
self._put(item)
self.unfinished_tasks += 1
self.not_empty.notify()
return self._len(item)
finally:
self.not_full.release()
@@ -832,3 +919,6 @@ class CharCountingQueue(Queue.Queue):
item = self.queue.popleft()
self._size -= self._len(item)
return item
def _will_it_fit(self, item):
return self.maxsize - self._qsize() >= self._len(item)
+16 -1
View File
@@ -236,11 +236,26 @@ class PrinterInterface(object):
"""
raise NotImplementedError()
def pause_print(self):
"""
Pauses the current print job if it is currently running, does nothing otherwise.
"""
raise NotImplementedError()
def resume_print(self):
"""
Resumes the current print job if it is currently paused, does nothing otherwise.
"""
raise NotImplementedError()
def toggle_pause_print(self):
"""
Pauses the current print job if it is currently running or resumes it if it is currently paused.
"""
raise NotImplementedError()
if self.is_printing():
self.pause_print()
elif self.is_paused():
self.resume_print()
def cancel_print(self):
"""
+169 -35
View File
@@ -24,6 +24,7 @@ from octoprint.printer.estimation import TimeEstimationHelper
from octoprint.settings import settings
from octoprint.util import comm as comm
from octoprint.util import InvariantContainer
from octoprint.util import to_unicode
class Printer(PrinterInterface, comm.MachineComPrintCallback):
@@ -50,11 +51,9 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._temps = TemperatureHistory(cutoff=settings().getInt(["temperature", "cutoff"])*60)
self._tempBacklog = []
self._latestMessage = None
self._messages = deque([], 300)
self._messageBacklog = []
self._latestLog = None
self._log = deque([], 300)
self._logBacklog = []
@@ -73,6 +72,10 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._selectedFile = None
self._timeEstimationData = None
self._timeEstimationStatsWeighingUntil = settings().getFloat(["estimation", "printTime", "statsWeighingUntil"])
self._timeEstimationValidityRange = settings().getFloat(["estimation", "printTime", "validityRange"])
self._timeEstimationForceDumbFromPercent = settings().getFloat(["estimation", "printTime", "forceDumbFromPercent"])
self._timeEstimationForceDumbAfterMin = settings().getFloat(["estimation", "printTime", "forceDumbAfterMin"])
# comm
self._comm = None
@@ -360,7 +363,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._printAfterSelect = printAfterSelect
self._posAfterSelect = pos
self._comm.selectFile("/" + path if sd else path, sd)
self._comm.selectFile("/" + path if sd and not settings().getBoolean(["feature", "sdRelativePath"]) else path, sd)
self._setProgressData(completion=0)
self._setCurrentZ(None)
@@ -382,20 +385,21 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
if self._selectedFile is None:
return
# we are happy if the average of the estimates stays within 60s of the prior one
threshold = settings().getFloat(["estimation", "printTime", "stableThreshold"])
rolling_window = None
threshold = None
countdown = None
if self._selectedFile["sd"]:
# we are interesting in a rolling window of roughly the last 15s, so the number of entries has to be derived
# by that divided by the sd status polling interval
rolling_window = 15 / settings().get(["serial", "timeout", "sdStatus"])
# we are happy if the average of the estimates stays within 60s of the prior one
threshold = 60
# we are happy when one rolling window has been stable
countdown = rolling_window
self._timeEstimationData = TimeEstimationHelper(rolling_window=rolling_window, threshold=threshold, countdown=countdown)
self._timeEstimationData = TimeEstimationHelper(rolling_window=rolling_window,
threshold=threshold,
countdown=countdown)
self._fileManager.delete_recovery_data()
@@ -404,14 +408,29 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._setCurrentZ(None)
self._comm.startPrint(pos=pos)
def toggle_pause_print(self):
def pause_print(self):
"""
Pause the current printjob.
Pause the current printjob.
"""
if self._comm is None:
return
self._comm.setPause(not self._comm.isPaused())
if self._comm.isPaused():
return
self._comm.setPause(True)
def resume_print(self):
"""
Resume the current printjob.
"""
if self._comm is None:
return
if not self._comm.isPaused():
return
self._comm.setPause(False)
def cancel_print(self):
"""
@@ -571,9 +590,12 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._currentZ = currentZ
self._stateMonitor.set_current_z(self._currentZ)
def _setState(self, state):
def _setState(self, state, state_string=None):
if state_string is None:
state_string = self.get_state_string()
self._state = state
self._stateMonitor.set_state({"text": self.get_state_string(), "flags": self._getStateFlags()})
self._stateMonitor.set_state({"text": state_string, "flags": self._getStateFlags()})
def _addLog(self, log):
self._log.append(log)
@@ -615,22 +637,14 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
printTime = self._comm.getPrintTime()
cleanedPrintTime = self._comm.getCleanedPrintTime()
estimatedTotalPrintTime = self._estimateTotalPrintTime(progress, cleanedPrintTime)
totalPrintTime = estimatedTotalPrintTime
if self._selectedFile and "estimatedPrintTime" in self._selectedFile and self._selectedFile["estimatedPrintTime"]:
statisticalTotalPrintTime = None
statisticalTotalPrintTimeType = None
if self._selectedFile and "estimatedPrintTime" in self._selectedFile \
and self._selectedFile["estimatedPrintTime"]:
statisticalTotalPrintTime = self._selectedFile["estimatedPrintTime"]
if progress and cleanedPrintTime:
if estimatedTotalPrintTime is None:
totalPrintTime = statisticalTotalPrintTime
else:
if progress < 0.5:
sub_progress = progress * 2
else:
sub_progress = 1.0
totalPrintTime = (1 - sub_progress) * statisticalTotalPrintTime + sub_progress * estimatedTotalPrintTime
statisticalTotalPrintTimeType = self._selectedFile.get("estimatedPrintTimeType", None)
printTimeLeft = totalPrintTime - cleanedPrintTime if (totalPrintTime is not None and cleanedPrintTime is not None) else None
printTimeLeft, printTimeLeftOrigin = self._estimatePrintTimeLeft(progress, printTime, cleanedPrintTime, statisticalTotalPrintTime, statisticalTotalPrintTimeType)
if progress is not None:
progress_int = int(progress * 100)
@@ -641,7 +655,123 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
return dict(completion=progress * 100 if progress is not None else None,
filepos=filepos,
printTime=int(printTime) if printTime is not None else None,
printTimeLeft=int(printTimeLeft) if printTimeLeft is not None else None)
printTimeLeft=int(printTimeLeft) if printTimeLeft is not None else None,
printTimeLeftOrigin=printTimeLeftOrigin)
def _estimatePrintTimeLeft(self, progress, printTime, cleanedPrintTime, statisticalTotalPrintTime, statisticalTotalPrintTimeType):
"""
Tries to estimate the print time left for the print job
This is somewhat horrible since accurate print time estimation is pretty much impossible to
achieve, considering that we basically have only two data points (current progress in file and
time needed for that so far - former prints or a file analysis might not have happened or simply
be completely impossible e.g. if the file is stored on the printer's SD card) and
hence can only do a linear estimation of a completely non-linear process. That's a recipe
for inaccurate predictions right there. Yay.
Anyhow, here's how this implementation works. This method gets the current progress in the
printed file (percentage based on bytes read vs total bytes), the print time that elapsed,
the same print time with the heat up times subtracted (if possible) and if available also
some statistical total print time (former prints or a result from the GCODE analysis).
1. First get an "intelligent" estimate based on the :class:`~octoprint.printer.estimation.TimeEstimationHelper`.
That thing tries to detect if the estimation based on our progress and time needed for that becomes
stable over time through a rolling window and only returns a result once that appears to be the
case.
2. If we have any statistical data (former prints or a result from the GCODE analysis)
but no intelligent estimate yet, we'll use that for the next step. Otherwise, up to a certain percentage
in the print we do a percentage based weighing of the statistical data and the intelligent
estimate - the closer to the beginning of the print, the more precedence for the statistical
data, the closer to the cut off point, the more precendence for the intelligent estimate. This
is our preliminary total print time.
3. If the total print time is set, we do a sanity check for it. Based on the total print time
estimate and the time we already spent printing, we calculate at what percentage we SHOULD be
and compare that to the percentage at which we actually ARE. If it's too far off, our total
can't be trusted and we fall back on the dumb estimate. Same if the time we spent printing is
already higher than our total estimate.
4. If we do NOT have a total print time estimate yet but we've been printing for longer than
a configured amount of minutes or are further in the file than a configured percentage, we
also use the dumb estimate for now.
Yes, all this still produces horribly inaccurate results. But we have to do this live during the print and
hence can't produce to much computational overhead, we do not have any insight into the firmware implementation
with regards to planner setup and acceleration settings, we might not even have access to the printed file's
contents and such we need to find something that works "mostly" all of the time without costing too many
resources. Feel free to propose a better solution within the above limitations (and I mean that, this solution
here makes me unhappy).
Args:
progress (float or None): Current percentage in the printed file
printTime (float or None): Print time elapsed so far
cleanedPrintTime (float or None): Print time elapsed minus the time needed for getting up to temperature
(if detectable).
statisticalTotalPrintTime (float or None): Total print time of past prints against same printer profile,
or estimated total print time from GCODE analysis.
statisticalTotalPrintTimeType (str or None): Type of statistical print time, either "average" (total time
of former prints) or "analysis"
Returns:
(2-tuple) estimated print time left or None if not proper estimate could be made at all, origin of estimation
"""
if progress is None or printTime is None or cleanedPrintTime is None:
return None
dumbTotalPrintTime = printTime / progress
estimatedTotalPrintTime = self._estimateTotalPrintTime(progress, cleanedPrintTime)
totalPrintTime = estimatedTotalPrintTime
printTimeLeftOrigin = "estimate"
if statisticalTotalPrintTime is not None:
if estimatedTotalPrintTime is None:
# no estimate yet, we'll use the statistical total
totalPrintTime = statisticalTotalPrintTime
printTimeLeftOrigin = statisticalTotalPrintTimeType
else:
if progress < self._timeEstimationStatsWeighingUntil:
# still inside weighing range, use part stats, part current estimate
sub_progress = progress * (1 / self._timeEstimationStatsWeighingUntil)
if sub_progress > 1.0:
sub_progress = 1.0
printTimeLeftOrigin = "mixed-" + statisticalTotalPrintTimeType
else:
# use only the current estimate
sub_progress = 1.0
printTimeLeftOrigin = "estimate"
# combine
totalPrintTime = (1.0 - sub_progress) * statisticalTotalPrintTime \
+ sub_progress * estimatedTotalPrintTime
printTimeLeft = None
if totalPrintTime is not None:
# sanity check current total print time estimate
assumed_progress = cleanedPrintTime / totalPrintTime
min_progress = progress - self._timeEstimationValidityRange
max_progress = progress + self._timeEstimationValidityRange
if min_progress <= assumed_progress <= max_progress and totalPrintTime > cleanedPrintTime:
# appears sane, we'll use it
printTimeLeft = totalPrintTime - cleanedPrintTime
else:
# too far from the actual progress or negative,
# we use the dumb print time instead
printTimeLeft = dumbTotalPrintTime - cleanedPrintTime
printTimeLeftOrigin = "linear"
elif progress > self._timeEstimationForceDumbFromPercent or \
cleanedPrintTime * 60 >= self._timeEstimationForceDumbAfterMin:
# more than x% or y min printed and still no real estimate, ok, we'll use the dumb variant :/
printTimeLeft = dumbTotalPrintTime - cleanedPrintTime
printTimeLeftOrigin = "linear"
if printTimeLeft < 0:
# shouldn't actually happen, but let's make sure
return None, None
return printTimeLeft, printTimeLeftOrigin
def _addTemperatureData(self, temp, bedTemp):
currentTimeUtc = int(time.time())
@@ -729,9 +859,11 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
if averagePrintTime is not None:
self._selectedFile["estimatedPrintTime"] = averagePrintTime
self._selectedFile["estimatedPrintTimeType"] = "average"
elif estimatedPrintTime is not None:
# TODO apply factor which first needs to be tracked!
self._selectedFile["estimatedPrintTime"] = estimatedPrintTime
self._selectedFile["estimatedPrintTimeType"] = "analysis"
self._stateMonitor.set_job_data({
"file": {
@@ -755,10 +887,8 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
"messages": list(self._messages)
})
callback.on_printer_send_initial_data(data)
except Exception, err:
import sys
sys.stderr.write("ERROR: %s\n" % str(err))
pass
except:
self._logger.exception("Error while trying to send inital state update")
def _getStateFlags(self):
return {
@@ -777,7 +907,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
"""
Callback method for the comm object, called upon log output.
"""
self._addLog(message)
self._addLog(to_unicode(message, "utf-8", errors="replace"))
def on_comm_temperature_update(self, temp, bedTemp):
self._addTemperatureData(temp, bedTemp)
@@ -788,6 +918,9 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
"""
oldState = self._state
if self._comm is not None:
state_string = self._comm.getStateString()
# forward relevant state changes to gcode manager
if oldState == comm.MachineCom.STATE_PRINTING:
if self._selectedFile is not None:
@@ -805,14 +938,14 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._setCurrentZ(None)
self._setJobData(None, None, None)
self._setState(state)
self._setState(state, state_string=state_string)
def on_comm_message(self, message):
"""
Callback method for the comm object, called upon message exchanges via serial.
Stores the message in the message buffer, truncates buffer to the last 300 lines.
"""
self._addMessage(message)
self._addMessage(to_unicode(message, "utf-8", errors="replace"))
def on_comm_progress(self):
"""
@@ -846,6 +979,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._stateMonitor.set_state({"text": self.get_state_string(), "flags": self._getStateFlags()})
if self._printAfterSelect:
self._printAfterSelect = False
self.start_print(pos=self._posAfterSelect)
def on_comm_print_job_done(self):
+22 -4
View File
@@ -12,7 +12,6 @@ from flask.ext.login import LoginManager, current_user
from flask.ext.principal import Principal, Permission, RoleNeed, identity_loaded, UserNeed
from flask.ext.babel import Babel, gettext, ngettext
from flask.ext.assets import Environment, Bundle
from flaskext.markdown import Markdown
from babel import Locale
from watchdog.observers import Observer
from watchdog.observers.polling import PollingObserver
@@ -649,7 +648,8 @@ class Server(object):
response.headers.add("X-Clacks-Overhead", "GNU Terry Pratchett")
return response
Markdown(app)
from octoprint.util.jinja import MarkdownFilter
MarkdownFilter(app)
def _setup_i18n(self, app):
global babel
@@ -681,6 +681,7 @@ class Server(object):
import re
app.jinja_env.add_extension("jinja2.ext.do")
app.jinja_env.add_extension("octoprint.util.jinja.trycatch")
def regex_replace(s, find, replace):
return re.sub(find, replace, s)
@@ -778,10 +779,25 @@ class Server(object):
preemptive_cache_timeout = settings().getInt(["server", "preemptiveCache", "until"])
cutoff_timestamp = time.time() - preemptive_cache_timeout * 24 * 60 * 60
def filter_old_entries(entry):
def filter_current_entries(entry):
"""Returns True for entries younger than the cutoff date"""
return "_timestamp" in entry and entry["_timestamp"] > cutoff_timestamp
cache_data = preemptive_cache.clean_all_data(lambda root, entries: filter(filter_old_entries, entries))
def filter_http_entries(entry):
"""Returns True for entries targeting http or https."""
return "base_url" in entry \
and entry["base_url"] \
and (entry["base_url"].startswith("http://")
or entry["base_url"].startswith("https://"))
def filter_entries(entry):
"""Combined filter."""
filters = (filter_current_entries,
filter_http_entries)
return all([f(entry) for f in filters])
# filter out all old and non-http entries
cache_data = preemptive_cache.clean_all_data(lambda root, entries: filter(filter_entries, entries))
if not cache_data:
return
@@ -793,6 +809,7 @@ class Server(object):
additional_request_data = kwargs.get("_additional_request_data", dict())
kwargs = dict((k, v) for k, v in kwargs.items() if not k.startswith("_") and not k == "plugin")
kwargs.update(additional_request_data)
try:
if plugin:
self._logger.info("Preemptively caching {} (plugin {}) for {!r}".format(route, plugin, kwargs))
@@ -804,6 +821,7 @@ class Server(object):
except:
self._logger.exception("Error while trying to preemptively cache {} for {!r}".format(route, kwargs))
# asynchronous caching
import threading
cache_thread = threading.Thread(target=execute_caching, name="Preemptive Cache Worker")
cache_thread.daemon = True
+17 -14
View File
@@ -220,7 +220,7 @@ def uploadGcodeFile(target):
done = True
else:
filename = fileProcessingFinished(added_file, fileManager.path_on_disk(FileDestinations.LOCAL, added_file), target)
done = True
done = not sd
if userdata is not None:
# upload included userdata, add this now to the metadata
@@ -325,25 +325,28 @@ def gcodeFileCommand(filename, target):
except octoprint.slicing.UnknownSlicer as e:
return make_response("Slicer {slicer} is not available".format(slicer=e.slicer), 400)
if not octoprint.filemanager.valid_file_type(filename, type="stl"):
return make_response("Cannot slice {filename}, not an STL file".format(**locals()), 415)
if not any([octoprint.filemanager.valid_file_type(filename, type=source_file_type) for source_file_type in slicer_instance.get_slicer_properties().get("source_file_types", ["model"])]):
return make_response("Cannot slice {filename}, not a model file".format(**locals()), 415)
if slicer_instance.get_slicer_properties()["same_device"] and (printer.is_printing() or printer.is_paused()):
if slicer_instance.get_slicer_properties().get("same_device", True) and (printer.is_printing() or printer.is_paused()):
# slicer runs on same device as OctoPrint, slicing while printing is hence disabled
return make_response("Cannot slice on {slicer} while printing due to performance reasons".format(**locals()), 409)
if "gcode" in data and data["gcode"]:
gcode_name = data["gcode"]
if "destination" in data and data["destination"]:
destination = data["destination"]
del data["destination"]
elif "gcode" in data and data["gcode"]:
destination = data["gcode"]
del data["gcode"]
else:
import os
name, _ = os.path.splitext(filename)
gcode_name = name + ".gco"
destination = name + "." + slicer_instance.get_slicer_properties().get("destination_extensions", ["gco", "gcode", "g"])[0]
# prohibit overwriting the file that is currently being printed
currentOrigin, currentFilename = _getCurrentFile()
if currentFilename == gcode_name and currentOrigin == target and (printer.is_printing() or printer.is_paused()):
make_response("Trying to slice into file that is currently being printed: %s" % gcode_name, 409)
if currentFilename == destination and currentOrigin == target and (printer.is_printing() or printer.is_paused()):
make_response("Trying to slice into file that is currently being printed: %s" % destination, 409)
if "profile" in data.keys() and data["profile"]:
profile = data["profile"]
@@ -391,24 +394,24 @@ def gcodeFileCommand(filename, target):
printer.select_file(filenameToSelect, sd, print_after_slicing)
try:
fileManager.slice(slicer, target, filename, target, gcode_name,
fileManager.slice(slicer, target, filename, target, destination,
profile=profile,
printer_profile_id=printerProfile,
position=position,
overrides=overrides,
callback=slicing_done,
callback_args=(target, gcode_name, select_after_slicing, print_after_slicing))
callback_args=(target, destination, select_after_slicing, print_after_slicing))
except octoprint.slicing.UnknownProfile:
return make_response("Profile {profile} doesn't exist".format(**locals()), 400)
files = {}
location = url_for(".readGcodeFile", target=target, filename=gcode_name, _external=True)
location = url_for(".readGcodeFile", target=target, filename=destination, _external=True)
result = {
"name": gcode_name,
"name": destination,
"origin": FileDestinations.LOCAL,
"refs": {
"resource": location,
"download": url_for("index", _external=True) + "downloads/files/" + target + "/" + gcode_name
"download": url_for("index", _external=True) + "downloads/files/" + target + "/" + destination
}
}
+10 -2
View File
@@ -43,7 +43,15 @@ def controlJob():
elif command == "pause":
if not activePrintjob:
return make_response("Printer is neither printing nor paused, 'pause' command cannot be performed", 409)
printer.toggle_pause_print()
action = data.get("action", "toggle")
if action == "toggle":
printer.toggle_pause_print()
elif action == "pause":
printer.pause_print()
elif action == "resume":
printer.resume_print()
else:
return make_response("Unknown action '{}', allowed values for action parameter are 'pause', 'resume' and 'toggle'".format(action), 400)
elif command == "cancel":
if not activePrintjob:
return make_response("Printer is neither printing nor paused, 'cancel' command cannot be performed", 409)
@@ -58,4 +66,4 @@ def jobState():
"job": currentData["job"],
"progress": currentData["progress"],
"state": currentData["state"]["text"]
})
})
+9 -1
View File
@@ -64,6 +64,7 @@ def getSettings():
"waitForStart": s.getBoolean(["feature", "waitForStartOnConnect"]),
"alwaysSendChecksum": s.getBoolean(["feature", "alwaysSendChecksum"]),
"sdSupport": s.getBoolean(["feature", "sdSupport"]),
"sdRelativePath": s.getBoolean(["feature", "sdRelativePath"]),
"sdAlwaysAvailable": s.getBoolean(["feature", "sdAlwaysAvailable"]),
"swallowOkAfterResend": s.getBoolean(["feature", "swallowOkAfterResend"]),
"repetierTargetTemp": s.getBoolean(["feature", "repetierTargetTemp"]),
@@ -91,7 +92,10 @@ def getSettings():
"ignoreErrorsFromFirmware": s.getBoolean(["serial", "ignoreErrorsFromFirmware"]),
"disconnectOnErrors": s.getBoolean(["serial", "disconnectOnErrors"]),
"triggerOkForM29": s.getBoolean(["serial", "triggerOkForM29"]),
"supportResendsWithoutOk": s.getBoolean(["serial", "supportResendsWithoutOk"])
"supportResendsWithoutOk": s.getBoolean(["serial", "supportResendsWithoutOk"]),
"maxTimeoutsIdle": s.getInt(["serial", "maxCommunicationTimeouts", "idle"]),
"maxTimeoutsPrinting": s.getInt(["serial", "maxCommunicationTimeouts", "printing"]),
"maxTimeoutsLong": s.getInt(["serial", "maxCommunicationTimeouts", "long"])
},
"folder": {
"uploads": s.getBaseFolder("uploads"),
@@ -213,6 +217,7 @@ def setSettings():
if "waitForStart" in data["feature"].keys(): s.setBoolean(["feature", "waitForStartOnConnect"], data["feature"]["waitForStart"])
if "alwaysSendChecksum" in data["feature"].keys(): s.setBoolean(["feature", "alwaysSendChecksum"], data["feature"]["alwaysSendChecksum"])
if "sdSupport" in data["feature"].keys(): s.setBoolean(["feature", "sdSupport"], data["feature"]["sdSupport"])
if "sdRelativePath" in data["feature"].keys(): s.setBoolean(["feature", "sdRelativePath"], data["feature"]["sdRelativePath"])
if "sdAlwaysAvailable" in data["feature"].keys(): s.setBoolean(["feature", "sdAlwaysAvailable"], data["feature"]["sdAlwaysAvailable"])
if "swallowOkAfterResend" in data["feature"].keys(): s.setBoolean(["feature", "swallowOkAfterResend"], data["feature"]["swallowOkAfterResend"])
if "repetierTargetTemp" in data["feature"].keys(): s.setBoolean(["feature", "repetierTargetTemp"], data["feature"]["repetierTargetTemp"])
@@ -238,6 +243,9 @@ def setSettings():
if "disconnectOnErrors" in data["serial"]: s.setBoolean(["serial", "disconnectOnErrors"], data["serial"]["disconnectOnErrors"])
if "triggerOkForM29" in data["serial"]: s.setBoolean(["serial", "triggerOkForM29"], data["serial"]["triggerOkForM29"])
if "supportResendsWithoutOk" in data["serial"]: s.setBoolean(["serial", "supportResendsWithoutOk"], data["serial"]["supportResendsWithoutOk"])
if "maxTimeoutsIdle" in data["serial"]: s.setInt(["serial", "maxCommunicationTimeouts", "idle"], data["serial"]["maxTimeoutsIdle"])
if "maxTimeoutsPrinting" in data["serial"]: s.setInt(["serial", "maxCommunicationTimeouts", "printing"], data["serial"]["maxTimeoutsPrinting"])
if "maxTimeoutsLong" in data["serial"]: s.setInt(["serial", "maxCommunicationTimeouts", "long"], data["serial"]["maxTimeoutsLong"])
oldLog = s.getBoolean(["serial", "log"])
if "log" in data["serial"].keys(): s.setBoolean(["serial", "log"], data["serial"]["log"])
+13 -2
View File
@@ -19,6 +19,8 @@ from octoprint.slicing import UnknownSlicer, SlicerNotConfigured, ProfileAlready
@api.route("/slicing", methods=["GET"])
def slicingListAll():
from octoprint.filemanager import get_extensions
default_slicer = s().get(["slicing", "defaultSlicer"])
if "configured" in request.values and request.values["configured"] in valid_boolean_trues:
@@ -30,12 +32,21 @@ def slicingListAll():
for slicer in slicers:
try:
slicer_impl = slicingManager.get_slicer(slicer, require_configured=False)
extensions = set()
for source_file_type in slicer_impl.get_slicer_properties().get("source_file_types", ["model"]):
extensions = extensions.union(get_extensions(source_file_type))
result[slicer] = dict(
key=slicer,
displayName=slicer_impl.get_slicer_properties()["name"],
default=default_slicer == slicer,
configured = slicer_impl.is_slicer_configured(),
profiles=_getSlicingProfilesData(slicer)
configured=slicer_impl.is_slicer_configured(),
profiles=_getSlicingProfilesData(slicer),
extensions=dict(
source=list(extensions),
destination=slicer_impl.get_slicer_properties().get("destination_extensions", ["gco", "gcode", "g"])
)
)
except (UnknownSlicer, SlicerNotConfigured):
# this should never happen
+5
View File
@@ -225,6 +225,11 @@ class ReverseProxied(object):
# determine scheme
scheme = environ.get(self._header_scheme, "")
if scheme and "," in scheme:
# Scheme might be something like "https,https" if doubly-reverse-proxied
# without stripping original scheme header first, make sure to only use
# the first entry in such a case. See #1391.
scheme, _ = map(lambda x: x.strip(), scheme.split(",", 1))
if not scheme:
scheme = self._fallback_scheme
+8 -4
View File
@@ -420,7 +420,7 @@ class PreemptiveCache(object):
self._logger.debug("Removed root {} from preemptive cache".format(root))
elif len(entries) < old_count:
all_data[root] = entries
self._logger.debug("Removed {} from preemptive cache for root {}".format(old_count - len(entries), root))
self._logger.debug("Removed {} entries from preemptive cache for root {}".format(old_count - len(entries), root))
self.set_all_data(all_data)
return all_data
@@ -488,6 +488,12 @@ class PreemptiveCache(object):
return matched, unmatched
with self._lock:
if not self._log_access:
self._logger.debug(
"Not updating timestamp and counter for {} and {!r}, currently flagged as disabled".format(root,
data))
return
cache_data = self.get_all_data()
if not root in cache_data:
@@ -509,12 +515,10 @@ class PreemptiveCache(object):
to_persist["_timestamp"] = time.time()
to_persist["_count"] = 1
self._logger.info("Adding entry for {} and {!r}".format(root, to_persist))
elif self._log_access:
else:
to_persist["_timestamp"] = time.time()
to_persist["_count"] = to_persist.get("_count", 0) + 1
self._logger.debug("Updating timestamp and counter for {} and {!r}".format(root, data))
else:
self._logger.debug("Not updating timestamp and counter for {} and {!r}, currently flagged as disabled".format(root, data))
self.set_data(root, [to_persist] + other)
+3
View File
@@ -12,6 +12,9 @@ import time
import octoprint.timelapse
import octoprint.server
import octoprint.events
import octoprint.plugin
from octoprint.events import Events
import octoprint.printer
+1 -1
View File
@@ -32,7 +32,7 @@ _valid_div_re = re.compile("[a-zA-Z_-]+")
@app.route("/")
@util.flask.preemptively_cached(cache=preemptiveCache,
data=lambda: dict(path=request.path, base_url=request.url_root, query_string="l10n={}".format(g.locale.language) if g.locale else "en"),
unless=lambda: request.url_root in settings().get(["server", "preemptiveCache", "exceptions"]))
unless=lambda: request.url_root in settings().get(["server", "preemptiveCache", "exceptions"]) or not (request.url_root.startswith("http://") or request.url_root.startswith("https://")))
@util.flask.conditional(lambda: _check_etag_and_lastmodified_for_index(), NOT_MODIFIED)
@util.flask.cached(timeout=-1,
refreshif=lambda cached: _validate_cache_for_index(cached),
+18
View File
@@ -81,9 +81,16 @@ default_settings = {
"detection": 0.5,
"connection": 10,
"communication": 30,
"heatup": 2,
"temperature": 5,
"sdStatus": 1
},
"maxCommunicationTimeouts": {
"idle": 2,
"printing": 5,
"long": 5
},
"maxWritePasses": 5,
"additionalPorts": [],
"longRunningCommands": ["G4", "G28", "G29", "G30", "G32", "M400", "M226"],
"checksumRequiringCommands": ["M110"],
@@ -162,6 +169,7 @@ default_settings = {
"sendChecksumWithUnknownCommands": False,
"unknownCommandsNeedAck": False,
"sdSupport": True,
"sdRelativePath": False,
"sdAlwaysAvailable": False,
"swallowOkAfterResend": True,
"repetierTargetTemp": False,
@@ -275,6 +283,15 @@ default_settings = {
}
}
},
"estimation": {
"printTime": {
"statsWeighingUntil": 0.5,
"validityRange": 0.15,
"forceDumbFromPercent": 0.3,
"forceDumbAfterMin": 30,
"stableThreshold": 60
}
},
"devel": {
"stylesheet": "css",
"cache": {
@@ -293,6 +310,7 @@ default_settings = {
"okWithLinenumber": False,
"numExtruders": 1,
"includeCurrentToolInTemps": True,
"includeFilenameInOpened": True,
"movementSpeed": {
"x": 6000,
"y": 6000,
+1 -1
View File
@@ -1 +1 @@
.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeaLine truncated
.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeaLine truncated
+17 -3
View File
@@ -136,9 +136,17 @@
var timeout = 1500;
var baseUrl = window.location.href;
var currentQuery = "";
var currentFragment = "";
if (baseUrl.indexOf("#") > -1) {
currentFragment = baseUrl.substring(baseUrl.indexOf("#"));
baseUrl = baseUrl.substring(0, baseUrl.indexOf("#"));
}
if (baseUrl.indexOf("?") > -1) {
currentQuery = baseUrl.substring(baseUrl.indexOf("?"));
baseUrl = baseUrl.substring(0, baseUrl.indexOf("?"));
}
if (baseUrl.indexOf("/static") > -1) {
baseUrl = baseUrl.substring(0, baseUrl.indexOf("/static"));
}
@@ -159,10 +167,16 @@
serverIsOnline = true;
message.className = "pulsate1 green";
message.innerText = "OctoPrint server online, reloading page...";
window.location = baseUrl;
var reloadUrl = baseUrl + currentQuery + currentFragment;
if (reloadUrl == window.location.href) {
window.location.reload(false);
} else {
window.location.href = reloadUrl;
}
} else {
// online.gif still not available, let's look at
var interval = 15;
var interval = 10;
if (intervals.length) {
interval = intervals.shift();
}
@@ -186,7 +200,7 @@
}
backendOfflineCounter++;
if (backendOfflineCounter > 10) {
if (backendOfflineCounter > 15) {
if (serverTimeout) {
window.clearTimeout(serverTimeout);
}
+2 -45
View File
@@ -140,9 +140,6 @@ function DataUpdater(allViewModels) {
var data = e.data[prop];
var gcodeUploadProgress = $("#gcode_upload_progress");
var gcodeUploadProgressBar = $(".bar", gcodeUploadProgress);
var start = new Date().getTime();
switch (prop) {
case "connected": {
@@ -214,8 +211,6 @@ function DataUpdater(allViewModels) {
break;
}
case "slicingProgress": {
gcodeUploadProgressBar.text(_.sprintf(gettext("Slicing ... (%(percentage)d%%)"), {percentage: Math.round(data["progress"])}));
_.each(self.allViewModels, function(viewModel) {
if (viewModel.hasOwnProperty("onSlicingProgress")) {
viewModel.onSlicingProgress(data["slicer"], data["model_path"], data["machinecode_path"], data["progress"]);
@@ -226,48 +221,10 @@ function DataUpdater(allViewModels) {
case "event": {
var type = data["type"];
var payload = data["payload"];
var html = "";
log.debug("Got event " + type + " with payload: " + JSON.stringify(payload));
if (type == "SlicingStarted") {
gcodeUploadProgress.addClass("progress-striped").addClass("active");
gcodeUploadProgressBar.css("width", "100%");
if (payload.progressAvailable) {
gcodeUploadProgressBar.text(_.sprintf(gettext("Slicing ... (%(percentage)d%%)"), {percentage: 0}));
} else {
gcodeUploadProgressBar.text(gettext("Slicing ..."));
}
} else if (type == "SlicingDone") {
gcodeUploadProgress.removeClass("progress-striped").removeClass("active");
gcodeUploadProgressBar.css("width", "0%");
gcodeUploadProgressBar.text("");
new PNotify({title: gettext("Slicing done"), text: _.sprintf(gettext("Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"), payload), type: "success"});
} else if (type == "SlicingCancelled") {
gcodeUploadProgress.removeClass("progress-striped").removeClass("active");
gcodeUploadProgressBar.css("width", "0%");
gcodeUploadProgressBar.text("");
} else if (type == "SlicingFailed") {
gcodeUploadProgress.removeClass("progress-striped").removeClass("active");
gcodeUploadProgressBar.css("width", "0%");
gcodeUploadProgressBar.text("");
html = _.sprintf(gettext("Could not slice %(stl)s to %(gcode)s: %(reason)s"), payload);
new PNotify({title: gettext("Slicing failed"), text: html, type: "error", hide: false});
} else if (type == "TransferStarted") {
gcodeUploadProgress.addClass("progress-striped").addClass("active");
gcodeUploadProgressBar.css("width", "100%");
gcodeUploadProgressBar.text(gettext("Streaming ..."));
} else if (type == "TransferDone") {
gcodeUploadProgress.removeClass("progress-striped").removeClass("active");
gcodeUploadProgressBar.css("width", "0%");
gcodeUploadProgressBar.text("");
new PNotify({
title: gettext("Streaming done"),
text: _.sprintf(gettext("Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"), payload),
type: "success"
});
} else if (type == "PrintCancelled") {
if (type == "PrintCancelled") {
if (payload.firmwareError) {
new PNotify({
title: gettext("Unhandled communication error"),
@@ -279,7 +236,7 @@ function DataUpdater(allViewModels) {
} else if (type == "Error") {
new PNotify({
title: gettext("Unhandled communication error"),
text: _.sprintf(gettext("The was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"), payload),
text: _.sprintf(gettext("There was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"), payload),
type: "error",
hide: false
});
+38
View File
@@ -348,6 +348,44 @@ $(function() {
}
};
ko.bindingHandlers.copyWidth = {
init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
var node = ko.bindingHandlers.copyWidth._getReferenceNode(element, valueAccessor);
ko.bindingHandlers.copyWidth._setWidth(node, element);
},
update: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
var node = ko.bindingHandlers.copyWidth._getReferenceNode(element, valueAccessor);
ko.bindingHandlers.copyWidth._setWidth(node, element);
},
_setWidth: function(node, element) {
var width = node.width();
if (!width) return;
if ($(element).width() == width) return;
element.style.width = width + "px";
},
_getReferenceNode: function(element, valueAccessor) {
var value = ko.utils.unwrapObservable(valueAccessor());
if (!value) return;
var parts = value.split(" ");
var node = $(element);
while (parts.length > 0) {
var part = parts.shift();
if (part == ":parent") {
node = node.parent();
} else {
var selector = part;
if (parts.length > 0) {
selector += " " + parts.join(" ");
}
node = $(selector, node);
break;
}
}
return node;
}
};
ko.bindingHandlers.contextMenu = {
init: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
var val = ko.utils.unwrapObservable(valueAccessor());
+150 -33
View File
@@ -58,6 +58,10 @@ $(function() {
self.localTarget = undefined;
self.sdTarget = undefined;
self.uploadProgressText = ko.observable();
self._uploadInProgress = false;
// initialize list helper
self.listHelper = new ItemListHelper(
"gcodeFiles",
@@ -145,22 +149,26 @@ $(function() {
self.isSdReady(data.flags.sdReady);
};
self._otherRequestInProgress = false;
self._otherRequestInProgress = undefined;
self._filenameToFocus = undefined;
self._locationToFocus = undefined;
self.requestData = function(filenameToFocus, locationToFocus) {
if (self._otherRequestInProgress) return;
self._filenameToFocus = self._filenameToFocus || filenameToFocus;
self._locationToFocus = self._locationToFocus || locationToFocus;
if (self._otherRequestInProgress !== undefined) {
return self._otherRequestInProgress
}
self._otherRequestInProgress = true;
$.ajax({
return self._otherRequestInProgress = $.ajax({
url: API_BASEURL + "files",
method: "GET",
dataType: "json",
success: function(response) {
self.fromResponse(response, filenameToFocus, locationToFocus);
self._otherRequestInProgress = false;
},
error: function() {
self._otherRequestInProgress = false;
}
dataType: "json"
}).done(function(response) {
self.fromResponse(response, self._filenameToFocus, self._locationToFocus);
}).always(function() {
self._otherRequestInProgress = undefined;
self._filenameToFocus = undefined;
self._locationToFocus = undefined;
});
};
@@ -179,8 +187,19 @@ $(function() {
}
var entryElement = self.getEntryElement({name: filenameToFocus, origin: locationToFocus});
if (entryElement) {
// scroll to uploaded element
var entryOffset = entryElement.offsetTop;
$(".gcode_files").slimScroll({ scrollTo: entryOffset + "px" });
$(".gcode_files").slimScroll({
scrollTo: entryOffset + "px"
});
// highlight uploaded element
var element = $(entryElement);
element.on("webkitAnimationEnd oanimationend msAnimationEnd animationend", function(e) {
// remove highlight class again
element.removeClass("highlight");
});
element.addClass("highlight");
}
}
@@ -298,7 +317,7 @@ $(function() {
};
self.enableSlicing = function(data) {
return self.loginState.isUser() && self.slicing.enableSlicingDialog();
return self.loginState.isUser() && self.slicing.enableSlicingDialog() && self.slicing.enableSlicingDialogForFile(data.name);
};
self.enableAdditionalData = function(data) {
@@ -421,15 +440,71 @@ $(function() {
};
self.onEventUpdatedFiles = function(payload) {
if (payload.type == "gcode") {
self.requestData();
if (self._uploadInProgress) {
return;
}
if (payload.type !== "gcode") {
return;
}
self.requestData();
};
self.onEventSlicingStarted = function(payload) {
self.uploadProgress
.addClass("progress-striped")
.addClass("active");
self.uploadProgressBar.css("width", "100%");
if (payload.progressAvailable) {
self.uploadProgressText(_.sprintf(gettext("Slicing ... (%(percentage)d%%)"), {percentage: 0}));
} else {
self.uploadProgressText(gettext("Slicing ..."));
}
};
self.onSlicingProgress = function(slicer, modelPath, machinecodePath, progress) {
self.uploadProgressText(_.sprintf(gettext("Slicing ... (%(percentage)d%%)"), {percentage: Math.round(progress)}));
};
self.onEventSlicingCancelled = function(payload) {
self.uploadProgress
.removeClass("progress-striped")
.removeClass("active");
self.uploadProgressBar
.css("width", "0%");
self.uploadProgressText("");
};
self.onEventSlicingDone = function(payload) {
self.uploadProgress
.removeClass("progress-striped")
.removeClass("active");
self.uploadProgressBar
.css("width", "0%");
self.uploadProgressText("");
new PNotify({
title: gettext("Slicing done"),
text: _.sprintf(gettext("Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"), payload),
type: "success"
});
self.requestData();
};
self.onEventSlicingFailed = function(payload) {
self.uploadProgress
.removeClass("progress-striped")
.removeClass("active");
self.uploadProgressBar
.css("width", "0%");
self.uploadProgressText("");
var html = _.sprintf(gettext("Could not slice %(stl)s to %(gcode)s: %(reason)s"), payload);
new PNotify({title: gettext("Slicing failed"), text: html, type: "error", hide: false});
};
self.onEventMetadataAnalysisFinished = function(payload) {
self.requestData();
};
@@ -438,7 +513,29 @@ $(function() {
self.requestData();
};
self.onEventTransferStarted = function(payload) {
self.uploadProgress
.addClass("progress-striped")
.addClass("active");
self.uploadProgressBar
.css("width", "100%");
self.uploadProgressText(gettext("Streaming ..."));
};
self.onEventTransferDone = function(payload) {
self.uploadProgress
.removeClass("progress-striped")
.removeClass("active");
self.uploadProgressBar
.css("width", "0");
self.uploadProgressText("");
new PNotify({
title: gettext("Streaming done"),
text: _.sprintf(gettext("Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"), payload),
type: "success"
});
self.requestData(payload.remote, "sdcard");
};
@@ -456,8 +553,10 @@ $(function() {
url: API_BASEURL + "files/local",
dataType: "json",
dropZone: enable ? self.localTarget : null,
submit: self._handleUploadStart,
done: self._handleUploadDone,
fail: self._handleUploadFail,
always: self._handleUploadAlways,
progressall: self._handleUploadProgress
};
self.uploadButton.fileupload(options);
@@ -468,8 +567,10 @@ $(function() {
url: API_BASEURL + "files/sdcard",
dataType: "json",
dropZone: enable ? self.sdTarget : null,
submit: self._handleUploadStart,
done: self._handleUploadDone,
fail: self._handleUploadFail,
always: self._handleUploadAlways,
progressall: self._handleUploadProgress
};
self.sdUploadButton.fileupload(options);
@@ -485,6 +586,11 @@ $(function() {
}
};
self._handleUploadStart = function(e, data) {
self._uploadInProgress = true;
return true;
};
self._handleUploadDone = function(e, data) {
var filename = undefined;
var location = undefined;
@@ -495,24 +601,32 @@ $(function() {
filename = data.result.files.local.name;
location = "local";
}
self.requestData(filename, location);
self.requestData(filename, location)
.done(function() {
if (data.result.done) {
self.uploadProgressBar
.css("width", "0%");
self.uploadProgressText("");
self.uploadProgress
.removeClass("progress-striped")
.removeClass("active");
}
});
if (_.endsWith(filename.toLowerCase(), ".stl")) {
self.slicing.show(location, filename);
}
if (data.result.done) {
self.uploadProgressBar
.css("width", "0%")
.text("");
self.uploadProgress
.removeClass("progress-striped")
.removeClass("active");
}
};
self._handleUploadFail = function(e, data) {
var error = "<p>" + gettext("Could not upload the file. Make sure that it is a GCODE file and has the extension \".gcode\" or \".gco\" or that it is an STL file with the extension \".stl\".") + "</p>";
var extensions = _.map(SUPPORTED_EXTENSIONS, function(extension) {
return extension.toLowerCase();
}).sort();
extensions = extensions.join(", ");
var error = "<p>"
+ _.sprintf(gettext("Could not upload the file. Make sure that it is a valid file with one of these extensions: %(extensions)s"),
{extensions: extensions})
+ "</p>";
error += pnotifyAdditionalInfo("<pre>" + data.jqXHR.responseText + "</pre>");
new PNotify({
title: "Upload failed",
@@ -521,26 +635,29 @@ $(function() {
hide: false
});
self.uploadProgressBar
.css("width", "0%")
.text("");
.css("width", "0%");
self.uploadProgressText("");
self.uploadProgress
.removeClass("progress-striped")
.removeClass("active");
};
self._handleUploadAlways = function(e, data) {
self._uploadInProgress = false;
};
self._handleUploadProgress = function(e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
self.uploadProgressBar
.css("width", progress + "%")
.text(gettext("Uploading ..."));
.css("width", progress + "%");
self.uploadProgressText(gettext("Uploading ..."));
if (progress >= 100) {
self.uploadProgress
.addClass("progress-striped")
.addClass("active");
self.uploadProgressBar
.text(gettext("Saving ..."));
self.uploadProgressText(gettext("Saving ..."));
}
};
@@ -435,7 +435,7 @@ $(function() {
} else {
var output = [];
output.push(gettext("Model size") + ": " + model.width.toFixed(2) + "mm &times; " + model.depth.toFixed(2) + "mm &times; " + model.height.toFixed(2) + "mm");
output.push(gettext("Estimated total print time") + ": " + formatDuration(model.printTime));
output.push(gettext("Estimated total print time") + ": " + formatFuzzyEstimation(model.printTime));
output.push(gettext("Estimated layer height") + ": " + model.layerHeight.toFixed(2) + gettext("mm"));
output.push(gettext("Layer count") + ": " + model.layersPrinted.toFixed(0) + " " + gettext("printed") + ", " + model.layersTotal.toFixed(0) + " " + gettext("visited"));
@@ -472,7 +472,7 @@ $(function() {
}
}
}
output.push(gettext("Print time for layer") + ": " + formatDuration(layer.printTime));
output.push(gettext("Print time for layer") + ": " + formatFuzzyEstimation(layer.printTime));
self.ui_layerInfo(output.join("<br>"));
@@ -30,6 +30,7 @@ $(function() {
self.filepos = ko.observable(undefined);
self.printTime = ko.observable(undefined);
self.printTimeLeft = ko.observable(undefined);
self.printTimeLeftOrigin = ko.observable(undefined);
self.sd = ko.observable(undefined);
self.timelapse = ko.observable(undefined);
@@ -51,9 +52,9 @@ $(function() {
self.estimatedPrintTimeString = ko.pureComputed(function() {
if (self.lastPrintTime())
return formatDuration(self.lastPrintTime());
return formatFuzzyEstimation(self.lastPrintTime());
if (self.estimatedPrintTime())
return formatDuration(self.estimatedPrintTime());
return formatFuzzyEstimation(self.estimatedPrintTime());
return "-";
});
self.byteString = ko.pureComputed(function() {
@@ -83,11 +84,61 @@ $(function() {
return formatFuzzyEstimation(self.printTimeLeft());
}
});
self.printTimeLeftOriginString = ko.pureComputed(function() {
var value = self.printTimeLeftOrigin();
switch (value) {
case "linear": {
return gettext("Based on a linear approximation (accuracy highly dependent on the model)");
}
case "analysis": {
return gettext("Based on the estimate from analysis of file (medium accuracy)");
}
case "mixed-analysis": {
return gettext("Based on a mix of estimate from analysis and calculation (medium accuracy)");
}
case "average": {
return gettext("Based on the average total of past prints of this model with the same printer profile (usually good accuracy)");
}
case "mixed-average": {
return gettext("Based on a mix of average total from past prints and calculation (usually good accuracy)");
}
case "estimate": {
return gettext("Based on the calculated estimate (best accuracy)");
}
default: {
return "";
}
}
});
self.printTimeLeftOriginClass = ko.pureComputed(function() {
var value = self.printTimeLeftOrigin();
switch (value) {
default:
case "linear": {
return "text-error";
}
case "analysis":
case "mixed-analysis": {
return "text-warning";
}
case "average":
case "mixed-average":
case "estimate": {
return "text-success";
}
}
});
self.progressString = ko.pureComputed(function() {
if (!self.progress())
return 0;
return self.progress();
});
self.progressBarString = ko.pureComputed(function() {
if (!self.progress()) {
return "";
}
return _.sprintf("%d%%", self.progress());
});
self.pauseString = ko.pureComputed(function() {
if (self.isPaused())
return gettext("Continue");
@@ -191,6 +242,7 @@ $(function() {
self.filepos(data.filepos);
self.printTime(data.printTime);
self.printTimeLeft(data.printTimeLeft);
self.printTimeLeftOrigin(data.printTimeLeftOrigin);
};
self._processZData = function(data) {
@@ -223,21 +275,41 @@ $(function() {
};
self.pause = function() {
self._jobCommand("pause");
self.onlyPause = function() {
self.pause("pause");
};
self.onlyResume = function() {
self.pause("resume");
};
self.pause = function(action) {
action = action || "toggle";
self._jobCommand("pause", {"action": action});
};
self.cancel = function() {
self._jobCommand("cancel");
};
self._jobCommand = function(command, callback) {
self._jobCommand = function(command, payload, callback) {
if (arguments.length == 1) {
payload = {};
callback = undefined;
} else if (arguments.length == 2 && typeof payload === "function") {
callback = payload;
payload = {};
}
var data = _.extend(payload, {});
data.command = command;
$.ajax({
url: API_BASEURL + "job",
type: "POST",
dataType: "json",
contentType: "application/json; charset=UTF-8",
data: JSON.stringify({command: command}),
data: JSON.stringify(data),
success: function(response) {
if (callback != undefined) {
callback();
@@ -116,6 +116,7 @@ $(function() {
self.feature_waitForStart = ko.observable(undefined);
self.feature_alwaysSendChecksum = ko.observable(undefined);
self.feature_sdSupport = ko.observable(undefined);
self.feature_sdRelativePath = ko.observable(undefined);
self.feature_sdAlwaysAvailable = ko.observable(undefined);
self.feature_swallowOkAfterResend = ko.observable(undefined);
self.feature_repetierTargetTemp = ko.observable(undefined);
@@ -143,6 +144,9 @@ $(function() {
self.serial_disconnectOnErrors = ko.observable(undefined);
self.serial_triggerOkForM29 = ko.observable(undefined);
self.serial_supportResendsWithoutOk = ko.observable(undefined);
self.serial_maxTimeoutsIdle = ko.observable(undefined);
self.serial_maxTimeoutsPrinting = ko.observable(undefined);
self.serial_maxTimeoutsLong = ko.observable(undefined);
self.folder_uploads = ko.observable(undefined);
self.folder_timelapse = ko.observable(undefined);
@@ -463,6 +467,9 @@ $(function() {
self.serial_disconnectOnErrors(response.serial.disconnectOnErrors);
self.serial_triggerOkForM29(response.serial.triggerOkForM29);
self.serial_supportResendsWithoutOk(response.serial.supportResendsWithoutOk);
self.serial_maxTimeoutsIdle(response.serial.maxTimeoutsIdle);
self.serial_maxTimeoutsPrinting(response.serial.maxTimeoutsPrinting);
self.serial_maxTimeoutsLong(response.serial.maxTimeoutsLong);
self.folder_uploads(response.folder.uploads);
self.folder_timelapse(response.folder.timelapse);
@@ -555,7 +562,10 @@ $(function() {
"ignoreErrorsFromFirmware": self.serial_ignoreErrorsFromFirmware(),
"disconnectOnErrors": self.serial_disconnectOnErrors(),
"triggerOkForM29": self.serial_triggerOkForM29(),
"supportResendsWithoutOk": self.serial_supportResendsWithoutOk()
"supportResendsWithoutOk": self.serial_supportResendsWithoutOk(),
"maxTimeoutsIdle": self.serial_maxTimeoutsIdle(),
"maxTimeoutsPrinting": self.serial_maxTimeoutsPrinting(),
"maxTimeoutsLong": self.serial_maxTimeoutsLong()
},
"folder": {
"uploads": self.folder_uploads(),
+166 -95
View File
@@ -5,14 +5,15 @@ $(function() {
self.loginState = parameters[0];
self.printerProfiles = parameters[1];
self.file = ko.observable(undefined);
self.target = undefined;
self.file = undefined;
self.data = undefined;
self.defaultSlicer = undefined;
self.defaultProfile = undefined;
self.gcodeFilename = ko.observable();
self.destinationFilename = ko.observable();
self.gcodeFilename = self.destinationFilename; // TODO: for backwards compatiblity, mark deprecated ASAP
self.title = ko.observable();
self.slicer = ko.observable();
@@ -21,91 +22,16 @@ $(function() {
self.profiles = ko.observableArray();
self.printerProfile = ko.observable();
self.configured_slicers = ko.pureComputed(function() {
return _.filter(self.slicers(), function(slicer) {
return slicer.configured;
});
});
self.afterSlicingOptions = [
{"value": "none", "text": gettext("Do nothing")},
{"value": "select", "text": gettext("Select for printing")},
{"value": "print", "text": gettext("Start printing")}
];
self.afterSlicing = ko.observable("none");
self.show = function(target, file, force) {
if (!self.enableSlicingDialog() && !force) {
return;
self.slicersForFile = function(file) {
if (file === undefined) {
return [];
}
self.requestData();
self.target = target;
self.file = file;
self.title(_.sprintf(gettext("Slicing %(filename)s"), {filename: self.file}));
self.gcodeFilename(self.file.substr(0, self.file.lastIndexOf(".")));
self.printerProfile(self.printerProfiles.currentProfile());
self.afterSlicing("none");
$("#slicing_configuration_dialog").modal("show");
};
self.slicer.subscribe(function(newValue) {
self.profilesForSlicer(newValue);
});
self.enableSlicingDialog = ko.pureComputed(function() {
return self.configured_slicers().length > 0;
});
self.enableSliceButton = ko.pureComputed(function() {
return self.gcodeFilename() != undefined
&& self.gcodeFilename().trim() != ""
&& self.slicer() != undefined
&& self.profile() != undefined;
});
self.requestData = function(callback) {
$.ajax({
url: API_BASEURL + "slicing",
type: "GET",
dataType: "json",
success: function(data) {
self.fromResponse(data);
if (callback !== undefined) {
callback();
}
}
});
};
self.fromResponse = function(data) {
self.data = data;
var selectedSlicer = undefined;
self.slicers.removeAll();
_.each(_.values(data), function(slicer) {
var name = slicer.displayName;
if (name == undefined) {
name = slicer.key;
}
if (slicer.default && slicer.configured) {
selectedSlicer = slicer.key;
}
self.slicers.push({
key: slicer.key,
name: name,
configured: slicer.configured
return _.filter(self.configuredSlicers(), function(slicer) {
return _.any(slicer.sourceExtensions, function(extension) {
return _.endsWith(file.toLowerCase(), "." + extension.toLowerCase());
});
});
if (selectedSlicer != undefined) {
self.slicer(selectedSlicer);
self.profilesForSlicer(selectedSlicer);
}
self.defaultSlicer = selectedSlicer;
};
self.profilesForSlicer = function(key) {
@@ -135,19 +61,164 @@ $(function() {
})
});
if (selectedProfile != undefined) {
self.profile(selectedProfile);
}
self.profile(selectedProfile);
self.defaultProfile = selectedProfile;
};
self.resetProfiles = function() {
self.profiles.removeAll();
self.profile(undefined);
};
self.configuredSlicers = ko.pureComputed(function() {
return _.filter(self.slicers(), function(slicer) {
return slicer.configured;
});
});
self.matchingSlicers = ko.computed(function() {
var slicers = self.slicersForFile(self.file());
var containsSlicer = function(key) {
return _.any(slicers, function(slicer) {
return slicer.key == key;
});
};
var current = self.slicer();
if (!containsSlicer(current)) {
if (self.defaultSlicer !== undefined && containsSlicer(self.defaultSlicer)) {
self.slicer(self.defaultSlicer);
} else {
self.slicer(undefined);
self.resetProfiles();
}
} else {
self.profilesForSlicer(self.slicer());
}
return slicers;
});
self.afterSlicingOptions = [
{"value": "none", "text": gettext("Do nothing")},
{"value": "select", "text": gettext("Select for printing")},
{"value": "print", "text": gettext("Start printing")}
];
self.afterSlicing = ko.observable("none");
self.show = function(target, file, force) {
if (!self.enableSlicingDialog() && !force) {
return;
}
self.requestData();
self.target = target;
self.file(file);
self.title(_.sprintf(gettext("Slicing %(filename)s"), {filename: self.file()}));
self.destinationFilename(self.file().substr(0, self.file().lastIndexOf(".")));
self.printerProfile(self.printerProfiles.currentProfile());
self.afterSlicing("none");
$("#slicing_configuration_dialog").modal("show");
};
self.slicer.subscribe(function(newValue) {
if (newValue === undefined) {
self.resetProfiles();
} else {
self.profilesForSlicer(newValue);
}
});
self.enableSlicingDialog = ko.pureComputed(function() {
return self.configuredSlicers().length > 0;
});
self.enableSlicingDialogForFile = function(file) {
return self.slicersForFile(file).length > 0;
};
self.enableSliceButton = ko.pureComputed(function() {
return self.destinationFilename() != undefined
&& self.destinationFilename().trim() != ""
&& self.slicer() != undefined
&& self.profile() != undefined;
});
self.requestData = function(callback) {
$.ajax({
url: API_BASEURL + "slicing",
type: "GET",
dataType: "json",
success: function(data) {
self.fromResponse(data);
if (callback !== undefined) {
callback();
}
}
});
};
self.destinationExtension = ko.pureComputed(function() {
var fallback = "???";
if (self.slicer() === undefined) {
return fallback;
}
var slicer = self.data[self.slicer()];
if (slicer === undefined) {
return fallback;
}
var extensions = slicer.extensions;
if (extensions === undefined) {
return fallback;
}
var destinationExtensions = extensions.destination;
if (destinationExtensions === undefined || !destinationExtensions.length) {
return fallback;
}
return destinationExtensions[0] || fallback;
});
self.fromResponse = function(data) {
self.data = data;
var selectedSlicer = undefined;
self.slicers.removeAll();
_.each(_.values(data), function(slicer) {
var name = slicer.displayName;
if (name == undefined) {
name = slicer.key;
}
if (slicer.default && slicer.configured) {
selectedSlicer = slicer.key;
}
var props = {
key: slicer.key,
name: name,
configured: slicer.configured,
sourceExtensions: slicer.extensions.source,
destinationExtensions: slicer.extensions.destination
};
self.slicers.push(props);
});
self.defaultSlicer = selectedSlicer;
};
self.slice = function() {
var gcodeFilename = self._sanitize(self.gcodeFilename());
if (!_.endsWith(gcodeFilename.toLowerCase(), ".gco")
&& !_.endsWith(gcodeFilename.toLowerCase(), ".gcode")
&& !_.endsWith(gcodeFilename.toLowerCase(), ".g")) {
gcodeFilename = gcodeFilename + ".gco";
var destinationFilename = self._sanitize(self.destinationFilename());
var destinationExtensions = self.data[self.slicer()] && self.data[self.slicer()].extensions && self.data[self.slicer()].extensions.destination
? self.data[self.slicer()].extensions.destination
: ["???"];
if (!_.any(destinationExtensions, function(extension) {
return _.endsWith(destinationFilename.toLowerCase(), "." + extension.toLowerCase());
})) {
destinationFilename = destinationFilename + "." + destinationExtensions[0];
}
var data = {
@@ -155,7 +226,7 @@ $(function() {
slicer: self.slicer(),
profile: self.profile(),
printerProfile: self.printerProfile(),
gcode: gcodeFilename
destination: destinationFilename
};
if (self.afterSlicing() == "print") {
@@ -165,7 +236,7 @@ $(function() {
}
$.ajax({
url: API_BASEURL + "files/" + self.target + "/" + self.file,
url: API_BASEURL + "files/" + self.target + "/" + self.file(),
type: "POST",
dataType: "json",
contentType: "application/json; charset=UTF-8",
@@ -174,7 +245,7 @@ $(function() {
$("#slicing_configuration_dialog").modal("hide");
self.gcodeFilename(undefined);
self.destinationFilename(undefined);
self.slicer(self.defaultSlicer);
self.profile(self.defaultProfile);
};
+74
View File
@@ -513,6 +513,14 @@ ul.dropdown-menu li a {
}
}
/** State sidebar panel */
#state_wrapper {
hr {
margin: 5px 0;
}
}
/** GCODE file manager */
#files {
@@ -552,6 +560,20 @@ ul.dropdown-menu li a {
.additionalInfo {
padding-bottom: @line-height + 2px;
}
@highlight-color: yellow;
@keyframes highlightframes {
0% {
background: @highlight-color;
}
100% {
background: transparent;
}
}
&.highlight {
animation: highlightframes 2s;
}
}
}
@@ -1040,3 +1062,55 @@ _::-webkit-full-page-media, _:future, :root .full-sized-box {
input[type=number] {
text-align: right;
}
// Progress bars with text
//
// .progress-text-front will also need to have the full width of the enclosing
// progress wrapper applied (e.g. via copyWidth knockout binding)
.progress-text,
.progress-text-centered {
position: relative;
.progress-text-front,
.progress-text-back {
white-space: nowrap;
}
.progress-text-front {
box-sizing: border-box;
padding: 0 10px;
width: 100%;
display: block;
}
.progress-text-back {
position: absolute;
font-size: 12px;
line-height: 20px;
display: block;
box-sizing: border-box;
text-align: center;
padding: 0 10px;
}
.bar {
position: absolute;
overflow: hidden;
}
}
.progress-text-centered {
.progress-text-front {
position: absolute;
font-size: 12px;
line-height: 20px;
display: block;
text-align: center;
color: #fff;
}
.progress-text-back {
width: 100%;
}
}
+1 -1
View File
@@ -38,7 +38,7 @@
class="tab-pane {% if mark_active %}active{% set mark_active = False %}{% endif %} {% if classes_content in data %}{{ data.classes_content|join(' ') }}{% elif classes in data %}{{ data.classes|join(' ') }}{% endif %}"
{% if "styles_content" in data %} style="{{ data.styles_content|join(', ') }}" {% elif styles in data %} style="{{ data.styles|join(', ') }}" {% endif %}
>
{% include data.template ignore missing %}
{% try "There was an error with the template {filename} at line number {lineno}: {exception}" %}{% include data.template ignore missing %}{% endtry %}
</div>
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
{% endif %}
@@ -38,7 +38,7 @@
class="tab-pane {% if mark_active %}active{% set mark_active = False %}{% endif %} {% if classes_content in data %}{{ data.classes_content|join(' ') }}{% elif classes in data %}{{ data.classes|join(' ') }}{% endif %}"
{% if "styles_content" in data %} style="{{ data.styles_content|join(', ') }}" {% elif styles in data %} style="{{ data.styles|join(', ') }}" {% endif %}
>
{% include data.template ignore missing %}
{% try "There was an error with the template {filename} at line number {lineno}: {exception}" %}{% include data.template ignore missing %}{% endtry %}
</div>
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
{% endif %}
@@ -34,6 +34,13 @@
</label>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: feature_sdRelativePath" id="settings-sdRelativePath"> {{ _('Select SD files by relative path') }} <span class="label">{{ _('RepRap Firmware') }}</span>
</label>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
@@ -126,6 +126,24 @@
<input type="checkbox" data-bind="checked: serial_supportResendsWithoutOk" id="settings-supportResendsWithoutOk"> {{ _('Simulate an additional `ok` for resend requests') }}
</label>
</div>
<div class="control-group" title="{{ _('Maximum consecutive communication timeouts while idle. More than this and the printer will be considered to be gone. Set to 0 to disable.') }}">
<label class="control-label" for="settings-serialMaxTimeoutsIdle">{{ _('Max. consecutive timeouts while idle') }}</label>
<div class="controls">
<input type="number" min="0" class="input-mini text-right" id="settings-serialMaxTimeoutsIdle" data-bind="value: serial_maxTimeoutsIdle">
</div>
</div>
<div class="control-group" title="{{ _('Maximum consecutive communication timeouts while printing. More than this and the printer will be considered to be gone. Set to 0 to disable.') }}">
<label class="control-label" for="settings-serialMaxTimeoutsPrinting">{{ _('Max. consecutive timeouts while printing') }}</label>
<div class="controls">
<input type="number" min="0" class="input-mini text-right" id="settings-serialMaxTimeoutsPrinting" data-bind="value: serial_maxTimeoutsPrinting">
</div>
</div>
<div class="control-group" title="{{ _('Maximum consecutive communication timeouts while a long running command is active. More than this and the printer will be considered to be gone. Set to 0 to disable.') }}">
<label class="control-label" for="settings-serialMaxTimeoutsLong">{{ _('Max. consecutive timeouts during long running commands') }}</label>
<div class="controls">
<input type="number" min="0" class="input-mini text-right" id="settings-serialMaxTimeoutsLong" data-bind="value: serial_maxTimeoutsLong">
</div>
</div>
</div>
</div>
@@ -13,7 +13,7 @@
<div class="control-group">
<label class="control-label">{{ _('Slicer') }}</label>
<div class="controls">
<select data-bind="options: configured_slicers, optionsText: 'name', optionsValue: 'key', optionsCaption: '{{ _('Select a slicer...') }}', value: slicer, valueAllowUnset: true"></select>
<select data-bind="options: matchingSlicers, optionsText: 'name', optionsValue: 'key', optionsCaption: '{{ _('Select a slicer...') }}', value: slicer, valueAllowUnset: true"></select>
</div>
</div>
<div class="control-group">
@@ -29,11 +29,11 @@
</div>
</div>
<div class="control-group">
<label class="control-label">{{ _('GCode Filename') }}</label>
<label class="control-label">{{ _('Output Filename') }}</label>
<div class="controls">
<div class="input-append">
<input type="text" data-bind="value: gcodeFilename">
<span class="add-on">.gco</span>
<input type="text" data-bind="value: destinationFilename">
<span class="add-on" data-bind="text: '.' + destinationExtension()"></span>
</div>
</div>
</div>
@@ -35,7 +35,7 @@
class="tab-pane {% if mark_active %}active{% set mark_active = False %}{% endif %} {% if classes_content in data %}{{ data.classes_content|join(' ') }}{% elif classes in data %}{{ data.classes|join(' ') }}{% endif %}"
{% if "styles_content" in data %} style="{{ data.styles_content|join(', ') }}" {% elif styles in data %} style="{{ data.styles|join(', ') }}" {% endif %}
>
{% include data.template ignore missing %}
{% try "There was an error with the template {filename} at line number {lineno}: {exception}" %}{% include data.template ignore missing %}{% endtry %}
</div>
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
{% endif %}
+5 -5
View File
@@ -31,7 +31,7 @@
{% if "classes" in data %}class="{{ data.classes|join(' ') }}"{% endif %}
{% if "styles" in data %}style="{{ data.styles|join(', ') }}"{% endif %}
>
{% include data.template ignore missing %}
{% try "There was an error with the template {filename} at line number {lineno}: {exception}" %}{% include data.template ignore missing %}{% endtry %}
</li>
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
{% endfor %}
@@ -58,7 +58,7 @@
{% if "icon" in data %}<i class="icon-{{ data.icon }}"></i> {% endif %}{{ entry|e }}
</a>
{% if "template_header" in data %}
{% include data.template_header ignore missing %}
{% try "There was an error with the template {filename} at line number {lineno}: {exception}" %}{% include data.template_header ignore missing %}{% endtry %}
{% endif %}
</div>
<div id="{{ data._div }}"
@@ -66,7 +66,7 @@
{% if "styles_content" in data %} style="{{ data.styles_content|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}"{% endif %}
>
<div class="accordion-inner">
{% include data.template ignore missing %}
{% try "There was an error with the template {filename} at line number {lineno}: {exception}" %}{% include data.template ignore missing %}{% endtry %}
</div>
</div>
</div>
@@ -102,7 +102,7 @@
{% if "data_bind" in data %}data-bind="{{ data.data_bind }}"{% endif %}
{% if "styles_content" in data %} style="{{ data.styles_content|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}" {% endif %}
>
{% include data.template ignore missing %}
{% try "There was an error with the template {filename} at line number {lineno}: {exception}" %}{% include data.template ignore missing %}{% endtry %}
</div>
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
{% endfor %}
@@ -142,7 +142,7 @@
<!-- Generic plugin template files -->
{% for key in templates.generic.order %}
{% set data = templates.generic.entries[key] %}
{% include data.template ignore missing %}
{% try "<!-- There was an error with the template {filename} at line number {lineno}: {exception} -->" %}{% include data.template ignore missing %}{% endtry %}
{% endfor %}
<!-- End of generic plugin template files -->
@@ -29,6 +29,7 @@
var BRANCH = "{{ branch|e }}";
var LOCALE = "{{ g.locale|e }}";
var AVAILABLE_LOCALES = {{ locales|tojson }};
var SUPPORTED_EXTENSIONS = {{ supportedExtensions|tojson }};
var OCTOPRINT_VIEWMODELS = [];
var ADDITIONAL_VIEWMODELS = [];
+5 -2
View File
@@ -57,8 +57,11 @@
</span>
{% endif %}
</div>
<div id="gcode_upload_progress" class="progress" style="width: 100%;">
<div class="bar" style="width: 0%"></div>
<div id="gcode_upload_progress" class="progress progress-text-centered">
<span class="progress-text-back" data-bind="text: uploadProgressText"></span>
<div class="bar">
<span class="progress-text-front" data-bind="copyWidth: ':parent :parent :parent :parent form', text: uploadProgressText"></span>
</div>
</div>
<div>
<small class="muted">{{ _('Hint: You can also drag and drop files on this page to upload them.') }}</small>
+9 -4
View File
@@ -1,20 +1,25 @@
{{ _('Machine State') }}: <strong data-bind="text: stateString"></strong><br>
<hr>
{{ _('File') }}: <strong data-bind="text: filename"></strong>&nbsp;<strong data-bind="visible: sd">(SD)</strong><br>
{{ _('Timelapse') }}: <strong data-bind="text: timelapseString"></strong><br>
<!-- ko foreach: filament -->
<span data-bind="text: 'Filament (' + name() + '): '"></span><strong data-bind="text: formatFilament(data())"></strong><br>
<!-- /ko -->
{{ _('Approx. Total Print Time') }}: <strong data-bind="text: estimatedPrintTimeString"></strong><br>
<hr>
{{ _('Print Time') }}: <strong data-bind="text: printTimeString"></strong><br>
{{ _('Print Time Left') }}: <strong data-bind="text: printTimeLeftString"></strong><br>
{{ _('Print Time Left') }}: <strong data-bind="text: printTimeLeftString"></strong> <span id="state_printtimeleft_popover" style="display: none" data-bind="visible: printTimeLeftOrigin, attr: {title: printTimeLeftOriginString}, css: printTimeLeftOriginClass">&#9679;</span><br>
{{ _('Printed') }}: <strong data-bind="text: byteString"></strong><br>
<div class="progress">
<div class="bar" id="job_progressBar" data-bind="style: { width: progressString() + '%' }"></div>
<div class="progress progress-text-centered">
<span class="progress-text-back" data-bind="text: progressBarString()"></span>
<div class="bar" id="job_progressBar" data-bind="style: {width: progressString() + '%'}">
<span class="progress-text-front" data-bind="copyWidth: ':parent :parent', text: progressBarString()"></span>
</div>
</div>
<div class="row-fluid print-control" style="display: none;" data-bind="visible: loginState.isUser">
<button class="btn btn-primary span4" data-bind="click: print, enable: enablePrint, css: {'btn-danger': isPaused()}, attr: {title: titlePrintButton}" id="job_print"><i class="icon-white" data-bind="css: {'icon-print': !isPaused(), 'icon-undo': isPaused()}"></i> <span data-bind="text: (isPaused() ? '{{ _('Restart') }}' : '{{ _('Print') }}')">{{ _('Print') }}</span></button>
<button class="btn span4" id="job_pause" data-bind="click: pause, enable: enablePause, css: {active: isPaused()}, attr: {title: titlePauseButton}"><i data-bind="css: {'icon-pause': !isPaused(), 'icon-play': isPaused()}"></i> <span data-bind="visible: !isPaused()">{{ _('Pause') }}</span><span data-bind="visible: isPaused()">{{ _('Resume') }}</span></button>
<button class="btn span4" id="job_pause" data-bind="click: function() { isPaused() ? onlyResume() : onlyPause(); }, enable: enablePause, css: {active: isPaused()}, attr: {title: titlePauseButton}"><i data-bind="css: {'icon-pause': !isPaused(), 'icon-play': isPaused()}"></i> <span data-bind="visible: !isPaused()">{{ _('Pause') }}</span><span data-bind="visible: isPaused()">{{ _('Resume') }}</span></button>
<button class="btn span4" id="job_cancel" data-bind="click: cancel, enable: enableCancel" title="{{ _('Cancels the print job') }}"><i class="icon-stop"></i> {{ _('Cancel') }}</button>
</div>
@@ -5,8 +5,11 @@
<input id="gcode_slider_commands" type="text" style="width: 554px">
</div>
<div class="progress" >
<div class="bar" style="width: 0%;" data-bind="text: ui_progress_text, style: { width: ui_progress_percentage() + '%' }"></div>
<div class="progress progress-text-centered">
<span class="progress-text-back" data-bind="text: ui_progress_text"></span>
<div class="bar" style="width: 0;" data-bind="style: { width: ui_progress_percentage() + '%' }">
<span class="progress-text-front" data-bind="copyWidth: ':parent :parent', text: ui_progress_text"></span>
</div>
</div>
<div class="row-fluid">
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-06-08 11:03+0200\n"
"PO-Revision-Date: 2016-06-08 11:04+0100\n"
"POT-Creation-Date: 2016-07-28 11:50+0200\n"
"PO-Revision-Date: 2016-07-28 12:03+0100\n"
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
"Language: de\n"
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
@@ -19,7 +19,7 @@ msgstr ""
"Generated-By: Babel 2.2.0\n"
"X-Generator: Poedit 1.6.8\n"
#: src/octoprint/plugins/announcements/__init__.py:85
#: src/octoprint/plugins/announcements/__init__.py:89
#: src/octoprint/plugins/announcements/templates/announcements.jinja2:4
#: src/octoprint/plugins/announcements/templates/announcements_navbar.jinja2:1
msgid "Announcements"
@@ -56,7 +56,6 @@ msgstr "Zuletzt gelesen"
#: src/octoprint/plugins/announcements/templates/announcements.jinja2:43
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:87
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:197
#: src/octoprint/templates/dialogs/about.jinja2:51
#: src/octoprint/templates/dialogs/settings/appearance.jinja2:96
msgid "Close"
msgstr "Schließen"
@@ -200,7 +199,6 @@ msgstr ""
" Tools wie z.B. Repetier Host.\n"
#: src/octoprint/plugins/cura/templates/cura_settings.jinja2:121
#: src/octoprint/templates/dialogs/usersettings.jinja2:46
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:80
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:109
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:151
@@ -209,7 +207,6 @@ msgid "Abort"
msgstr "Abbrechen"
#: src/octoprint/plugins/cura/templates/cura_settings.jinja2:122
#: src/octoprint/templates/dialogs/usersettings.jinja2:47
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:81
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:110
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:152
@@ -479,7 +476,6 @@ msgstr "Gebundled"
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:48
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:129
#: src/octoprint/templates/index.jinja2:118
msgid "Homepage"
msgstr "Homepage"
@@ -620,15 +616,13 @@ msgstr "Repository-Cache TTL"
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:26
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:101
#: src/octoprint/templates/dialogs/confirmation.jinja2:11
#: src/octoprint/templates/dialogs/settings.jinja2:52
#: src/octoprint/templates/dialogs/slicing.jinja2:50
#: src/octoprint/templates/sidebar/state.jinja2:19
#: src/octoprint/templates/sidebar/state.jinja2:24
msgid "Cancel"
msgstr "Abbruch"
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:240
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:102
#: src/octoprint/templates/dialogs/settings.jinja2:53
msgid "Save"
msgstr "Speichern"
@@ -905,7 +899,7 @@ msgid "GCode Viewer"
msgstr "GCode Viewer"
#: src/octoprint/server/views.py:146
#: src/octoprint/templates/sidebar/state.jinja2:3
#: src/octoprint/templates/sidebar/state.jinja2:4
msgid "Timelapse"
msgstr "Zeitraffer"
@@ -976,75 +970,34 @@ msgstr "Zugriff"
msgid "Interface"
msgstr "Interface"
#: src/octoprint/static/js/app/dataupdater.js:92
#: src/octoprint/static/js/app/dataupdater.js:127
#: src/octoprint/static/js/app/dataupdater.js:96
#: src/octoprint/static/js/app/dataupdater.js:131
#: src/octoprint/static/js/app/helpers.js:451
#: src/octoprint/templates/overlays/offline.jinja2:6
msgid "Server is offline"
msgstr "Der Server ist offline"
#: src/octoprint/static/js/app/dataupdater.js:93
#: src/octoprint/static/js/app/dataupdater.js:97
msgid "The server appears to be offline, at least I'm not getting any response from it. I'll try to reconnect automatically <strong>over the next couple of minutes</strong>, however you are welcome to try a manual reconnect anytime using the button below."
msgstr "Der Server scheint offline zu sein, zumindest kann ich mich nicht mit ihm verbinden. Ich werde <strong>in den nächsten Minuten</strong> versuchen mich erneut zu verbinden, aber Du kannst mittels des folgenden Buttons auch jederzeit einen manuellen Verbindungsversuch anstoßen."
#: src/octoprint/static/js/app/dataupdater.js:128
#: src/octoprint/static/js/app/dataupdater.js:132
msgid "The server appears to be offline, at least I'm not getting any response from it. I <strong>could not reconnect automatically</strong>, but you may try a manual reconnect using the button below."
msgstr "Der Server scheint offline zu sein, zumindest kann ich mich nicht mit ihm verbinden. Ich <strong>konnte mich nicht automatisch neu verbinden</strong>, aber Du kannst mittels des folgenden Buttons einen manuellen Verbindungsversuch anstoßen."
#: src/octoprint/static/js/app/dataupdater.js:206
#: src/octoprint/static/js/app/dataupdater.js:226
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr "Slice ... (%(percentage)d%%)"
#: src/octoprint/static/js/app/dataupdater.js:228
msgid "Slicing ..."
msgstr "Slice ..."
#: src/octoprint/static/js/app/dataupdater.js:234
msgid "Slicing done"
msgstr "Slicing abgeschlossen"
#: src/octoprint/static/js/app/dataupdater.js:234
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr "%(stl)s nach %(gcode)s geslicet, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/dataupdater.js:244
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr "Konnte %(stl)s nicht nach %(gcode)s slicen: %(reason)s"
#: src/octoprint/static/js/app/dataupdater.js:245
msgid "Slicing failed"
msgstr "Slicing fehlgeschlagen"
#: src/octoprint/static/js/app/dataupdater.js:249
msgid "Streaming ..."
msgstr "Streaming ..."
#: src/octoprint/static/js/app/dataupdater.js:255
msgid "Streaming done"
msgstr "Streaming abgeschlossen"
#: src/octoprint/static/js/app/dataupdater.js:256
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr "%(local)s nach %(remote)s gestreamt, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/dataupdater.js:262
#: src/octoprint/static/js/app/dataupdater.js:270
#: src/octoprint/static/js/app/dataupdater.js:230
#: src/octoprint/static/js/app/dataupdater.js:238
msgid "Unhandled communication error"
msgstr "Unbehandelter Kommunikationsfehler"
#: src/octoprint/static/js/app/dataupdater.js:263
#: src/octoprint/static/js/app/dataupdater.js:231
#, python-format
msgid "There was an unhandled error while talking to the printer. Due to that the ongoing print job was cancelled. Error: %(firmwareError)s"
msgstr "Es gab einen unbehandelten Fehler bei der Kommunikation mit dem Drucker. Daher wurder der laufende Druckauftrag abgebrochen. Fehler: %(firmwareError)s"
#: src/octoprint/static/js/app/dataupdater.js:271
#, python-format
msgid "The was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"
#: src/octoprint/static/js/app/dataupdater.js:239
#, fuzzy, python-format
msgid "There was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"
msgstr "Es gab einen unbehandelten Fehler bei der Kommunikation mit dem Drucker. Daher hat OctoPrint die Verbindung getrennt. Fehler: %(error)s"
#: src/octoprint/static/js/app/helpers.js:372
@@ -1119,15 +1072,15 @@ msgid "Disconnect"
msgstr "Trennen"
#: src/octoprint/static/js/app/viewmodels/control.js:65
#: src/octoprint/static/js/app/viewmodels/files.js:329
#: src/octoprint/static/js/app/viewmodels/gcode.js:465
#: src/octoprint/static/js/app/viewmodels/printerstate.js:177
#: src/octoprint/static/js/app/viewmodels/temperature.js:56
#: src/octoprint/static/js/app/viewmodels/files.js:348
#: src/octoprint/static/js/app/viewmodels/gcode.js:471
#: src/octoprint/static/js/app/viewmodels/printerstate.js:228
#: src/octoprint/static/js/app/viewmodels/temperature.js:58
msgid "Tool"
msgstr "Werkzeug"
#: src/octoprint/static/js/app/viewmodels/control.js:71
#: src/octoprint/static/js/app/viewmodels/temperature.js:67
#: src/octoprint/static/js/app/viewmodels/temperature.js:69
msgid "Hotend"
msgstr "Hotend"
@@ -1143,32 +1096,74 @@ msgstr "Dein verfügbarer freier Plattenplatz wird langsam knapp."
msgid "Your current disk usage."
msgstr "Dein aktuell verfügbarer freier Plattenplatz."
#: src/octoprint/static/js/app/viewmodels/files.js:324
#: src/octoprint/static/js/app/viewmodels/files.js:329
#: src/octoprint/static/js/app/viewmodels/files.js:343
#: src/octoprint/static/js/app/viewmodels/files.js:348
msgid "Filament"
msgstr "Filament"
#: src/octoprint/static/js/app/viewmodels/files.js:333
#: src/octoprint/static/js/app/viewmodels/files.js:352
msgid "Estimated Print Time"
msgstr "Geschätzte Druckdauer"
#: src/octoprint/static/js/app/viewmodels/files.js:336
#: src/octoprint/static/js/app/viewmodels/files.js:355
msgid "Last Printed"
msgstr "Zuletzt gedruckt"
#: src/octoprint/static/js/app/viewmodels/files.js:338
#: src/octoprint/static/js/app/viewmodels/files.js:357
msgid "Last Print Time"
msgstr "Letzte Druckdauer"
#: src/octoprint/static/js/app/viewmodels/files.js:520
msgid "Could not upload the file. Make sure that it is a GCODE file and has the extension \".gcode\" or \".gco\" or that it is an STL file with the extension \".stl\"."
msgstr "Konnte die Datei nicht hochladen. Bitte stelle sicher, dass es sich um eine GCODE-Datei mit der Extension \".gcode\" oder \".gco\" oder um eine STL-Datei mit der Extension \".stl\" handelt."
#: src/octoprint/static/js/app/viewmodels/files.js:460
#: src/octoprint/static/js/app/viewmodels/files.js:467
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr "Slice ... (%(percentage)d%%)"
#: src/octoprint/static/js/app/viewmodels/files.js:541
#: src/octoprint/static/js/app/viewmodels/files.js:462
msgid "Slicing ..."
msgstr "Slice ..."
#: src/octoprint/static/js/app/viewmodels/files.js:488
msgid "Slicing done"
msgstr "Slicing abgeschlossen"
#: src/octoprint/static/js/app/viewmodels/files.js:489
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr "%(stl)s nach %(gcode)s geslicet, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/viewmodels/files.js:504
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr "Konnte %(stl)s nicht nach %(gcode)s slicen: %(reason)s"
#: src/octoprint/static/js/app/viewmodels/files.js:505
msgid "Slicing failed"
msgstr "Slicing fehlgeschlagen"
#: src/octoprint/static/js/app/viewmodels/files.js:522
msgid "Streaming ..."
msgstr "Streaming ..."
#: src/octoprint/static/js/app/viewmodels/files.js:534
msgid "Streaming done"
msgstr "Streaming abgeschlossen"
#: src/octoprint/static/js/app/viewmodels/files.js:535
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr "%(local)s nach %(remote)s gestreamt, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/viewmodels/files.js:627
#, python-format
msgid "Could not upload the file. Make sure that it is a valid file with one of these extensions: %(extensions)s"
msgstr "Konnte die Datei nicht hochladen. Bitte stelle sicher, dass es sich um eine valide Datei mit einer dieser Erweiterungen ist: %(extensions)s"
#: src/octoprint/static/js/app/viewmodels/files.js:654
msgid "Uploading ..."
msgstr "Uploade ..."
#: src/octoprint/static/js/app/viewmodels/files.js:548
#: src/octoprint/static/js/app/viewmodels/files.js:660
msgid "Saving ..."
msgstr "Speichere ..."
@@ -1188,52 +1183,52 @@ msgstr "Analysiere..."
msgid "Analyzed"
msgstr "Analysiert"
#: src/octoprint/static/js/app/viewmodels/gcode.js:431
#: src/octoprint/static/js/app/viewmodels/gcode.js:437
msgid "Model size"
msgstr "Modelgröße"
#: src/octoprint/static/js/app/viewmodels/gcode.js:432
#: src/octoprint/static/js/app/viewmodels/gcode.js:438
msgid "Estimated total print time"
msgstr "Geschätzte Gesamtdruckdauer"
#: src/octoprint/static/js/app/viewmodels/gcode.js:433
#: src/octoprint/static/js/app/viewmodels/gcode.js:439
msgid "Estimated layer height"
msgstr "Geschätzte Schichthöhe"
#: src/octoprint/static/js/app/viewmodels/gcode.js:433
#: src/octoprint/static/js/app/viewmodels/gcode.js:439
msgid "mm"
msgstr "mm"
#: src/octoprint/static/js/app/viewmodels/gcode.js:434
#: src/octoprint/static/js/app/viewmodels/gcode.js:440
msgid "Layer count"
msgstr "Schichtanzahl"
#: src/octoprint/static/js/app/viewmodels/gcode.js:434
#: src/octoprint/static/js/app/viewmodels/gcode.js:440
msgid "printed"
msgstr "gedruckt"
#: src/octoprint/static/js/app/viewmodels/gcode.js:434
#: src/octoprint/static/js/app/viewmodels/gcode.js:440
msgid "visited"
msgstr "besucht"
#: src/octoprint/static/js/app/viewmodels/gcode.js:457
#: src/octoprint/static/js/app/viewmodels/gcode.js:463
msgid "Layer number"
msgstr "Schichtnummer"
#: src/octoprint/static/js/app/viewmodels/gcode.js:458
#: src/octoprint/static/js/app/viewmodels/gcode.js:464
msgid "Layer height"
msgstr "Schichthöhe"
#: src/octoprint/static/js/app/viewmodels/gcode.js:459
#: src/octoprint/static/js/app/viewmodels/gcode.js:465
msgid "GCODE commands in layer"
msgstr "GCODE Befehle in Schicht"
#: src/octoprint/static/js/app/viewmodels/gcode.js:462
#: src/octoprint/static/js/app/viewmodels/gcode.js:465
#: src/octoprint/static/js/app/viewmodels/gcode.js:468
#: src/octoprint/static/js/app/viewmodels/gcode.js:471
msgid "Filament used by layer"
msgstr "Genutztes Filament in Schicht"
#: src/octoprint/static/js/app/viewmodels/gcode.js:469
#: src/octoprint/static/js/app/viewmodels/gcode.js:475
msgid "Print time for layer"
msgstr "Druckdauer für Schicht"
@@ -1371,52 +1366,76 @@ msgstr "Druckerprofil hinzufügen"
msgid "Edit Printer Profile \"%(name)s\""
msgstr "Druckerprofile \"%(name)s\" bearbeiten"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:44
#: src/octoprint/static/js/app/viewmodels/printerstate.js:45
msgid "Restarts the print job from the beginning"
msgstr "Started den Druckjob von vorne"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:45
#: src/octoprint/static/js/app/viewmodels/printerstate.js:46
msgid "Starts the print job"
msgstr "Startet den Druckjob"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:46
#: src/octoprint/static/js/app/viewmodels/printerstate.js:47
msgid "Resumes the print job"
msgstr "Setzt den Druckjob fort"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:47
#: src/octoprint/static/js/app/viewmodels/printerstate.js:48
msgid "Pauses the print job"
msgstr "Pausiert den Druckjob"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:80
#: src/octoprint/static/js/app/viewmodels/printerstate.js:81
msgid "Calculating..."
msgstr "Wird ermittelt..."
#: src/octoprint/static/js/app/viewmodels/printerstate.js:93
#: src/octoprint/static/js/app/viewmodels/printerstate.js:91
msgid "Based on a linear approximation (accuracy highly dependent on the model)"
msgstr "Basiert auf einer linearen Approximation (Genauigkeit hängt stark vom Modell ab)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:94
msgid "Based on the estimate from analysis of file (medium accuracy)"
msgstr "Basiert auf der Schätzung der Analyse der Datei (mittlere Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:97
msgid "Based on a mix of estimate from analysis and calculation (medium accuracy)"
msgstr "Basiert auf einem Mix der Schätzung aus der Analyse und der Berechnung (mittlere Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:100
msgid "Based on the average total of past prints of this model with the same printer profile (usually good accuracy)"
msgstr "Basiert auf der durchschnittlichen Dauer vergangener Druckjobs dieses Modells mit dem selben Druckerprofil (normalerweise gute Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:103
msgid "Based on a mix of average total from past prints and calculation (usually good accuracy)"
msgstr "Basiert auf einem Mix der durschnittlichen Dauer vergangener Druckjobs und der Berechnung (normalerweise gute Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:106
msgid "Based on the calculated estimate (best accuracy)"
msgstr "Basiert auf der berechneten Schätzung (beste Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:144
msgid "Continue"
msgstr "Fortsetzen"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:95
#: src/octoprint/templates/sidebar/state.jinja2:18
#: src/octoprint/static/js/app/viewmodels/printerstate.js:146
#: src/octoprint/templates/sidebar/state.jinja2:23
msgid "Pause"
msgstr "Pause"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:106
#: src/octoprint/static/js/app/viewmodels/printerstate.js:157
#: src/octoprint/templates/tabs/timelapse.jinja2:11
msgid "On Z Change"
msgstr "Bei Ebenenwechsel"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:108
#: src/octoprint/static/js/app/viewmodels/printerstate.js:159
#: src/octoprint/templates/tabs/timelapse.jinja2:10
msgid "Timed"
msgstr "Nach Zeit"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:108
#: src/octoprint/static/js/app/viewmodels/printerstate.js:159
#: src/octoprint/templates/tabs/timelapse.jinja2:25
#: src/octoprint/templates/tabs/timelapse.jinja2:32
msgid "sec"
msgstr "Sek"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:216
#: src/octoprint/static/js/app/viewmodels/printerstate.js:268
msgid "This will restart the print job from the beginning."
msgstr "Der Druckjob wird zurückgesetzt und von vorne begonnen."
@@ -1434,43 +1453,43 @@ msgstr "weiß"
msgid "Autodetect from browser"
msgstr "Automatisch vom Browser erkennen"
#: src/octoprint/static/js/app/viewmodels/slicing.js:31
#: src/octoprint/static/js/app/viewmodels/slicing.js:104
msgid "Do nothing"
msgstr "Nichts machen"
#: src/octoprint/static/js/app/viewmodels/slicing.js:32
#: src/octoprint/static/js/app/viewmodels/slicing.js:105
msgid "Select for printing"
msgstr "Zum Drucken auswählen"
#: src/octoprint/static/js/app/viewmodels/slicing.js:33
#: src/octoprint/static/js/app/viewmodels/slicing.js:106
msgid "Start printing"
msgstr "Drucken"
#: src/octoprint/static/js/app/viewmodels/slicing.js:45
#: src/octoprint/static/js/app/viewmodels/slicing.js:118
#, python-format
msgid "Slicing %(filename)s"
msgstr "Slice %(filename)s"
#: src/octoprint/static/js/app/viewmodels/temperature.js:23
#: src/octoprint/static/js/app/viewmodels/temperature.js:74
#: src/octoprint/static/js/app/viewmodels/temperature.js:76
#: src/octoprint/templates/dialogs/settings/temperatures.jinja2:16
msgid "Bed"
msgstr "Bett"
#: src/octoprint/static/js/app/viewmodels/temperature.js:112
#: src/octoprint/static/js/app/viewmodels/temperature.js:115
msgid "just now"
msgstr "gerade eben"
#: src/octoprint/static/js/app/viewmodels/temperature.js:114
#: src/octoprint/static/js/app/viewmodels/temperature.js:117
msgid "min"
msgstr "Min"
#: src/octoprint/static/js/app/viewmodels/temperature.js:253
#: src/octoprint/static/js/app/viewmodels/temperature.js:256
#: src/octoprint/templates/tabs/temperature.jinja2:11
msgid "Actual"
msgstr "Ist"
#: src/octoprint/static/js/app/viewmodels/temperature.js:258
#: src/octoprint/static/js/app/viewmodels/temperature.js:261
#: src/octoprint/templates/tabs/temperature.jinja2:12
msgid "Target"
msgstr "Soll"
@@ -1554,31 +1573,6 @@ msgstr "Neue Zeitrafferaufnahme %(movie_prefix)s wurde fertig gerendert"
msgid "Site default"
msgstr "Seitenvoreinstellung"
#: src/octoprint/templates/index.jinja2:115
msgid "Version"
msgstr "Version"
#: src/octoprint/templates/index.jinja2:119
msgid "Sourcecode"
msgstr "Quellcode"
#: src/octoprint/templates/index.jinja2:120
msgid "Documentation"
msgstr "Dokumentation"
#: src/octoprint/templates/index.jinja2:121
msgid "Bugs and Requests"
msgstr "Bugs und Requests"
#: src/octoprint/templates/index.jinja2:122
msgid "About"
msgstr "Über"
#: src/octoprint/templates/dialogs/about.jinja2:4
#: src/octoprint/templates/dialogs/settings.jinja2:51
msgid "About OctoPrint"
msgstr "Über OctoPrint"
#: src/octoprint/templates/dialogs/confirmation.jinja2:4
msgid "Are you sure?"
msgstr "Bist Du sicher?"
@@ -1674,10 +1668,6 @@ msgstr "Zugangsbeschränkung deaktivieren"
msgid "Keep Access Control Enabled"
msgstr "Zugangsbeschränkung aktiviert lassen"
#: src/octoprint/templates/dialogs/settings.jinja2:4
msgid "OctoPrint Settings"
msgstr "OctoPrint Einstellungen"
#: src/octoprint/templates/dialogs/slicing.jinja2:8
msgid "Slicing is currently disabled since no slicer has been configured yet. Please configure a slicer under \"Settings\"."
msgstr "Slicing ist aktuell deaktiviert da noch kein Slicer konfiguriert wurde. Bitte konfiguriere einen Slicer unter \"Settings\"."
@@ -1712,8 +1702,8 @@ msgid "Select a printer profile..."
msgstr "Wähle ein Druckerprofil..."
#: src/octoprint/templates/dialogs/slicing.jinja2:32
msgid "GCode Filename"
msgstr "GCode Dateiname"
msgid "Output Filename"
msgstr "Ausgabedateiname"
#: src/octoprint/templates/dialogs/slicing.jinja2:41
msgid "After slicing..."
@@ -1724,11 +1714,6 @@ msgstr "Nach dem Slicing..."
msgid "Slice"
msgstr "Slicen"
#: src/octoprint/templates/dialogs/usersettings.jinja2:4
#: src/octoprint/templates/navbar/login.jinja2:16
msgid "User Settings"
msgstr "Nutzereinstellungen"
#: src/octoprint/templates/dialogs/about/about.jinja2:3
msgid "The snappy web interface for your 3D printer"
msgstr "The snappy web interface for your 3D printer"
@@ -1922,31 +1907,39 @@ msgid "Wait for <code>start</code> on connect"
msgstr "Bei der Verbindung auf <code>start</code> warten"
#: src/octoprint/templates/dialogs/settings/features.jinja2:40
msgid "Select SD files by relative path"
msgstr "SD Dateien per relativem Pfad addressieren"
#: src/octoprint/templates/dialogs/settings/features.jinja2:40
msgid "RepRap Firmware"
msgstr "RepRap Firmware"
#: src/octoprint/templates/dialogs/settings/features.jinja2:47
msgid "Always assume SD card is present"
msgstr "Immer davon ausgehen, dass eine SD-Karte vorhanden ist"
#: src/octoprint/templates/dialogs/settings/features.jinja2:40
#: src/octoprint/templates/dialogs/settings/features.jinja2:47
#: src/octoprint/templates/dialogs/settings/features.jinja2:54
#: src/octoprint/templates/dialogs/settings/features.jinja2:61
#: src/octoprint/templates/dialogs/settings/features.jinja2:68
#: src/octoprint/templates/dialogs/settings/features.jinja2:75
msgid "Repetier"
msgstr "Repetier"
#: src/octoprint/templates/dialogs/settings/features.jinja2:47
#: src/octoprint/templates/dialogs/settings/features.jinja2:54
msgid "Send a checksum with <strong>every</strong> command"
msgstr "Eine Prüfsumme mit <strong>jedem</strong> Befehl senden"
#: src/octoprint/templates/dialogs/settings/features.jinja2:54
#: src/octoprint/templates/dialogs/settings/features.jinja2:61
msgid "Ignore consecutive resend requests for the same line"
msgstr "Aufeinanderfolgende Resend Requests für die selbe Zeilennummer ignorieren"
#: src/octoprint/templates/dialogs/settings/features.jinja2:61
#: src/octoprint/templates/dialogs/settings/features.jinja2:68
#, python-format
msgid "Support <code>TargetExtr%%n</code>/<code>TargetBed</code> target temperature format"
msgstr "<code>TargetExtr%%n</code>/<code>TargetBed</code> Zieltemperaturformat unterstützen"
#: src/octoprint/templates/dialogs/settings/features.jinja2:68
#: src/octoprint/templates/dialogs/settings/features.jinja2:75
msgid "Disable detection of external heatups"
msgstr "Detektierung externer Aufheizvorgänge deaktivieren"
@@ -1985,7 +1978,7 @@ msgstr "Falls der freie Plattenplatz unter diese Schwellwerte fallen sollte wird
#: src/octoprint/templates/dialogs/settings/folders.jinja2:47
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:69
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:90
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:66
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:69
#: src/octoprint/templates/tabs/timelapse.jinja2:13
msgid "Warning"
msgstr "Warnung"
@@ -2261,6 +2254,30 @@ msgstr "Viele Marlin < v1.1.0"
msgid "Simulate an additional `ok` for resend requests"
msgstr "Zusätzliches `ok` für Resendrequests simulieren"
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:129
msgid "Maximum consecutive communication timeouts while idle. More than this and the printer will be considered to be gone. Set to 0 to disable."
msgstr "Maximale Anzahl aufeinanderfolgender Communication Timeouts im Idlezustand. Mehr als das und es wird angenommen, dass der Drucker offline ist. Auf 0 setzen um das zu verhindern."
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:130
msgid "Max. consecutive timeouts while idle"
msgstr "Max. aufeinanderfolgende Timeouts wenn idle"
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:135
msgid "Maximum consecutive communication timeouts while printing. More than this and the printer will be considered to be gone. Set to 0 to disable."
msgstr "Maximale Anzahl aufeinanderfolgender Communication Timeouts beim Drucken. Mehr als das und es wird angenommen, dass der Drucker offline ist. Auf 0 setzen um das zu verhindern."
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:136
msgid "Max. consecutive timeouts while printing"
msgstr "Max. aufeinanderfolgende Timeouts beim Drucken"
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:141
msgid "Maximum consecutive communication timeouts while a long running command is active. More than this and the printer will be considered to be gone. Set to 0 to disable."
msgstr "Maximale Anzahl aufeinanderfolgender Communication Timeouts wenn ein lang laufender Befehl aktiv ist. Mehr als das und es wird angenommen, dass der Drucker offline ist. Auf 0 setzen um das zu verhindern."
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:142
msgid "Max. consecutive timeouts during long running commands"
msgstr "Max. aufeinanderfolgende Timeouts während lang laufender Befehle"
#: src/octoprint/templates/dialogs/settings/server.jinja2:2
msgid "Commands"
msgstr "Befehle"
@@ -2385,6 +2402,10 @@ msgstr "Änderungen der Oberflächensprache werden erst nach einem Neuladen der
msgid "Remember me"
msgstr "Login merken"
#: src/octoprint/templates/navbar/login.jinja2:16
msgid "User Settings"
msgstr "Nutzereinstellungen"
#: src/octoprint/templates/navbar/login.jinja2:17
msgid "Logout"
msgstr "Logout"
@@ -2465,7 +2486,7 @@ msgstr "Frei"
msgid "Total"
msgstr "Gesamt"
#: src/octoprint/templates/sidebar/files.jinja2:64
#: src/octoprint/templates/sidebar/files.jinja2:67
msgid "Hint: You can also drag and drop files on this page to upload them."
msgstr "Hinweis: Du kannst auch Dateien auf diese Seite ziehen um sie hochzuladen."
@@ -2529,39 +2550,39 @@ msgstr "SD-Karte auswerfen"
msgid "Machine State"
msgstr "Druckerstatus"
#: src/octoprint/templates/sidebar/state.jinja2:2
#: src/octoprint/templates/sidebar/state.jinja2:3
msgid "File"
msgstr "Datei"
#: src/octoprint/templates/sidebar/state.jinja2:7
#: src/octoprint/templates/sidebar/state.jinja2:8
msgid "Approx. Total Print Time"
msgstr "Ungefähre Druckdauer"
#: src/octoprint/templates/sidebar/state.jinja2:8
#: src/octoprint/templates/sidebar/state.jinja2:10
msgid "Print Time"
msgstr "Druckdauer"
#: src/octoprint/templates/sidebar/state.jinja2:9
#: src/octoprint/templates/sidebar/state.jinja2:11
msgid "Print Time Left"
msgstr "Verbleibende Druckdauer"
#: src/octoprint/templates/sidebar/state.jinja2:10
#: src/octoprint/templates/sidebar/state.jinja2:12
msgid "Printed"
msgstr "Gedruckt"
#: src/octoprint/templates/sidebar/state.jinja2:17
#: src/octoprint/templates/sidebar/state.jinja2:22
msgid "Restart"
msgstr "Restart"
#: src/octoprint/templates/sidebar/state.jinja2:17
#: src/octoprint/templates/sidebar/state.jinja2:22
msgid "Print"
msgstr "Drucken"
#: src/octoprint/templates/sidebar/state.jinja2:18
#: src/octoprint/templates/sidebar/state.jinja2:23
msgid "Resume"
msgstr "Weiter"
#: src/octoprint/templates/sidebar/state.jinja2:19
#: src/octoprint/templates/sidebar/state.jinja2:24
msgid "Cancels the print job"
msgstr "Bricht den Druckjob ab"
@@ -2637,51 +2658,51 @@ msgstr "Lüfter an"
msgid "Fan off"
msgstr "Lüfter aus"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:14
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:17
msgid "Model info"
msgstr "Modelinformationen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:21
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:24
msgid "Renderer options"
msgstr "Rendereroptionen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:25
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:28
msgid "Sync with job progress"
msgstr "Job mit Fortschritt synchronisieren"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:30
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:33
msgid "Center viewport on model"
msgstr "Ausschnitt auf Modell zentrieren"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:33
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:36
msgid "Zoom in on model"
msgstr "Auf Model zoomen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:39
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:42
msgid "Show moves"
msgstr "Bewegungen zeigen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:42
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:45
msgid "Show retracts"
msgstr "Retracts zeigen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:48
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:51
msgid "Also show previous layer"
msgstr "Auch vorherige Schicht anzeigen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:51
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:54
msgid "Also show next layer"
msgstr "Auch nächste Schicht anzeigen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:56
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:59
msgid "Reload"
msgstr "Neu laden"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:62
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:65
msgid "Note that the time estimates in this tab are calculated by the GCODE viewer in your browser and might differ from the values calculated by the server that are displayed in the \"State\" and \"Files\" panels in the sidebar due to slightly different implementations."
msgstr "Beachte, dass die geschätzten Zeiten in diesem Tab durch den GCODE Viewer in Deinem Browser berechnet werden und sich von den durch den Server berechneten Werten unterscheiden können, die im \"Status\" und \"Dateien\" Bereich der Seitenleiste angezeigt werden. Die Ursache hierfür sind leicht unterschiedliche Implementierungen."
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:67
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:70
msgid ""
"<p>\n"
" You've selected <strong data-bind=\"text: selectedFile.name\"></strong> for printing which has a size of\n"
@@ -2703,7 +2724,7 @@ msgstr ""
" Bist Du sicher, dass du die Datei trotzdem visualisieren willst?\n"
" </p>"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:78
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:81
#, python-format
msgid "Yes, please visualize %(name)s regardless of its size"
msgstr "Ja, bitte visualisiere %(name)s unabhängig seiner Größe"
@@ -2927,3 +2948,24 @@ msgstr "Zeitrafferaufnahme rendern"
#~ msgid "Show Announcements..."
#~ msgstr "Ankündigungen anzeigen..."
#~ msgid "Version"
#~ msgstr "Version"
#~ msgid "Sourcecode"
#~ msgstr "Quellcode"
#~ msgid "Documentation"
#~ msgstr "Dokumentation"
#~ msgid "Bugs and Requests"
#~ msgstr "Bugs und Requests"
#~ msgid "About"
#~ msgstr "Über"
#~ msgid "About OctoPrint"
#~ msgstr "Über OctoPrint"
#~ msgid "OctoPrint Settings"
#~ msgstr "OctoPrint Einstellungen"
+182 -64
View File
@@ -236,6 +236,16 @@ class MachineCom(object):
except:
pass
self._consecutive_timeouts = 0
self._consecutive_timeout_maximums = dict()
for key, value in settings().get(["serial", "maxCommunicationTimeouts"], merged=True, asdict=True).items():
try:
self._consecutive_timeout_maximums[key] = int(value)
except:
pass
self._max_write_passes = settings().getInt(["serial", "maxWritePasses"])
self._hello_command = settings().get(["serial", "helloCommand"])
self._trigger_ok_for_m29 = settings().getBoolean(["serial", "triggerOkForM29"])
@@ -322,6 +332,10 @@ class MachineCom(object):
def __del__(self):
self.close()
@property
def _active(self):
return self._monitoring_active and self._send_queue_active
##~~ internal state management
def _changeState(self, newState):
@@ -386,11 +400,11 @@ class MachineCom(object):
if self._state == self.STATE_PAUSED:
return "Paused"
if self._state == self.STATE_CLOSED:
return "Closed"
return "Offline"
if self._state == self.STATE_ERROR:
return "Error: %s" % (self.getErrorString())
if self._state == self.STATE_CLOSED_WITH_ERROR:
return "Error: %s" % (self.getErrorString())
return "Offline: %s" % (self.getErrorString())
if self._state == self.STATE_TRANSFERING_FILE:
return "Transfering file to SD"
return "?%d?" % (self._state)
@@ -566,15 +580,17 @@ class MachineCom(object):
if not processed:
cmd = process_gcode_line(cmd)
if not cmd:
return
return False
if self.isPrinting() and not self.isSdFileSelected():
try:
self._command_queue.put((cmd, cmd_type), item_type=cmd_type)
return True
except TypeAlreadyInQueue as e:
self._logger.debug("Type already in command queue: " + e.type)
return False
elif self.isOperational() or force:
self._sendCommand(cmd, cmd_type=cmd_type)
return self._sendCommand(cmd, cmd_type=cmd_type)
def sendGcodeScript(self, scriptName, replacements=None):
context = dict()
@@ -921,6 +937,8 @@ class MachineCom(object):
disable_external_heatup_detection = not settings().getBoolean(["feature", "externalHeatupDetection"])
self._consecutive_timeouts = 0
#Open the serial port.
if not self._openSerial():
return
@@ -956,7 +974,11 @@ class MachineCom(object):
if line is None:
break
if line.strip() is not "":
self._timeout = get_new_timeout("communication", self._timeout_intervals)
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)
##~~ debugging output handling
if line.startswith("//"):
@@ -1059,8 +1081,7 @@ 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._heating = True
self._heatupWaitStartTime = time.time()
self._track_heatup()
self._processTemperatures(line)
self._callback.on_comm_temperature_update(self._temp, self._bedTemp)
@@ -1120,12 +1141,16 @@ class MachineCom(object):
elif 'File opened' in line and not self._ignore_select:
# answer to M23, at least on Marlin, Repetier and Sprinter: "File opened:%s Size:%d"
match = regex_sdFileOpened.search(line)
if match:
name = match.group("name")
size = int(match.group("size"))
else:
name = "Unknown"
size = 0
if self._sdFileToSelect:
name = self._sdFileToSelect
self._sdFileToSelect = None
else:
name = match.group("name")
self._currentFile = PrintingSdFileInformation(name, int(match.group("size")))
self._currentFile = PrintingSdFileInformation(name, size)
elif 'File selected' in line:
if self._ignore_select:
self._ignore_select = False
@@ -1165,13 +1190,7 @@ class MachineCom(object):
self._handle_ok()
##~~ Message handling
elif line != '' \
and not line.startswith("ok") \
and not line.startswith("wait") \
and not line.startswith('Resend:') \
and line != 'echo:Unknown command:""\n' \
and self.isOperational():
self._callback.on_comm_message(line)
self._callback.on_comm_message(line)
##~~ Parsing for feedback commands
if feedback_controls and feedback_matcher and not "_all" in feedback_errors:
@@ -1232,6 +1251,7 @@ class MachineCom(object):
elif line.startswith("ok"):
self._onConnected()
elif time.time() > self._timeout:
self._log("There was a timeout while trying to connect to the printer")
self.close()
except:
@@ -1240,8 +1260,8 @@ class MachineCom(object):
errorMsg = "See octoprint.log for details"
self._log(errorMsg)
self._errorValue = errorMsg
self._changeState(self.STATE_ERROR)
eventManager().fire(Events.ERROR, {"error": self.getErrorString()})
self.close(is_error=True)
self._log("Connection closed, closing down monitor")
def _handle_ok(self):
@@ -1255,10 +1275,7 @@ class MachineCom(object):
self._currentTool = self._formerTool
self._formerTool = None
if self._heatupWaitStartTime:
self._heatupWaitTimeLost = self._heatupWaitTimeLost + (time.time() - self._heatupWaitStartTime)
self._heatupWaitStartTime = None
self._heating = False
self._finish_heatup()
if not self._state in (self.STATE_PRINTING, self.STATE_OPERATIONAL, self.STATE_PAUSED):
return
@@ -1274,32 +1291,99 @@ class MachineCom(object):
return
def _handle_timeout(self):
if self._state not in (self.STATE_PRINTING,):
return
if self._long_running_command:
self._logger.debug("Ran into a communication timeout, but a command known to be a long runner is currently active")
if self._state not in (self.STATE_PRINTING,
self.STATE_PAUSED,
self.STATE_OPERATIONAL):
return
general_message = "Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves."
if self._resendActive:
self._log("Communication timeout while printing and during an active resend, resending same line again to trigger response from printer. " + general_message)
self._resendSameCommand()
self._clear_to_send.set()
# figure out which consecutive timeout maximum we have to use
if self._long_running_command:
consecutive_max = self._consecutive_timeout_maximums.get("long", 0)
elif self._state in (self.STATE_PRINTING,):
consecutive_max = self._consecutive_timeout_maximums.get("printing", 0)
else:
self._log("Communication timeout while printing, trying to trigger response from printer. " + general_message)
self._sendCommand("M105", cmd_type="temperature")
consecutive_max = self._consecutive_timeout_maximums.get("idle", 0)
# now increment the timeout counter
self._consecutive_timeouts += 1
self._logger.debug("Now at {} consecutive timeouts".format(self._consecutive_timeouts))
if 0 < consecutive_max < self._consecutive_timeouts:
# too many consecutive timeouts, we give up
message = "No response from printer after {} consecutive communication timeouts, considering it dead.".format(consecutive_max + 1)
self._logger.info(message)
self._log(message + " " + general_message)
self._errorValue = "Too many consecutive timeouts, printer still connected and alive?"
eventManager().fire(Events.ERROR, {"error": self._errorValue})
self.close(is_error=True)
elif self._resendActive:
# resend active, resend same command instead of triggering a new one
message = "Communication timeout during an active resend, resending same line again to trigger response from printer."
self._logger.info(message)
self._log(message + " " + general_message)
if self._resendSameCommand():
self._clear_to_send.set()
elif self._heating:
# blocking heatup active, consider that finished
message = "Timeout while in an active heatup, considering heatup to be over."
self._logger.info(message)
self._finish_heatup()
elif self._long_running_command:
# long running command active, ignore timeout
self._logger.debug("Ran into a communication timeout, but a command known to be a long runner is currently active")
elif self._state in (self.STATE_PRINTING, self.STATE_PAUSED):
# printing, try to tickle the printer
message = "Communication timeout while printing, trying to trigger response from printer."
self._logger.info(message)
self._log(message + " " + general_message)
if self._sendCommand("M105", cmd_type="temperature"):
self._clear_to_send.set()
elif self._clear_to_send.blocked():
# timeout while idle and no oks left, let's try to tickle the printer
message = "Communication timeout while idle, trying to trigger response from printer."
self._logger.info(message)
self._log(message + " " + general_message)
self._clear_to_send.set()
return
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):
if self._state == self.STATE_PRINTING:
if not self._sendFromQueue() and not self.isSdPrinting():
self._sendNext()
elif self._state == self.STATE_OPERATIONAL or self._state == self.STATE_PAUSED:
self._sendFromQueue()
while self._active:
if self._state == self.STATE_OPERATIONAL or self._state == self.STATE_PAUSED or self.isSdPrinting():
# just send stuff from the command queue and be done with it
return self._sendFromQueue()
elif self._state == self.STATE_PRINTING:
# we are printing, we really want to send either something from the command
# queue or the next line from our file, so we only return here if we actually DO
# send something
if self._sendFromQueue():
# we found something in the queue to send
return True
elif self._sendNext():
# we sent the next line from the file
return True
self._logger.debug("No command sent on ok while printing, doing another iteration")
def _process_registered_message(self, line, feedback_matcher, feedback_controls, feedback_errors):
feedback_match = feedback_matcher.search(line)
@@ -1594,10 +1678,20 @@ class MachineCom(object):
def _sendNext(self):
with self._sendNextLock:
line = self._getNext()
if line is not None:
self._sendCommand(line)
while self._active:
# we loop until we've actually enqueued a line for sending
line = self._getNext()
if line is None:
# end of file, return false
return False
result = self._sendCommand(line)
self._callback.on_comm_progress()
if result:
# line sent, return true
return True
self._logger.debug("Command \"{}\" from file not enqueued, doing another iteration".format(line))
def _handleResendRequest(self, line):
try:
@@ -1685,7 +1779,7 @@ class MachineCom(object):
self._handle_ok()
def _resendSameCommand(self):
self._resendNextCommand(again=True)
return self._resendNextCommand(again=True)
def _resendNextCommand(self, again=False):
self._lastCommError = None
@@ -1706,7 +1800,7 @@ class MachineCom(object):
cmd = self._lastLines[-self._resendDelta]
lineNumber = self._currentLine - self._resendDelta
self._enqueue_for_sending(cmd, linenumber=lineNumber)
result = self._enqueue_for_sending(cmd, linenumber=lineNumber)
self._resendDelta -= 1
if self._resendDelta <= 0:
@@ -1714,6 +1808,8 @@ class MachineCom(object):
self._lastResendNumber = None
self._currentResendCount = 0
return result
def _sendCommand(self, cmd, cmd_type=None):
# Make sure we are only handling one sending job at a time
with self._sendingLock:
@@ -1734,11 +1830,11 @@ class MachineCom(object):
eventManager().fire(gcodeToEvent[gcode])
# actually enqueue the command for sending
self._enqueue_for_sending(cmd, command_type=cmd_type)
self._process_command_phase("queued", cmd, cmd_type, gcode=gcode)
return True
if self._enqueue_for_sending(cmd, command_type=cmd_type):
self._process_command_phase("queued", cmd, cmd_type, gcode=gcode)
return True
else:
return False
##~~ send loop handling
@@ -1754,8 +1850,10 @@ class MachineCom(object):
try:
self._send_queue.put((command, linenumber, command_type), item_type=command_type)
return True
except TypeAlreadyInQueue as e:
self._logger.debug("Type already in send queue: " + e.type)
return False
def _send_loop(self):
"""
@@ -1929,24 +2027,46 @@ class MachineCom(object):
return
self._log("Send: " + str(cmd))
try:
self._serial.write(cmd + '\n')
except serial.SerialTimeoutException:
self._log("Serial timeout while writing to serial port, trying again.")
cmd += "\n"
written = 0
passes = 0
while written < len(cmd):
to_send = cmd[written:]
old_written = written
try:
self._serial.write(cmd + '\n')
written += self._serial.write(to_send)
except serial.SerialTimeoutException:
self._log("Serial timeout while writing to serial port, trying again.")
try:
written += self._serial.write(to_send)
except:
if not self._connection_closing:
self._logger.exception("Unexpected error while writing to serial port")
self._log("Unexpected error while writing to serial port: %s" % (get_exception_string()))
self._errorValue = get_exception_string()
self.close(is_error=True)
break
except:
if not self._connection_closing:
self._logger.exception("Unexpected error while writing to serial port")
self._log("Unexpected error while writing to serial port: %s" % (get_exception_string()))
self._errorValue = get_exception_string()
self.close(is_error=True)
except:
if not self._connection_closing:
self._logger.exception("Unexpected error while writing to serial port")
self._log("Unexpected error while writing to serial port: %s" % (get_exception_string()))
self._errorValue = get_exception_string()
self.close(is_error=True)
break
if old_written == written:
# nothing written this pass
passes += 1
if passes > self._max_write_passes:
# nothing written in max consecutive passes, we give up
message = "Could not write anything to the serial port in {} tries, something appears to be wrong with the printer communication".format(self._max_write_passes)
self._logger.error(message)
self._log(message)
self._errorValue = "Could not write to serial port"
self.close(is_error=True)
break
##~~ command handlers
@@ -2032,15 +2152,13 @@ class MachineCom(object):
pass
def _gcode_M109_sent(self, cmd, cmd_type=None):
self._heatupWaitStartTime = time.time()
self._long_running_command = True
self._heating = True
self._track_heatup()
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._heating = True
self._track_heatup()
self._gcode_M140_sent(cmd, cmd_type, wait=True)
def _gcode_M110_sending(self, cmd, cmd_type=None):
+141 -57
View File
@@ -14,6 +14,107 @@ import logging
from octoprint.settings import settings
class Vector3D(object):
"""
3D vector value
Supports addition, subtraction and multiplication with a scalar value (float, int) as well as calculating the
length of the vector.
Examples:
>>> a = Vector3D(1.0, 1.0, 1.0)
>>> b = Vector3D(4.0, 4.0, 4.0)
>>> a + b == Vector3D(5.0, 5.0, 5.0)
True
>>> b - a == Vector3D(3.0, 3.0, 3.0)
True
>>> abs(a - b) == Vector3D(3.0, 3.0, 3.0)
True
>>> a * 2 == Vector3D(2.0, 2.0, 2.0)
True
>>> a * 2 == 2 * a
True
>>> a.length == math.sqrt(a.x ** 2 + a.y ** 2 + a.z ** 2)
True
>>> copied_a = Vector3D(a)
>>> a == copied_a
True
>>> copied_a.x == a.x and copied_a.y == a.y and copied_a.z == a.z
True
"""
def __init__(self, *args, **kwargs):
self.x = kwargs.get("x", 0.0)
self.y = kwargs.get("y", 0.0)
self.z = kwargs.get("z", 0.0)
if len(args) == 3:
self.x = args[0]
self.y = args[1]
self.z = args[2]
elif len(args) == 1:
# copy constructor
other = args[0]
if not isinstance(other, Vector3D):
raise ValueError("Object to copy must be a Vector3D instance")
self.x = other.x
self.y = other.y
self.z = other.z
@property
def length(self):
return math.sqrt(self.x * self.x + self.y * self.y + self.z * self.z)
def __add__(self, other):
if isinstance(other, Vector3D):
return Vector3D(self.x + other.x,
self.y + other.y,
self.z + other.z)
elif isinstance(other, (tuple, list)) and len(other) == 3:
return Vector3D(self.x + other[0],
self.y + other[1],
self.z + other[2])
else:
raise ValueError("other must be a Vector3D instance or a list or tuple of length 3")
def __sub__(self, other):
if isinstance(other, Vector3D):
return Vector3D(self.x - other.x,
self.y - other.y,
self.z - other.z)
elif isinstance(other, (tuple, list)) and len(other) == 3:
return Vector3D(self.x - other[0],
self.y - other[1],
self.z - other[2])
else:
raise ValueError("other must be a Vector3D instance or a list or tuple")
def __mul__(self, other):
if isinstance(other, (int, float)):
return Vector3D(self.x * other,
self.y * other,
self.z * other)
else:
raise ValueError("other must be a float or int value")
def __rmul__(self, other):
return self.__mul__(other)
def __abs__(self):
return Vector3D(abs(self.x), abs(self.y), abs(self.z))
def __eq__(self, other):
if not isinstance(other, Vector3D):
return False
return self.x == other.x and self.y == other.y and self.z == other.z
def __str__(self):
return "Vector3D(x={}, y={}, z={}, length={})".format(self.x, self.y, self.z, self.length)
class AnalysisAborted(Exception):
pass
@@ -46,8 +147,8 @@ class gcode(object):
def _load(self, gcodeFile, printer_profile, throttle=None):
filePos = 0
readBytes = 0
pos = [0.0, 0.0, 0.0]
posOffset = [0.0, 0.0, 0.0]
pos = Vector3D(0.0, 0.0, 0.0)
posOffset = Vector3D(0.0, 0.0, 0.0)
currentE = [0.0]
totalExtrusion = [0.0]
maxExtrusion = [0.0]
@@ -56,10 +157,10 @@ class gcode(object):
absoluteE = True
scale = 1.0
posAbs = True
feedRateXY = min(printer_profile["axes"]["x"]["speed"], printer_profile["axes"]["y"]["speed"])
if feedRateXY == 0:
feedrate = min(printer_profile["axes"]["x"]["speed"], printer_profile["axes"]["y"]["speed"])
if feedrate == 0:
# some somewhat sane default if axes speeds are insane...
feedRateXY = 2000
feedrate = 2000
offsets = printer_profile["extruder"]["offsets"]
for line in gcodeFile:
@@ -117,56 +218,39 @@ class gcode(object):
z = getCodeFloat(line, 'Z')
e = getCodeFloat(line, 'E')
f = getCodeFloat(line, 'F')
oldPos = pos
pos = pos[:]
if posAbs:
if x is not None:
pos[0] = x * scale + posOffset[0]
if y is not None:
pos[1] = y * scale + posOffset[1]
if z is not None:
pos[2] = z * scale + posOffset[2]
else:
if x is not None:
pos[0] += x * scale
if y is not None:
pos[1] += y * scale
if z is not None:
pos[2] += z * scale
if f is not None and f != 0:
feedRateXY = f
moveType = 'move'
oldPos = pos
newPos = Vector3D(x if x is not None else pos.x,
y if y is not None else pos.y,
z if z is not None else pos.z)
if posAbs:
pos = newPos * scale + posOffset
else:
pos += newPos * scale
if f is not None and f != 0:
feedrate = f
if e is not None:
if absoluteE:
# make sure e is relative
e -= currentE[currentExtruder]
if e > 0.0:
moveType = 'extrude'
if e < 0.0:
moveType = 'retract'
totalExtrusion[currentExtruder] += e
currentE[currentExtruder] += e
if totalExtrusion[currentExtruder] > maxExtrusion[currentExtruder]:
maxExtrusion[currentExtruder] = totalExtrusion[currentExtruder]
maxExtrusion[currentExtruder] = max(maxExtrusion[currentExtruder],
totalExtrusion[currentExtruder])
else:
e = 0.0
if x is not None or y is not None or z is not None:
diffX = oldPos[0] - pos[0]
diffY = oldPos[1] - pos[1]
totalMoveTimeMinute += math.sqrt(diffX * diffX + diffY * diffY) / feedRateXY
elif moveType == "extrude":
diffX = oldPos[0] - pos[0]
diffY = oldPos[1] - pos[1]
time1 = math.sqrt(diffX * diffX + diffY * diffY) / feedRateXY
time2 = abs(e / feedRateXY)
totalMoveTimeMinute += max(time1, time2)
elif moveType == "retract":
totalMoveTimeMinute += abs(e / feedRateXY)
# move time in x, y, z, will be 0 if no movement happened
moveTimeXYZ = abs((oldPos - pos).length / feedrate)
# time needed for extruding, will be 0 if no extrusion happened
extrudeTime = abs(e / feedrate)
# time to add is maximum of both
totalMoveTimeMinute += max(moveTimeXYZ, extrudeTime)
if moveType == 'move' and oldPos[2] != pos[2]:
if oldPos[2] > pos[2] and abs(oldPos[2] - pos[2]) > 5.0 and pos[2] < 1.0:
oldPos[2] = 0.0
elif G == 4: #Delay
S = getCodeFloat(line, 'S')
if S is not None:
@@ -182,17 +266,17 @@ class gcode(object):
x = getCodeFloat(line, 'X')
y = getCodeFloat(line, 'Y')
z = getCodeFloat(line, 'Z')
center = [0.0,0.0,0.0]
center = Vector3D(0.0, 0.0, 0.0)
if x is None and y is None and z is None:
pos = center
else:
pos = pos[:]
pos = Vector3D(pos)
if x is not None:
pos[0] = center[0]
pos.x = center.x
if y is not None:
pos[1] = center[1]
pos.y = center.y
if z is not None:
pos[2] = center[2]
pos.z = center.z
elif G == 90: #Absolute position
posAbs = True
elif G == 91: #Relative position
@@ -205,11 +289,11 @@ class gcode(object):
if e is not None:
currentE[currentExtruder] = e
if x is not None:
posOffset[0] = pos[0] - x
posOffset.x = pos.x - x
if y is not None:
posOffset[1] = pos[1] - y
posOffset.y = pos.y - y
if z is not None:
posOffset[2] = pos[2] - z
posOffset.z = pos.z - z
elif M is not None:
if M == 82: #Absolute E
@@ -221,13 +305,13 @@ class gcode(object):
if T > settings().getInt(["gcodeAnalysis", "maxExtruders"]):
self._logger.warn("GCODE tried to select tool %d, that looks wrong, ignoring for GCODE analysis" % T)
else:
posOffset[0] -= offsets[currentExtruder][0] if currentExtruder < len(offsets) else 0
posOffset[1] -= offsets[currentExtruder][1] if currentExtruder < len(offsets) else 0
posOffset.x -= offsets[currentExtruder][0] if currentExtruder < len(offsets) else 0
posOffset.y -= offsets[currentExtruder][1] if currentExtruder < len(offsets) else 0
currentExtruder = T
posOffset[0] += offsets[currentExtruder][0] if currentExtruder < len(offsets) else 0
posOffset[1] += offsets[currentExtruder][1] if currentExtruder < len(offsets) else 0
posOffset.x += offsets[currentExtruder][0] if currentExtruder < len(offsets) else 0
posOffset.y += offsets[currentExtruder][1] if currentExtruder < len(offsets) else 0
if len(currentE) <= currentExtruder:
for i in range(len(currentE), currentExtruder + 1):
+68
View File
@@ -4,8 +4,11 @@ from __future__ import absolute_import
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License"
import logging
import os
from jinja2 import nodes
from jinja2.ext import Extension
from jinja2.loaders import FileSystemLoader, PrefixLoader, ChoiceLoader, \
TemplateNotFound, split_template_path
@@ -106,3 +109,68 @@ def get_all_asset_paths(env):
# intentionally ignored
pass
return result
class ExceptionHandlerExtension(Extension):
tags = {"try"}
def __init__(self, environment):
super(ExceptionHandlerExtension, self).__init__(environment)
self._logger = logging.getLogger(__name__)
def parse(self, parser):
token = parser.stream.next()
lineno = token.lineno
filename = parser.name
error = parser.parse_expression()
args = [error, nodes.Const(filename), nodes.Const(lineno)]
try:
body = parser.parse_statements(["name:endtry"], drop_needle=True)
node = nodes.CallBlock(self.call_method("_handle_body", args),
[], [], body).set_lineno(lineno)
except Exception as e:
# that was expected
self._logger.exception("Caught exception while parsing template")
node = nodes.CallBlock(self.call_method("_handle_error", [nodes.Const(self._format_error(error, e, filename, lineno))]),
[], [], []).set_lineno(lineno)
return node
def _handle_body(self, error, filename, lineno, caller):
try:
return caller()
except Exception as e:
self._logger.exception("Caught exception while compiling template {filename} at line {lineno}".format(**locals()))
error_string = self._format_error(error, e, filename, lineno)
return error_string if error_string else ""
def _handle_error(self, error, caller):
return error if error else ""
def _format_error(self, error, exception, filename, lineno):
if not error:
return ""
try:
return error.format(exception=exception, filename=filename, lineno=lineno)
except:
self._logger.exception("Error while compiling exception output for template {filename} at line {lineno}".format(**locals()))
return "Unknown error"
trycatch = ExceptionHandlerExtension
class MarkdownFilter(object):
def __init__(self, app, **markdown_options):
self._markdown_options = markdown_options
app.jinja_env.filters.setdefault("markdown", self)
def __call__(self, stream):
from jinja2 import Markup
from markdown import Markdown
# Markdown is not thread safe
markdown = Markdown(**self._markdown_options)
return Markup(markdown.convert(stream))
Binary file not shown.
+194 -152
View File
@@ -5,18 +5,19 @@
#
msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-06-16 12:18+0200\n"
"PO-Revision-Date: 2016-06-08 11:04+0100\n"
"POT-Creation-Date: 2016-07-28 11:50+0200\n"
"PO-Revision-Date: 2016-07-28 12:03+0100\n"
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
"Language: de\n"
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.2.0\n"
"X-Generator: Poedit 1.6.8\n"
#: src/octoprint/plugins/announcements/__init__.py:89
#: src/octoprint/plugins/announcements/templates/announcements.jinja2:4
@@ -55,7 +56,6 @@ msgstr "Zuletzt gelesen"
#: src/octoprint/plugins/announcements/templates/announcements.jinja2:43
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:87
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:197
#: src/octoprint/templates/dialogs/about.jinja2:51
#: src/octoprint/templates/dialogs/settings/appearance.jinja2:96
msgid "Close"
msgstr "Schließen"
@@ -199,7 +199,6 @@ msgstr ""
" Tools wie z.B. Repetier Host.\n"
#: src/octoprint/plugins/cura/templates/cura_settings.jinja2:121
#: src/octoprint/templates/dialogs/usersettings.jinja2:46
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:80
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:109
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:151
@@ -208,7 +207,6 @@ msgid "Abort"
msgstr "Abbrechen"
#: src/octoprint/plugins/cura/templates/cura_settings.jinja2:122
#: src/octoprint/templates/dialogs/usersettings.jinja2:47
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:81
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:110
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:152
@@ -478,7 +476,6 @@ msgstr "Gebundled"
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:48
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:129
#: src/octoprint/templates/index.jinja2:118
msgid "Homepage"
msgstr "Homepage"
@@ -619,15 +616,13 @@ msgstr "Repository-Cache TTL"
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:26
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:101
#: src/octoprint/templates/dialogs/confirmation.jinja2:11
#: src/octoprint/templates/dialogs/settings.jinja2:52
#: src/octoprint/templates/dialogs/slicing.jinja2:50
#: src/octoprint/templates/sidebar/state.jinja2:19
#: src/octoprint/templates/sidebar/state.jinja2:24
msgid "Cancel"
msgstr "Abbruch"
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:240
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:102
#: src/octoprint/templates/dialogs/settings.jinja2:53
msgid "Save"
msgstr "Speichern"
@@ -904,7 +899,7 @@ msgid "GCode Viewer"
msgstr "GCode Viewer"
#: src/octoprint/server/views.py:146
#: src/octoprint/templates/sidebar/state.jinja2:3
#: src/octoprint/templates/sidebar/state.jinja2:4
msgid "Timelapse"
msgstr "Zeitraffer"
@@ -990,60 +985,19 @@ msgstr "Der Server scheint offline zu sein, zumindest kann ich mich nicht mit ih
msgid "The server appears to be offline, at least I'm not getting any response from it. I <strong>could not reconnect automatically</strong>, but you may try a manual reconnect using the button below."
msgstr "Der Server scheint offline zu sein, zumindest kann ich mich nicht mit ihm verbinden. Ich <strong>konnte mich nicht automatisch neu verbinden</strong>, aber Du kannst mittels des folgenden Buttons einen manuellen Verbindungsversuch anstoßen."
#: src/octoprint/static/js/app/dataupdater.js:217
#: src/octoprint/static/js/app/dataupdater.js:237
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr "Slice ... (%(percentage)d%%)"
#: src/octoprint/static/js/app/dataupdater.js:239
msgid "Slicing ..."
msgstr "Slice ..."
#: src/octoprint/static/js/app/dataupdater.js:245
msgid "Slicing done"
msgstr "Slicing abgeschlossen"
#: src/octoprint/static/js/app/dataupdater.js:245
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr "%(stl)s nach %(gcode)s geslicet, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/dataupdater.js:255
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr "Konnte %(stl)s nicht nach %(gcode)s slicen: %(reason)s"
#: src/octoprint/static/js/app/dataupdater.js:256
msgid "Slicing failed"
msgstr "Slicing fehlgeschlagen"
#: src/octoprint/static/js/app/dataupdater.js:260
msgid "Streaming ..."
msgstr "Streaming ..."
#: src/octoprint/static/js/app/dataupdater.js:266
msgid "Streaming done"
msgstr "Streaming abgeschlossen"
#: src/octoprint/static/js/app/dataupdater.js:267
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr "%(local)s nach %(remote)s gestreamt, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/dataupdater.js:273
#: src/octoprint/static/js/app/dataupdater.js:281
#: src/octoprint/static/js/app/dataupdater.js:230
#: src/octoprint/static/js/app/dataupdater.js:238
msgid "Unhandled communication error"
msgstr "Unbehandelter Kommunikationsfehler"
#: src/octoprint/static/js/app/dataupdater.js:274
#: src/octoprint/static/js/app/dataupdater.js:231
#, python-format
msgid "There was an unhandled error while talking to the printer. Due to that the ongoing print job was cancelled. Error: %(firmwareError)s"
msgstr "Es gab einen unbehandelten Fehler bei der Kommunikation mit dem Drucker. Daher wurder der laufende Druckauftrag abgebrochen. Fehler: %(firmwareError)s"
#: src/octoprint/static/js/app/dataupdater.js:282
#, python-format
msgid "The was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"
#: src/octoprint/static/js/app/dataupdater.js:239
#, fuzzy, python-format
msgid "There was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"
msgstr "Es gab einen unbehandelten Fehler bei der Kommunikation mit dem Drucker. Daher hat OctoPrint die Verbindung getrennt. Fehler: %(error)s"
#: src/octoprint/static/js/app/helpers.js:372
@@ -1118,9 +1072,9 @@ msgid "Disconnect"
msgstr "Trennen"
#: src/octoprint/static/js/app/viewmodels/control.js:65
#: src/octoprint/static/js/app/viewmodels/files.js:329
#: src/octoprint/static/js/app/viewmodels/files.js:348
#: src/octoprint/static/js/app/viewmodels/gcode.js:471
#: src/octoprint/static/js/app/viewmodels/printerstate.js:177
#: src/octoprint/static/js/app/viewmodels/printerstate.js:228
#: src/octoprint/static/js/app/viewmodels/temperature.js:58
msgid "Tool"
msgstr "Werkzeug"
@@ -1142,32 +1096,74 @@ msgstr "Dein verfügbarer freier Plattenplatz wird langsam knapp."
msgid "Your current disk usage."
msgstr "Dein aktuell verfügbarer freier Plattenplatz."
#: src/octoprint/static/js/app/viewmodels/files.js:324
#: src/octoprint/static/js/app/viewmodels/files.js:329
#: src/octoprint/static/js/app/viewmodels/files.js:343
#: src/octoprint/static/js/app/viewmodels/files.js:348
msgid "Filament"
msgstr "Filament"
#: src/octoprint/static/js/app/viewmodels/files.js:333
#: src/octoprint/static/js/app/viewmodels/files.js:352
msgid "Estimated Print Time"
msgstr "Geschätzte Druckdauer"
#: src/octoprint/static/js/app/viewmodels/files.js:336
#: src/octoprint/static/js/app/viewmodels/files.js:355
msgid "Last Printed"
msgstr "Zuletzt gedruckt"
#: src/octoprint/static/js/app/viewmodels/files.js:338
#: src/octoprint/static/js/app/viewmodels/files.js:357
msgid "Last Print Time"
msgstr "Letzte Druckdauer"
#: src/octoprint/static/js/app/viewmodels/files.js:515
msgid "Could not upload the file. Make sure that it is a GCODE file and has the extension \".gcode\" or \".gco\" or that it is an STL file with the extension \".stl\"."
msgstr "Konnte die Datei nicht hochladen. Bitte stelle sicher, dass es sich um eine GCODE-Datei mit der Extension \".gcode\" oder \".gco\" oder um eine STL-Datei mit der Extension \".stl\" handelt."
#: src/octoprint/static/js/app/viewmodels/files.js:460
#: src/octoprint/static/js/app/viewmodels/files.js:467
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr "Slice ... (%(percentage)d%%)"
#: src/octoprint/static/js/app/viewmodels/files.js:536
#: src/octoprint/static/js/app/viewmodels/files.js:462
msgid "Slicing ..."
msgstr "Slice ..."
#: src/octoprint/static/js/app/viewmodels/files.js:488
msgid "Slicing done"
msgstr "Slicing abgeschlossen"
#: src/octoprint/static/js/app/viewmodels/files.js:489
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr "%(stl)s nach %(gcode)s geslicet, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/viewmodels/files.js:504
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr "Konnte %(stl)s nicht nach %(gcode)s slicen: %(reason)s"
#: src/octoprint/static/js/app/viewmodels/files.js:505
msgid "Slicing failed"
msgstr "Slicing fehlgeschlagen"
#: src/octoprint/static/js/app/viewmodels/files.js:522
msgid "Streaming ..."
msgstr "Streaming ..."
#: src/octoprint/static/js/app/viewmodels/files.js:534
msgid "Streaming done"
msgstr "Streaming abgeschlossen"
#: src/octoprint/static/js/app/viewmodels/files.js:535
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr "%(local)s nach %(remote)s gestreamt, dauerte %(time).2f Sekunden"
#: src/octoprint/static/js/app/viewmodels/files.js:627
#, python-format
msgid "Could not upload the file. Make sure that it is a valid file with one of these extensions: %(extensions)s"
msgstr "Konnte die Datei nicht hochladen. Bitte stelle sicher, dass es sich um eine valide Datei mit einer dieser Erweiterungen ist: %(extensions)s"
#: src/octoprint/static/js/app/viewmodels/files.js:654
msgid "Uploading ..."
msgstr "Uploade ..."
#: src/octoprint/static/js/app/viewmodels/files.js:543
#: src/octoprint/static/js/app/viewmodels/files.js:660
msgid "Saving ..."
msgstr "Speichere ..."
@@ -1370,52 +1366,76 @@ msgstr "Druckerprofil hinzufügen"
msgid "Edit Printer Profile \"%(name)s\""
msgstr "Druckerprofile \"%(name)s\" bearbeiten"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:44
#: src/octoprint/static/js/app/viewmodels/printerstate.js:45
msgid "Restarts the print job from the beginning"
msgstr "Started den Druckjob von vorne"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:45
#: src/octoprint/static/js/app/viewmodels/printerstate.js:46
msgid "Starts the print job"
msgstr "Startet den Druckjob"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:46
#: src/octoprint/static/js/app/viewmodels/printerstate.js:47
msgid "Resumes the print job"
msgstr "Setzt den Druckjob fort"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:47
#: src/octoprint/static/js/app/viewmodels/printerstate.js:48
msgid "Pauses the print job"
msgstr "Pausiert den Druckjob"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:80
#: src/octoprint/static/js/app/viewmodels/printerstate.js:81
msgid "Calculating..."
msgstr "Wird ermittelt..."
#: src/octoprint/static/js/app/viewmodels/printerstate.js:93
#: src/octoprint/static/js/app/viewmodels/printerstate.js:91
msgid "Based on a linear approximation (accuracy highly dependent on the model)"
msgstr "Basiert auf einer linearen Approximation (Genauigkeit hängt stark vom Modell ab)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:94
msgid "Based on the estimate from analysis of file (medium accuracy)"
msgstr "Basiert auf der Schätzung der Analyse der Datei (mittlere Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:97
msgid "Based on a mix of estimate from analysis and calculation (medium accuracy)"
msgstr "Basiert auf einem Mix der Schätzung aus der Analyse und der Berechnung (mittlere Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:100
msgid "Based on the average total of past prints of this model with the same printer profile (usually good accuracy)"
msgstr "Basiert auf der durchschnittlichen Dauer vergangener Druckjobs dieses Modells mit dem selben Druckerprofil (normalerweise gute Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:103
msgid "Based on a mix of average total from past prints and calculation (usually good accuracy)"
msgstr "Basiert auf einem Mix der durschnittlichen Dauer vergangener Druckjobs und der Berechnung (normalerweise gute Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:106
msgid "Based on the calculated estimate (best accuracy)"
msgstr "Basiert auf der berechneten Schätzung (beste Genauigkeit)"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:144
msgid "Continue"
msgstr "Fortsetzen"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:95
#: src/octoprint/templates/sidebar/state.jinja2:18
#: src/octoprint/static/js/app/viewmodels/printerstate.js:146
#: src/octoprint/templates/sidebar/state.jinja2:23
msgid "Pause"
msgstr "Pause"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:106
#: src/octoprint/static/js/app/viewmodels/printerstate.js:157
#: src/octoprint/templates/tabs/timelapse.jinja2:11
msgid "On Z Change"
msgstr "Bei Ebenenwechsel"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:108
#: src/octoprint/static/js/app/viewmodels/printerstate.js:159
#: src/octoprint/templates/tabs/timelapse.jinja2:10
msgid "Timed"
msgstr "Nach Zeit"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:108
#: src/octoprint/static/js/app/viewmodels/printerstate.js:159
#: src/octoprint/templates/tabs/timelapse.jinja2:25
#: src/octoprint/templates/tabs/timelapse.jinja2:32
msgid "sec"
msgstr "Sek"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:216
#: src/octoprint/static/js/app/viewmodels/printerstate.js:268
msgid "This will restart the print job from the beginning."
msgstr "Der Druckjob wird zurückgesetzt und von vorne begonnen."
@@ -1433,19 +1453,19 @@ msgstr "weiß"
msgid "Autodetect from browser"
msgstr "Automatisch vom Browser erkennen"
#: src/octoprint/static/js/app/viewmodels/slicing.js:31
#: src/octoprint/static/js/app/viewmodels/slicing.js:104
msgid "Do nothing"
msgstr "Nichts machen"
#: src/octoprint/static/js/app/viewmodels/slicing.js:32
#: src/octoprint/static/js/app/viewmodels/slicing.js:105
msgid "Select for printing"
msgstr "Zum Drucken auswählen"
#: src/octoprint/static/js/app/viewmodels/slicing.js:33
#: src/octoprint/static/js/app/viewmodels/slicing.js:106
msgid "Start printing"
msgstr "Drucken"
#: src/octoprint/static/js/app/viewmodels/slicing.js:45
#: src/octoprint/static/js/app/viewmodels/slicing.js:118
#, python-format
msgid "Slicing %(filename)s"
msgstr "Slice %(filename)s"
@@ -1553,31 +1573,6 @@ msgstr "Neue Zeitrafferaufnahme %(movie_prefix)s wurde fertig gerendert"
msgid "Site default"
msgstr "Seitenvoreinstellung"
#: src/octoprint/templates/index.jinja2:115
msgid "Version"
msgstr "Version"
#: src/octoprint/templates/index.jinja2:119
msgid "Sourcecode"
msgstr "Quellcode"
#: src/octoprint/templates/index.jinja2:120
msgid "Documentation"
msgstr "Dokumentation"
#: src/octoprint/templates/index.jinja2:121
msgid "Bugs and Requests"
msgstr "Bugs und Requests"
#: src/octoprint/templates/index.jinja2:122
msgid "About"
msgstr "Über"
#: src/octoprint/templates/dialogs/about.jinja2:4
#: src/octoprint/templates/dialogs/settings.jinja2:51
msgid "About OctoPrint"
msgstr "Über OctoPrint"
#: src/octoprint/templates/dialogs/confirmation.jinja2:4
msgid "Are you sure?"
msgstr "Bist Du sicher?"
@@ -1673,10 +1668,6 @@ msgstr "Zugangsbeschränkung deaktivieren"
msgid "Keep Access Control Enabled"
msgstr "Zugangsbeschränkung aktiviert lassen"
#: src/octoprint/templates/dialogs/settings.jinja2:4
msgid "OctoPrint Settings"
msgstr "OctoPrint Einstellungen"
#: src/octoprint/templates/dialogs/slicing.jinja2:8
msgid "Slicing is currently disabled since no slicer has been configured yet. Please configure a slicer under \"Settings\"."
msgstr "Slicing ist aktuell deaktiviert da noch kein Slicer konfiguriert wurde. Bitte konfiguriere einen Slicer unter \"Settings\"."
@@ -1711,8 +1702,8 @@ msgid "Select a printer profile..."
msgstr "Wähle ein Druckerprofil..."
#: src/octoprint/templates/dialogs/slicing.jinja2:32
msgid "GCode Filename"
msgstr "GCode Dateiname"
msgid "Output Filename"
msgstr "Ausgabedateiname"
#: src/octoprint/templates/dialogs/slicing.jinja2:41
msgid "After slicing..."
@@ -1723,11 +1714,6 @@ msgstr "Nach dem Slicing..."
msgid "Slice"
msgstr "Slicen"
#: src/octoprint/templates/dialogs/usersettings.jinja2:4
#: src/octoprint/templates/navbar/login.jinja2:16
msgid "User Settings"
msgstr "Nutzereinstellungen"
#: src/octoprint/templates/dialogs/about/about.jinja2:3
msgid "The snappy web interface for your 3D printer"
msgstr "The snappy web interface for your 3D printer"
@@ -1921,31 +1907,39 @@ msgid "Wait for <code>start</code> on connect"
msgstr "Bei der Verbindung auf <code>start</code> warten"
#: src/octoprint/templates/dialogs/settings/features.jinja2:40
msgid "Select SD files by relative path"
msgstr "SD Dateien per relativem Pfad addressieren"
#: src/octoprint/templates/dialogs/settings/features.jinja2:40
msgid "RepRap Firmware"
msgstr "RepRap Firmware"
#: src/octoprint/templates/dialogs/settings/features.jinja2:47
msgid "Always assume SD card is present"
msgstr "Immer davon ausgehen, dass eine SD-Karte vorhanden ist"
#: src/octoprint/templates/dialogs/settings/features.jinja2:40
#: src/octoprint/templates/dialogs/settings/features.jinja2:47
#: src/octoprint/templates/dialogs/settings/features.jinja2:54
#: src/octoprint/templates/dialogs/settings/features.jinja2:61
#: src/octoprint/templates/dialogs/settings/features.jinja2:68
#: src/octoprint/templates/dialogs/settings/features.jinja2:75
msgid "Repetier"
msgstr "Repetier"
#: src/octoprint/templates/dialogs/settings/features.jinja2:47
#: src/octoprint/templates/dialogs/settings/features.jinja2:54
msgid "Send a checksum with <strong>every</strong> command"
msgstr "Eine Prüfsumme mit <strong>jedem</strong> Befehl senden"
#: src/octoprint/templates/dialogs/settings/features.jinja2:54
#: src/octoprint/templates/dialogs/settings/features.jinja2:61
msgid "Ignore consecutive resend requests for the same line"
msgstr "Aufeinanderfolgende Resend Requests für die selbe Zeilennummer ignorieren"
#: src/octoprint/templates/dialogs/settings/features.jinja2:61
#: src/octoprint/templates/dialogs/settings/features.jinja2:68
#, python-format
msgid "Support <code>TargetExtr%%n</code>/<code>TargetBed</code> target temperature format"
msgstr "<code>TargetExtr%%n</code>/<code>TargetBed</code> Zieltemperaturformat unterstützen"
#: src/octoprint/templates/dialogs/settings/features.jinja2:68
#: src/octoprint/templates/dialogs/settings/features.jinja2:75
msgid "Disable detection of external heatups"
msgstr "Detektierung externer Aufheizvorgänge deaktivieren"
@@ -1984,7 +1978,7 @@ msgstr "Falls der freie Plattenplatz unter diese Schwellwerte fallen sollte wird
#: src/octoprint/templates/dialogs/settings/folders.jinja2:47
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:69
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:90
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:66
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:69
#: src/octoprint/templates/tabs/timelapse.jinja2:13
msgid "Warning"
msgstr "Warnung"
@@ -2260,6 +2254,30 @@ msgstr "Viele Marlin < v1.1.0"
msgid "Simulate an additional `ok` for resend requests"
msgstr "Zusätzliches `ok` für Resendrequests simulieren"
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:129
msgid "Maximum consecutive communication timeouts while idle. More than this and the printer will be considered to be gone. Set to 0 to disable."
msgstr "Maximale Anzahl aufeinanderfolgender Communication Timeouts im Idlezustand. Mehr als das und es wird angenommen, dass der Drucker offline ist. Auf 0 setzen um das zu verhindern."
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:130
msgid "Max. consecutive timeouts while idle"
msgstr "Max. aufeinanderfolgende Timeouts wenn idle"
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:135
msgid "Maximum consecutive communication timeouts while printing. More than this and the printer will be considered to be gone. Set to 0 to disable."
msgstr "Maximale Anzahl aufeinanderfolgender Communication Timeouts beim Drucken. Mehr als das und es wird angenommen, dass der Drucker offline ist. Auf 0 setzen um das zu verhindern."
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:136
msgid "Max. consecutive timeouts while printing"
msgstr "Max. aufeinanderfolgende Timeouts beim Drucken"
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:141
msgid "Maximum consecutive communication timeouts while a long running command is active. More than this and the printer will be considered to be gone. Set to 0 to disable."
msgstr "Maximale Anzahl aufeinanderfolgender Communication Timeouts wenn ein lang laufender Befehl aktiv ist. Mehr als das und es wird angenommen, dass der Drucker offline ist. Auf 0 setzen um das zu verhindern."
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:142
msgid "Max. consecutive timeouts during long running commands"
msgstr "Max. aufeinanderfolgende Timeouts während lang laufender Befehle"
#: src/octoprint/templates/dialogs/settings/server.jinja2:2
msgid "Commands"
msgstr "Befehle"
@@ -2384,6 +2402,10 @@ msgstr "Änderungen der Oberflächensprache werden erst nach einem Neuladen der
msgid "Remember me"
msgstr "Login merken"
#: src/octoprint/templates/navbar/login.jinja2:16
msgid "User Settings"
msgstr "Nutzereinstellungen"
#: src/octoprint/templates/navbar/login.jinja2:17
msgid "Logout"
msgstr "Logout"
@@ -2464,7 +2486,7 @@ msgstr "Frei"
msgid "Total"
msgstr "Gesamt"
#: src/octoprint/templates/sidebar/files.jinja2:64
#: src/octoprint/templates/sidebar/files.jinja2:67
msgid "Hint: You can also drag and drop files on this page to upload them."
msgstr "Hinweis: Du kannst auch Dateien auf diese Seite ziehen um sie hochzuladen."
@@ -2528,39 +2550,39 @@ msgstr "SD-Karte auswerfen"
msgid "Machine State"
msgstr "Druckerstatus"
#: src/octoprint/templates/sidebar/state.jinja2:2
#: src/octoprint/templates/sidebar/state.jinja2:3
msgid "File"
msgstr "Datei"
#: src/octoprint/templates/sidebar/state.jinja2:7
#: src/octoprint/templates/sidebar/state.jinja2:8
msgid "Approx. Total Print Time"
msgstr "Ungefähre Druckdauer"
#: src/octoprint/templates/sidebar/state.jinja2:8
#: src/octoprint/templates/sidebar/state.jinja2:10
msgid "Print Time"
msgstr "Druckdauer"
#: src/octoprint/templates/sidebar/state.jinja2:9
#: src/octoprint/templates/sidebar/state.jinja2:11
msgid "Print Time Left"
msgstr "Verbleibende Druckdauer"
#: src/octoprint/templates/sidebar/state.jinja2:10
#: src/octoprint/templates/sidebar/state.jinja2:12
msgid "Printed"
msgstr "Gedruckt"
#: src/octoprint/templates/sidebar/state.jinja2:17
#: src/octoprint/templates/sidebar/state.jinja2:22
msgid "Restart"
msgstr "Restart"
#: src/octoprint/templates/sidebar/state.jinja2:17
#: src/octoprint/templates/sidebar/state.jinja2:22
msgid "Print"
msgstr "Drucken"
#: src/octoprint/templates/sidebar/state.jinja2:18
#: src/octoprint/templates/sidebar/state.jinja2:23
msgid "Resume"
msgstr "Weiter"
#: src/octoprint/templates/sidebar/state.jinja2:19
#: src/octoprint/templates/sidebar/state.jinja2:24
msgid "Cancels the print job"
msgstr "Bricht den Druckjob ab"
@@ -2636,51 +2658,51 @@ msgstr "Lüfter an"
msgid "Fan off"
msgstr "Lüfter aus"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:14
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:17
msgid "Model info"
msgstr "Modelinformationen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:21
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:24
msgid "Renderer options"
msgstr "Rendereroptionen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:25
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:28
msgid "Sync with job progress"
msgstr "Job mit Fortschritt synchronisieren"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:30
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:33
msgid "Center viewport on model"
msgstr "Ausschnitt auf Modell zentrieren"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:33
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:36
msgid "Zoom in on model"
msgstr "Auf Model zoomen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:39
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:42
msgid "Show moves"
msgstr "Bewegungen zeigen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:42
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:45
msgid "Show retracts"
msgstr "Retracts zeigen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:48
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:51
msgid "Also show previous layer"
msgstr "Auch vorherige Schicht anzeigen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:51
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:54
msgid "Also show next layer"
msgstr "Auch nächste Schicht anzeigen"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:56
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:59
msgid "Reload"
msgstr "Neu laden"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:62
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:65
msgid "Note that the time estimates in this tab are calculated by the GCODE viewer in your browser and might differ from the values calculated by the server that are displayed in the \"State\" and \"Files\" panels in the sidebar due to slightly different implementations."
msgstr "Beachte, dass die geschätzten Zeiten in diesem Tab durch den GCODE Viewer in Deinem Browser berechnet werden und sich von den durch den Server berechneten Werten unterscheiden können, die im \"Status\" und \"Dateien\" Bereich der Seitenleiste angezeigt werden. Die Ursache hierfür sind leicht unterschiedliche Implementierungen."
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:67
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:70
msgid ""
"<p>\n"
" You've selected <strong data-bind=\"text: selectedFile.name\"></strong> for printing which has a size of\n"
@@ -2702,7 +2724,7 @@ msgstr ""
" Bist Du sicher, dass du die Datei trotzdem visualisieren willst?\n"
" </p>"
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:78
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:81
#, python-format
msgid "Yes, please visualize %(name)s regardless of its size"
msgstr "Ja, bitte visualisiere %(name)s unabhängig seiner Größe"
@@ -2927,3 +2949,23 @@ msgstr "Zeitrafferaufnahme rendern"
#~ msgid "Show Announcements..."
#~ msgstr "Ankündigungen anzeigen..."
#~ msgid "Version"
#~ msgstr "Version"
#~ msgid "Sourcecode"
#~ msgstr "Quellcode"
#~ msgid "Documentation"
#~ msgstr "Dokumentation"
#~ msgid "Bugs and Requests"
#~ msgstr "Bugs und Requests"
#~ msgid "About"
#~ msgstr "Über"
#~ msgid "About OctoPrint"
#~ msgstr "Über OctoPrint"
#~ msgid "OctoPrint Settings"
#~ msgstr "OctoPrint Einstellungen"
+182 -151
View File
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OctoPrint 1.2.13.dev7+g6c20e58\n"
"Project-Id-Version: OctoPrint 1.2.14.dev70+gf671006\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-06-16 12:18+0200\n"
"POT-Creation-Date: 2016-07-28 11:50+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -54,7 +54,6 @@ msgstr ""
#: src/octoprint/plugins/announcements/templates/announcements.jinja2:43
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:87
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:197
#: src/octoprint/templates/dialogs/about.jinja2:51
#: src/octoprint/templates/dialogs/settings/appearance.jinja2:96
msgid "Close"
msgstr ""
@@ -194,7 +193,6 @@ msgid ""
msgstr ""
#: src/octoprint/plugins/cura/templates/cura_settings.jinja2:121
#: src/octoprint/templates/dialogs/usersettings.jinja2:46
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:80
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:109
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:151
@@ -203,7 +201,6 @@ msgid "Abort"
msgstr ""
#: src/octoprint/plugins/cura/templates/cura_settings.jinja2:122
#: src/octoprint/templates/dialogs/usersettings.jinja2:47
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:81
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:110
#: src/octoprint/templates/dialogs/settings/accesscontrol.jinja2:152
@@ -507,7 +504,6 @@ msgstr ""
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:48
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:129
#: src/octoprint/templates/index.jinja2:118
msgid "Homepage"
msgstr ""
@@ -661,15 +657,13 @@ msgstr ""
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:26
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:101
#: src/octoprint/templates/dialogs/confirmation.jinja2:11
#: src/octoprint/templates/dialogs/settings.jinja2:52
#: src/octoprint/templates/dialogs/slicing.jinja2:50
#: src/octoprint/templates/sidebar/state.jinja2:19
#: src/octoprint/templates/sidebar/state.jinja2:24
msgid "Cancel"
msgstr ""
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:240
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:102
#: src/octoprint/templates/dialogs/settings.jinja2:53
msgid "Save"
msgstr ""
@@ -974,7 +968,7 @@ msgid "GCode Viewer"
msgstr ""
#: src/octoprint/server/views.py:146
#: src/octoprint/templates/sidebar/state.jinja2:3
#: src/octoprint/templates/sidebar/state.jinja2:4
msgid "Timelapse"
msgstr ""
@@ -1067,63 +1061,22 @@ msgid ""
"may try a manual reconnect using the button below."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:217
#: src/octoprint/static/js/app/dataupdater.js:237
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:239
msgid "Slicing ..."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:245
msgid "Slicing done"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:245
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:255
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:256
msgid "Slicing failed"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:260
msgid "Streaming ..."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:266
msgid "Streaming done"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:267
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:273
#: src/octoprint/static/js/app/dataupdater.js:281
#: src/octoprint/static/js/app/dataupdater.js:230
#: src/octoprint/static/js/app/dataupdater.js:238
msgid "Unhandled communication error"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:274
#: src/octoprint/static/js/app/dataupdater.js:231
#, python-format
msgid ""
"There was an unhandled error while talking to the printer. Due to that "
"the ongoing print job was cancelled. Error: %(firmwareError)s"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:282
#: src/octoprint/static/js/app/dataupdater.js:239
#, python-format
msgid ""
"The was an unhandled error while talking to the printer. Due to that "
"There was an unhandled error while talking to the printer. Due to that "
"OctoPrint disconnected. Error: %(error)s"
msgstr ""
@@ -1199,9 +1152,9 @@ msgid "Disconnect"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/control.js:65
#: src/octoprint/static/js/app/viewmodels/files.js:329
#: src/octoprint/static/js/app/viewmodels/files.js:348
#: src/octoprint/static/js/app/viewmodels/gcode.js:471
#: src/octoprint/static/js/app/viewmodels/printerstate.js:177
#: src/octoprint/static/js/app/viewmodels/printerstate.js:228
#: src/octoprint/static/js/app/viewmodels/temperature.js:58
msgid "Tool"
msgstr ""
@@ -1223,35 +1176,76 @@ msgstr ""
msgid "Your current disk usage."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:324
#: src/octoprint/static/js/app/viewmodels/files.js:329
#: src/octoprint/static/js/app/viewmodels/files.js:343
#: src/octoprint/static/js/app/viewmodels/files.js:348
msgid "Filament"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:333
#: src/octoprint/static/js/app/viewmodels/files.js:352
msgid "Estimated Print Time"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:336
#: src/octoprint/static/js/app/viewmodels/files.js:355
msgid "Last Printed"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:338
#: src/octoprint/static/js/app/viewmodels/files.js:357
msgid "Last Print Time"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:515
msgid ""
"Could not upload the file. Make sure that it is a GCODE file and has the "
"extension \".gcode\" or \".gco\" or that it is an STL file with the "
"extension \".stl\"."
#: src/octoprint/static/js/app/viewmodels/files.js:460
#: src/octoprint/static/js/app/viewmodels/files.js:467
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:536
#: src/octoprint/static/js/app/viewmodels/files.js:462
msgid "Slicing ..."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:488
msgid "Slicing done"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:489
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:504
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:505
msgid "Slicing failed"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:522
msgid "Streaming ..."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:534
msgid "Streaming done"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:535
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:627
#, python-format
msgid ""
"Could not upload the file. Make sure that it is a valid file with one of "
"these extensions: %(extensions)s"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:654
msgid "Uploading ..."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:543
#: src/octoprint/static/js/app/viewmodels/files.js:660
msgid "Saving ..."
msgstr ""
@@ -1463,52 +1457,80 @@ msgstr ""
msgid "Edit Printer Profile \"%(name)s\""
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:44
#: src/octoprint/static/js/app/viewmodels/printerstate.js:45
msgid "Restarts the print job from the beginning"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:45
#: src/octoprint/static/js/app/viewmodels/printerstate.js:46
msgid "Starts the print job"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:46
#: src/octoprint/static/js/app/viewmodels/printerstate.js:47
msgid "Resumes the print job"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:47
#: src/octoprint/static/js/app/viewmodels/printerstate.js:48
msgid "Pauses the print job"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:80
#: src/octoprint/static/js/app/viewmodels/printerstate.js:81
msgid "Calculating..."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:93
msgid "Continue"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:91
msgid "Based on a linear approximation (accuracy highly dependent on the model)"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:95
#: src/octoprint/templates/sidebar/state.jinja2:18
msgid "Pause"
#: src/octoprint/static/js/app/viewmodels/printerstate.js:94
msgid "Based on the estimate from analysis of file (medium accuracy)"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:97
msgid "Based on a mix of estimate from analysis and calculation (medium accuracy)"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:100
msgid ""
"Based on the average total of past prints of this model with the same "
"printer profile (usually good accuracy)"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:103
msgid ""
"Based on a mix of average total from past prints and calculation (usually"
" good accuracy)"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:106
msgid "Based on the calculated estimate (best accuracy)"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:144
msgid "Continue"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:146
#: src/octoprint/templates/sidebar/state.jinja2:23
msgid "Pause"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:157
#: src/octoprint/templates/tabs/timelapse.jinja2:11
msgid "On Z Change"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:108
#: src/octoprint/static/js/app/viewmodels/printerstate.js:159
#: src/octoprint/templates/tabs/timelapse.jinja2:10
msgid "Timed"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:108
#: src/octoprint/static/js/app/viewmodels/printerstate.js:159
#: src/octoprint/templates/tabs/timelapse.jinja2:25
#: src/octoprint/templates/tabs/timelapse.jinja2:32
msgid "sec"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/printerstate.js:216
#: src/octoprint/static/js/app/viewmodels/printerstate.js:268
msgid "This will restart the print job from the beginning."
msgstr ""
@@ -1526,19 +1548,19 @@ msgstr ""
msgid "Autodetect from browser"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/slicing.js:31
#: src/octoprint/static/js/app/viewmodels/slicing.js:104
msgid "Do nothing"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/slicing.js:32
#: src/octoprint/static/js/app/viewmodels/slicing.js:105
msgid "Select for printing"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/slicing.js:33
#: src/octoprint/static/js/app/viewmodels/slicing.js:106
msgid "Start printing"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/slicing.js:45
#: src/octoprint/static/js/app/viewmodels/slicing.js:118
#, python-format
msgid "Slicing %(filename)s"
msgstr ""
@@ -1658,31 +1680,6 @@ msgstr ""
msgid "Site default"
msgstr ""
#: src/octoprint/templates/index.jinja2:115
msgid "Version"
msgstr ""
#: src/octoprint/templates/index.jinja2:119
msgid "Sourcecode"
msgstr ""
#: src/octoprint/templates/index.jinja2:120
msgid "Documentation"
msgstr ""
#: src/octoprint/templates/index.jinja2:121
msgid "Bugs and Requests"
msgstr ""
#: src/octoprint/templates/index.jinja2:122
msgid "About"
msgstr ""
#: src/octoprint/templates/dialogs/about.jinja2:4
#: src/octoprint/templates/dialogs/settings.jinja2:51
msgid "About OctoPrint"
msgstr ""
#: src/octoprint/templates/dialogs/confirmation.jinja2:4
msgid "Are you sure?"
msgstr ""
@@ -1767,10 +1764,6 @@ msgstr ""
msgid "Keep Access Control Enabled"
msgstr ""
#: src/octoprint/templates/dialogs/settings.jinja2:4
msgid "OctoPrint Settings"
msgstr ""
#: src/octoprint/templates/dialogs/slicing.jinja2:8
msgid ""
"Slicing is currently disabled since no slicer has been configured yet. "
@@ -1810,7 +1803,7 @@ msgid "Select a printer profile..."
msgstr ""
#: src/octoprint/templates/dialogs/slicing.jinja2:32
msgid "GCode Filename"
msgid "Output Filename"
msgstr ""
#: src/octoprint/templates/dialogs/slicing.jinja2:41
@@ -1822,11 +1815,6 @@ msgstr ""
msgid "Slice"
msgstr ""
#: src/octoprint/templates/dialogs/usersettings.jinja2:4
#: src/octoprint/templates/navbar/login.jinja2:16
msgid "User Settings"
msgstr ""
#: src/octoprint/templates/dialogs/about/about.jinja2:3
msgid "The snappy web interface for your 3D printer"
msgstr ""
@@ -2030,33 +2018,41 @@ msgid "Wait for <code>start</code> on connect"
msgstr ""
#: src/octoprint/templates/dialogs/settings/features.jinja2:40
msgid "Always assume SD card is present"
msgid "Select SD files by relative path"
msgstr ""
#: src/octoprint/templates/dialogs/settings/features.jinja2:40
msgid "RepRap Firmware"
msgstr ""
#: src/octoprint/templates/dialogs/settings/features.jinja2:47
msgid "Always assume SD card is present"
msgstr ""
#: src/octoprint/templates/dialogs/settings/features.jinja2:47
#: src/octoprint/templates/dialogs/settings/features.jinja2:54
#: src/octoprint/templates/dialogs/settings/features.jinja2:61
#: src/octoprint/templates/dialogs/settings/features.jinja2:68
#: src/octoprint/templates/dialogs/settings/features.jinja2:75
msgid "Repetier"
msgstr ""
#: src/octoprint/templates/dialogs/settings/features.jinja2:47
#: src/octoprint/templates/dialogs/settings/features.jinja2:54
msgid "Send a checksum with <strong>every</strong> command"
msgstr ""
#: src/octoprint/templates/dialogs/settings/features.jinja2:54
#: src/octoprint/templates/dialogs/settings/features.jinja2:61
msgid "Ignore consecutive resend requests for the same line"
msgstr ""
#: src/octoprint/templates/dialogs/settings/features.jinja2:61
#: src/octoprint/templates/dialogs/settings/features.jinja2:68
#, python-format
msgid ""
"Support <code>TargetExtr%%n</code>/<code>TargetBed</code> target "
"temperature format"
msgstr ""
#: src/octoprint/templates/dialogs/settings/features.jinja2:68
#: src/octoprint/templates/dialogs/settings/features.jinja2:75
msgid "Disable detection of external heatups"
msgstr ""
@@ -2099,7 +2095,7 @@ msgstr ""
#: src/octoprint/templates/dialogs/settings/folders.jinja2:47
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:69
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:90
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:66
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:69
#: src/octoprint/templates/tabs/timelapse.jinja2:13
msgid "Warning"
msgstr ""
@@ -2417,6 +2413,37 @@ msgstr ""
msgid "Simulate an additional `ok` for resend requests"
msgstr ""
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:129
msgid ""
"Maximum consecutive communication timeouts while idle. More than this and"
" the printer will be considered to be gone. Set to 0 to disable."
msgstr ""
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:130
msgid "Max. consecutive timeouts while idle"
msgstr ""
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:135
msgid ""
"Maximum consecutive communication timeouts while printing. More than this"
" and the printer will be considered to be gone. Set to 0 to disable."
msgstr ""
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:136
msgid "Max. consecutive timeouts while printing"
msgstr ""
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:141
msgid ""
"Maximum consecutive communication timeouts while a long running command "
"is active. More than this and the printer will be considered to be gone. "
"Set to 0 to disable."
msgstr ""
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:142
msgid "Max. consecutive timeouts during long running commands"
msgstr ""
#: src/octoprint/templates/dialogs/settings/server.jinja2:2
msgid "Commands"
msgstr ""
@@ -2545,6 +2572,10 @@ msgstr ""
msgid "Remember me"
msgstr ""
#: src/octoprint/templates/navbar/login.jinja2:16
msgid "User Settings"
msgstr ""
#: src/octoprint/templates/navbar/login.jinja2:17
msgid "Logout"
msgstr ""
@@ -2629,7 +2660,7 @@ msgstr ""
msgid "Total"
msgstr ""
#: src/octoprint/templates/sidebar/files.jinja2:64
#: src/octoprint/templates/sidebar/files.jinja2:67
msgid "Hint: You can also drag and drop files on this page to upload them."
msgstr ""
@@ -2693,39 +2724,39 @@ msgstr ""
msgid "Machine State"
msgstr ""
#: src/octoprint/templates/sidebar/state.jinja2:2
#: src/octoprint/templates/sidebar/state.jinja2:3
msgid "File"
msgstr ""
#: src/octoprint/templates/sidebar/state.jinja2:7
#: src/octoprint/templates/sidebar/state.jinja2:8
msgid "Approx. Total Print Time"
msgstr ""
#: src/octoprint/templates/sidebar/state.jinja2:8
#: src/octoprint/templates/sidebar/state.jinja2:10
msgid "Print Time"
msgstr ""
#: src/octoprint/templates/sidebar/state.jinja2:9
#: src/octoprint/templates/sidebar/state.jinja2:11
msgid "Print Time Left"
msgstr ""
#: src/octoprint/templates/sidebar/state.jinja2:10
#: src/octoprint/templates/sidebar/state.jinja2:12
msgid "Printed"
msgstr ""
#: src/octoprint/templates/sidebar/state.jinja2:17
#: src/octoprint/templates/sidebar/state.jinja2:22
msgid "Restart"
msgstr ""
#: src/octoprint/templates/sidebar/state.jinja2:17
#: src/octoprint/templates/sidebar/state.jinja2:22
msgid "Print"
msgstr ""
#: src/octoprint/templates/sidebar/state.jinja2:18
#: src/octoprint/templates/sidebar/state.jinja2:23
msgid "Resume"
msgstr ""
#: src/octoprint/templates/sidebar/state.jinja2:19
#: src/octoprint/templates/sidebar/state.jinja2:24
msgid "Cancels the print job"
msgstr ""
@@ -2803,47 +2834,47 @@ msgstr ""
msgid "Fan off"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:14
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:17
msgid "Model info"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:21
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:24
msgid "Renderer options"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:25
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:28
msgid "Sync with job progress"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:30
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:33
msgid "Center viewport on model"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:33
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:36
msgid "Zoom in on model"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:39
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:42
msgid "Show moves"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:42
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:45
msgid "Show retracts"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:48
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:51
msgid "Also show previous layer"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:51
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:54
msgid "Also show next layer"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:56
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:59
msgid "Reload"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:62
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:65
msgid ""
"Note that the time estimates in this tab are calculated by the GCODE "
"viewer in your browser and might differ from the values calculated by the"
@@ -2851,7 +2882,7 @@ msgid ""
"sidebar due to slightly different implementations."
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:67
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:70
msgid ""
"<p>\n"
" You've selected <strong data-bind=\"text: "
@@ -2868,7 +2899,7 @@ msgid ""
" </p>"
msgstr ""
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:78
#: src/octoprint/templates/tabs/gcodeviewer.jinja2:81
#, python-format
msgid "Yes, please visualize %(name)s regardless of its size"
msgstr ""