Commit graph

2765 commits

Author SHA1 Message Date
Gina Häußge
6d4f8266cd Fix message for synchronous system commands
We managed to swap those m(
2017-11-24 13:46:38 +01:00
Gina Häußge
991dab58d5 Remove experimental extension tree caching 2017-11-24 13:20:50 +01:00
Gina Häußge
0de0e4ea9b Handling of non gcode SD file transfers
No guarantees however that transporting anything BUT gcode via the usual
M28/M29 interface will even remotely work. Note that it most likely
won't work if the transferred file contains an M29 (= end transfer),
just like with transferred GCODE files.

Also note that stuff like config files or some such that might be
transferred might contain lines that are too large to fit into the
buffer of the printer. This is really just to enable plugins to maybe do
some nifty stuff, no official support of streaming arbitrary files to
the printer's SD (for that we'd need WAY more firmware support first).

See jneilliii/OctoPrint-SmoothiewareConfig#1
2017-11-24 13:11:23 +01:00
Gina Häußge
9b3c1947d9 Limit SD transfers to broader machinecode type
See jneilliii/OctoPrint-SmoothiewareConfig#1
2017-11-24 13:08:10 +01:00
Gina Häußge
364d692db2 Support leaf merging for file extension tree
This allows us to add new extensions to existing entries (e.g. a new
extension for gcode files)
2017-11-24 13:07:16 +01:00
Gregers Gram Rygg
b002e41a00 Respond with 411 Length Required when missing 2017-11-24 11:32:07 +01:00
Gina Häußge
f3080daa47 Merge branch 'maintenance' of github.com:foosel/OctoPrint into maintenance 2017-11-24 11:31:44 +01:00
Gina Häußge
26789a2bb7 CPU frequency might be reported as None
Don't die when that's the case.
2017-11-24 11:26:27 +01:00
Gina Häußge
4a5308b4ab Fix plugin detection only finding one plugin
We actually should iterate over ALL of the generator, not just its first
entry m)
2017-11-24 10:51:14 +01:00
alex-gh
f4eb60dc6a Improved the checksumming speed by a factor of 1.4-3.4 2017-11-23 14:04:31 +01:00
Gina Häußge
b252da477c Virtual printer: allow empty/None prepared oks 2017-11-22 12:49:58 +01:00
Gina Häußge
8a977e8777 Some long overdue == vs === view model cleanup 2017-11-21 10:18:46 +01:00
Gina Häußge
65753a0539 Convert to new viewmodel declaration
We've been supporting the new object based view model declaration
format since 1.3.0, time to move the bundled view models towards
actually using it.
2017-11-21 10:17:52 +01:00
Gina Häußge
f1518e6fe6 Use octoprint.__version__ instead of more convuluted option 2017-11-20 18:08:05 +01:00
Gina Häußge
c7e248b142 Fix handling of "missing line number" errors
We so far assumed that a resend request would follow that. Alas, it
won't and we'll simply get stuck due to a missing ack from the printer.
So let's simulate that here to keep things flowing.

Fixes #2226
2017-11-20 18:07:15 +01:00
Gina Häußge
59ca2188d9 Fix resend simulating & add trigger_missing_lineno
* we now don't send the triggered resend/comm errors out of band but
    instead as a response to the next received actual line - that
    prevents us from getting out of sync
  * new trigger_missing_lineno debug function to trigger a missing line
    number error _without_ a resend request for testing fix for #2226
2017-11-20 17:57:00 +01:00
Gina Häußge
c479c5455c Don't log request on uncaught errors in tornado
Might leak information if logs are shared. Still stick to the old
logging verbosity however if running in debug mode.
2017-11-17 12:06:17 +01:00
Gina Häußge
ebfc6f2f26 More dynamic detection of plugin mixins
Instead of hardcoding a list of supported mixins, we now instead define
a base class (or a list thereof) from which mixins might inherit and use
inspection to determine the set of mixins each plugin implementation
implements. Not only will that reduce the risk of forgetting to add a
new mixin to the whitelist, but it will also allow mixins defined by
plugins.
2017-11-13 16:01:37 +01:00
Gina Häußge
0b1db60d8b Easier copying of terminal contents 2017-11-13 14:10:54 +01:00
Gina Häußge
f9c738541f Workaround: temperature select not working in Edge
As suggested by @Mikk36 in #2214.

Closes #2214.
2017-11-13 13:51:27 +01:00
Gina Häußge
6c21911eb0
Merge pull request #2217 from Depaulicious/patch-1
Fix __future__ import in util
2017-11-13 10:09:24 +01:00
Davide Depau
fd7fdec565
Fix __future__ import in util
This syntax is accepted by CPython, but it doesn't work on PyPy.
2017-11-12 17:17:08 +01:00
Gina Häußge
b892b43ee1 Plugin metadata for OctoPi Support plugin & fix 2017-11-10 19:14:33 +01:00
Gina Häußge
14c1dfe9a3 New command "octoprint config effective" 2017-11-10 19:08:24 +01:00
Gina Häußge
1180e4e27b Fix & extend environment detection on Pi 2017-11-10 18:27:52 +01:00
Gina Häußge
b2d70de144 Environment detection & logging on startup
Incl. OctoPi version & RPi model through bundled plugin that only
gets loaded if OctoPi is detected.
2017-11-10 17:32:59 +01:00
Gina Häußge
0bb343e1d3 Sort timelapses by mtime instead of ctime
Otherwise we get bad sorting after copying over the files from another
instance (e.g. after backup/restore as described on the wiki).
2017-11-10 13:25:16 +01:00
Gina Häußge
92b048c789 Reset temperature data on disconnect 2017-11-10 13:03:36 +01:00
Gina Häußge
a6eac3911b Reset temperature offsets on disconnect
Fixes #2203
2017-11-10 12:40:58 +01:00
Gina Häußge
80bc82df55 Protect against broken packages in python env
As seen in https://groups.google.com/forum/#!msg/octoprint/DyXdqhR0U7c/kKMUsMmIBgAJ
a broken entry_points.txt in some arbitrary Python package installed in
the same python envrionment as OctoPrint can make our whole plugin
detection fail and hence interrupt regular server startup.

This adds better protection against such cases.
2017-11-10 11:14:50 +01:00
Gina Häußge
651a8f315b Strip query params from displayed link URLs
Looks to chaotic otherwise.
2017-11-10 10:50:25 +01:00
Gina Häußge
69f9c523f9 Add utm tags to announcement links 2017-11-09 10:49:39 +01:00
Gina Häußge
5aad696c5c Do not enable timelapse if settings are missing
If snapshot url and/or ffmpeg path are not set, the timelapse cannot
work regardless of what type has been configured.

So if the current configuration still contains a timelapse type other
than "off" but snapshot url or ffmpeg path are unset, force a disabled
timelapse.

Fixes #2206
2017-11-06 12:24:19 +01:00
Gina Häußge
9837f67140 Small adjustments in webasset filters
* Add comment with source file to JsDelimiterBundler and
    JsPluginDelimiterBundler
  * Include source file name in JsPluginDelimiterBundler catch
    block and use log.error instead of console.error
2017-11-06 11:39:11 +01:00
Josh Major
dc53942015 Added plugin Javascript isolation 2017-11-04 10:08:04 -05:00
Gina Häußge
79581c390a Prefer plain pip over git for updating OctoPrint
At least unless we've selected git based tracking over release tracking.

This should greatly reduce the likelihood of not being able to update
due to some git repository corruption issues, as has happened to some
people in the past.
2017-11-03 16:31:21 +01:00
Gina Häußge
c30e54d75c Slight rewording/typo correction 2017-11-03 14:55:55 +01:00
Gina Häußge
55adb7ca33 Support sub codes for auto upper casing too
If either the full code or just the main code are blacklisted, only
upper case the code. Otherwise also upper case the parameter list.

In any case push originally entered command to history, not the
modified one.
2017-11-03 14:48:45 +01:00
Peter Backx
ce16f861b3 Implemented @foosel's suggestions + made the blacklist settings actually work [#1026]
(cherry picked from commit 1857f07)
2017-11-03 12:44:25 +01:00
Ishwar Agarwal
51406b7c42 Auto uppercase Gcode except commands in configurable blacklist
Added new config setting: auto uppercase blacklist that is configurable
in the advanced option of the serial tab, with M117 included in the
default settings of the blacklist. Changed the sendCommand method in the
TerminalViewModel to auto uppercase the entire gcode command except when
gcode is in the blacklist. Updated documentation to include the default
auto uppercase blacklist command M117.

Resolves: #1026

(cherry picked from commit dbf7af1)
2017-11-03 12:44:05 +01:00
Peter Backx
a0df4e78b5 Fixing Sphinx warnings during doc generation 2017-11-03 11:11:52 +01:00
Gina Häußge
772ee76e76 More hardening against invalid requests
See #2189
2017-11-02 09:36:53 +01:00
Gina Häußge
caaaa2e4e9 Fix temperature autoreport after external reset
We didn't reset the capability flag and also didn't resend M155. Now we
do at least the latter if we detected that the printer supports
temperature auto reporting earlier.
2017-10-30 12:59:43 +01:00
Gina Häußge
02aad445aa Hardening against system.actions = null
See #2187
2017-10-30 12:36:09 +01:00
Gina Häußge
bf7d4173cd Fix auto-adjust of temperature y axis
Thanks @Salandora for the heads-up
2017-10-27 14:22:03 +02:00
Shawn Bruce
b2552795dc Set tools actual/target to 0 if they dont exist. 2017-10-26 13:12:38 -04:00
Shawn Bruce
4b5eff5ec6 Don't set target temp for tools that do not exist. 2017-10-26 12:42:55 -04:00
Gina Häußge
bedcbb80be Set a minimum delay of 1s between snapshots
Followup to #2067
2017-10-26 16:38:40 +02:00
Gina Häußge
09509ca61d Refactor timelapse form & add reset button 2017-10-26 16:33:00 +02:00
Gina Häußge
8bf3f4ff50 Rate limit snapshots on for z-timelapses
This is to prevent against an endless stream of snapshots when
accidentally printing a vase mode file despite the warning.

As mentioned in #2067
2017-10-26 16:03:54 +02:00