Commit graph

2793 commits

Author SHA1 Message Date
Gina Häußge
41eb9481b3 Fix offset values on API after setting one offset
Make sure to set the actual effective offsets as provided by the comm
layer (which merges incoming single offset adjustments) instead of only
setting the input, effectively nuking return of offsets set prior.

Closes #2268
2017-12-05 12:17:48 +01:00
Gina Häußge
743d590d52 model might not be set yet
So don't try to read its length right away.

Closes #2267
2017-12-05 10:54:33 +01:00
Gina Häußge
cc0a17f2ac Unit tests for MachineCom._handle_errors
With various Marlin and Repetier error variants.
2017-12-04 15:56:31 +01:00
Gina Häußge
9b1b4420a3 Make error messages in virtual printer configurable
We want to be able to test various firmware variants for stuff like
checksum and line number mismatches...

See also #2262
2017-12-04 11:47:29 +01:00
Gina Häußge
263925625b resend_request_communication_errors was too narrow
Didn't match Marlin's "checksum mismatch", only Repetier's "checksum
error". Since the error handler checks against
recoverable_communication_errors before
resend_request_communication_errors, we can just switch back to the more
broader check against "checksum" for the latter.

We could also have added an explicit check for "checksum mismatch"
instead but since we used to check for "checksum" and we don't know what
other varieties for this specific error might be out there in the
thousands of firmware variants (who needs consistency when they can
have a free for all?), we'll err on the side of caution instead.

Fixes #2262
2017-12-04 11:10:06 +01:00
Gina Häußge
f72dfb48e1 Fix ordering of plugin assets
Should be alphabetical per their identifier. As noticed by @BillyBlaze
2017-12-01 18:16:44 +01:00
Gina Häußge
e064400900 Link to blacklist in wizard & settings
As suggested by @Kunsi in #2256
2017-12-01 17:47:16 +01:00
Gina Häußge
99e1c3ac00 Remove branch from display version
It's no longer reliable since the Github archive export we'll now
usually use for upgrading does weird things when a tag is available on
more than one branch and we don't want our current stable version to
be reported as "rc/devel" just because that tag is available there too.

A full blown version number should be definitive enough considering that
if it's not a tag it will also contain the commit hash.
2017-12-01 12:48:33 +01:00
Gina Häußge
d1f54b5a22 More error resilience 2017-12-01 11:16:16 +01:00
Gina Häußge
1c55a12207 New link 2017-12-01 11:15:56 +01:00
Gina Häußge
58dba3a79a Update german translation
And remove some translatable text from the about dialog template of the
OctoPi support plugin.
2017-11-30 18:16:40 +01:00
Gina Häußge
4ea76f84c5 Fix log roll over logging 2017-11-30 17:26:44 +01:00
Gina Häußge
ac345daba2 Don't output pi model & serial in about dialog
Too public for this kind of information after all. The OctoPi version is
enough info.
2017-11-30 17:25:27 +01:00
Gina Häußge
3cf694a333 Also update hash on tab change
Related to #203
2017-11-30 12:50:05 +01:00
Gina Häußge
26c8c5f03f Don't fire onAfterTab twice & check tab's there
Related to #203
2017-11-30 12:49:55 +01:00
Marc Hannappel
f2bd5d605e Added active tab using hash from URL feature, as requested in issue #203
(cherry picked from commit bcb74d0)
2017-11-30 12:29:37 +01:00
Gina Häußge
0560e9da02 Disable distance buttons when printing
Closes #2232
2017-11-29 19:32:06 +01:00
Gina Häußge
38c9840e30 Add note to printer profile editor about offsets
We don't need to define them in the firmware AND in OctoPrint. If they
are already set in firmware we'll otherwise get wonky issues in the
GCODE viewer or when slicing.

Closes #2229
2017-11-29 19:00:00 +01:00
Gina Häußge
f77e49be7f Use new ChainedHunk for JsPluginBundle 2017-11-29 18:53:38 +01:00
Gina Häußge
00cb71898a Some rewording and icons on final wizard page 2017-11-29 18:15:41 +01:00
Gina Häußge
328c08b775 Wrap all plugin's JS assets into same IIFE
As discussed in #2200.

For this to work we've introduced sub-bundles per plugin for the JS
assets. CSS and LESS on the other hand are basically handled as before.
We use a custom bundle class here since it's apparently not possible to
keep a sub bundle from inheriting the parent's filters, thus not
allowing us something like

  packed_plugins [js_plugin_delimiter_bundler]
    packed_plugin_a [js_delimiter_bundler]
    packed_plugin_b [js_delimiter_bundler]
    ...

The individiual bundles per plugin would inherit
js_plugin_delimiter_bundler and we'd get a double wrapper - not helpful.

Instead we now have a modified JsPluginBundle that overwrites
Bundle._merge_and_apply to further wrap the returned hunk.
2017-11-29 17:28:30 +01:00
Gina Häußge
ca7aa322c3 Some cleanup, refactoring & docs 2017-11-29 15:55:33 +01:00
Gina Häußge
5c20e264e2 Feature flag to enable legacy plugin assets
Work around issues like #2246 until the plugins that are affected are
fixed.

To be removed in 1.3.8.

See also #2200
2017-11-29 15:55:09 +01:00
Gina Häußge
aa65671ac7 Always check active flag 2017-11-28 13:05:28 +01:00
Gina Häußge
14bd0632c0 parse_requirements => Requirement.parse
Since we only ever handle one requirement here, the parse_requirements
generator (which btw needs a next m() is not the best choice.

Also extracted install command cleanup into class method and added tests
for that.

cc @markwal
2017-11-28 12:02:43 +01:00
Gina Häußge
d174d7ab80 Temporary fix for #2246 until #2200 is solved 2017-11-27 17:24:40 +01:00
Gina Häußge
a2d38016ec Fix some corner cases of print time formatting
Closes #2242
2017-11-27 12:38:13 +01:00
Gina Häußge
cf25291dee Mark readonly fields readonly instead of disabled
Further fix for FF issues with disabled input fields as tracked in
#2056 and #2196.
2017-11-27 12:23:20 +01:00
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