Commit graph

4472 commits

Author SHA1 Message Date
Gina Häußge
853bb2fc16 Have G92 set pos directly, use offset only for tool offsets
See #1906 for related discussion
2017-05-09 17:17:08 +02:00
Gina Häußge
ccc3c4ef32 Detect invalid settings data to persist (not a dict), send 400 2017-05-09 14:36:45 +02:00
Gina Häußge
72898360f3 Get rid of ridiculous float precision in temperature commands
"M104 S200.00000000" is completely unnecessary when "M104 S200" works
just fine.
2017-05-09 09:38:10 +02:00
Gina Häußge
2caa10f15e Don't send T with temperature set commands for shared nozzles
Fixes #1907
2017-05-09 09:29:52 +02:00
Gina Häußge
399ec5a909 Allow configuring the webcam stream's aspect ratio
Options are 16:9 and 4:3, 16:9 is the default.
2017-05-08 17:35:51 +02:00
Gina Häußge
c844217f82 Placeholder for webcam image to avoid moving controls on load
An aspect ratio of 16:9 is assumed, with other ratios showing black
letterbox borders as required.

During loading a text "Webcam loading..." is displayed in the webcam
space. On loading error, the (broken) image is hidden and an error
text is displayed instead.

Solves #478
2017-05-08 17:04:03 +02:00
Gina Häußge
f32d7c434d Docs: Added note that coordinates in script context might be None
Wasn't made clear before.
2017-05-03 20:18:11 +02:00
Gina Häußge
844494a9d5 Only prevent command processing if streaming AND printing
Otherwise we might run into a rare race condition where the M110 sent
on start of a SD card upload gets prepared for sending after the
source file is already opened. That would then lead to the M110 not
getting processed anymore by OctoPrint and hence the line number
counter not resetting accordingly, leading to one line number
mismatch after the next from the firmware.

Testing if our "isPrinting" flag is ALSO set to true here ensures
that we'll only stop processing commands internally once the state
has actually switched to printing, which only happens after the
firmware responds to the M28 sent after the M110.

Fixes #1882 and probably also the issue encountered by @amd989 in
#1762 (which looks like exactly the same problem)
2017-05-03 18:55:00 +02:00
Gina Häußge
f1254622c5 Docs: Link to Jinja 2.8.1 documentation mirror at jinja.octoprint.org
The official docs are only 2.9+, that doesn't help us as long as we are
stuck with 2.8.

Fixes #1900
2017-05-03 11:56:25 +02:00
Gina Häußge
060aa1274a Some minor refactoring of #1898 for better maintainability 2017-05-02 17:45:28 +02:00
Andy Werner
fe0aa0301f Software update plugin: added check_type bitbucket_commit
(cherry picked from commit ee75ddc)
2017-05-02 17:25:01 +02:00
Gina Häußge
cda48f3b71 Fix some potential encoding issues
Might be a fix for #1884, can't be confirmed though, ticket is
incomplete.
2017-05-02 14:59:05 +02:00
Gina Häußge
c69ef1598a Don't allow multiple parallel webcam tests
Disable button when a test is already active. Also have spinner
defined centrally and only made visible on active test.

Should hopefully give better feedback to impatient users ;)

Solves #1897
2017-05-02 13:39:38 +02:00
Gina Häußge
0161d915d6 Some refactoring in CuraViewModel
* Use click data-bind for submit button instead of manual click
    binding
  * Keep metadata synchronized (otherwise changing identifier, name,
    description, overwrite or default flag after adding a file does
    absolutely nothing)
  * Disable submit button and fields when no file is selected.
  * Disable submit button (and show spinned) when request is in
    progress.

Related to #1893
2017-05-02 12:57:32 +02:00
Eyal Soha
f5fad5186e Clear upload data when Aborting cura profile upload modal.
This fixes #1893.

Also, only bind click to the "Confirm" button once instead of binding
and unbinding it for each file.  Binding it just once seems cleaner.

(cherry picked from commit 83d1921)
2017-05-02 10:04:54 +02:00
Gina Häußge
2817979c3d CSS updated 2017-05-02 09:57:26 +02:00
Gina Häußge
cc44c1a981 Make sure to properly handle unicode passwords
Fix & test for #1891
2017-05-02 09:35:02 +02:00
Gina Häußge
dda3a303d2 Recover terminal functionality on processing speed increase
If double the speed needed for output during print/fancy terminal
functionality is detected, re-enable that after a timeout of 5s.
Decrease of speed cancels the timeout again. That should prevent wild
toggling.

Should solve #1862
2017-04-20 12:15:40 +02:00
Gina Häußge
b79606da70 Never auto-complete GCODE to send
Solves #1875
2017-04-19 18:03:44 +02:00
Gina Häußge
fb9131f67a Some de-duplication 2017-04-19 11:34:34 +02:00
Eyal Soha
358a252736 Fix dragndrop upload
See #1867. Fixes #202.

(cherry picked from commit d658c64)
2017-04-19 11:34:11 +02:00
Gina Häußge
fd7c81c7fb Link to FAQ entry about SerialExceptions to log output
As suggested in #1876
2017-04-18 13:03:17 +02:00
Gina Häußge
a09b54d374 Have tag based branches not report post versions unless dirty
That will allow us to make changes to e.g. github related metadata files
stored in the repository without OctoPrint reporting a non tag version.
2017-04-13 11:49:58 +02:00
Gina Häußge
2a7cebfe55 Keep "Load and print" button enabled when file is selected
Some users get confused by having to use the blue "Print" button in
the state panel for consecutive prints of the same model, let's solve
this once and for all.
2017-04-12 19:04:45 +02:00
Gina Häußge
0f6edabea3 Also use fastForEach in working dialogs of PMGR & software update 2017-04-12 18:54:08 +02:00
Gina Häußge
45231ea7f8 Merge branch 'improve/terminalFastForEach' into maintenance 2017-04-12 18:21:52 +02:00
Gina Häußge
c00b46ef5c Support timeout parameter in client and CLI 2017-04-12 15:40:54 +02:00
Gina Häußge
251a1ea4b5 "a couple" => "a few"/"some"
Because apparently I was using it wrong, at least for some parts of the
world :)
2017-04-12 14:54:32 +02:00
Gina Häußge
bba9d6cc18 Use proper timeouts for requests + better error handling
Default behaviour apparently is blocking, we never want that!

Also make error responses actually raise an exception.
2017-04-12 13:50:52 +02:00
Gina Häußge
9bcce4e56a docs: plugin tutorial requires 2017-04-12 13:00:56 +02:00
BillyBlaze
6465175e09 Improve terminal performance by adding FastForEach
Move the AutoScroll function to an animation frame to prevent layout thrashing and to keep it in sync with fastForEach
Remove the <br> tag from the terminal and use display: block; on span tags to prevent increasing DOM nodes and faster processing of the terminal
2017-04-12 08:17:34 +00:00
Gina Häußge
fe585e7115 Do not repeatedly apply any set offsets in the gcode interpreter
They would accumulate and cause wrong calculations

Solves #1863
2017-04-12 09:38:53 +02:00
Gina Häußge
b84432c8a5 Merge branch 'patch-1' of http://github.com/ParkerK/OctoPrint into maintenance 2017-04-11 09:36:13 +02:00
Parker K
c6623c8883 added missing period and space so works 2017-04-10 21:35:46 -04:00
Gina Häußge
ef01560199 If file hash doesn't match on adding a file, kill all metadata 2017-04-10 17:31:00 +02:00
Gina Häußge
1666a1f607 Removed "minify" option for assets and some redundancy 2017-04-10 16:28:04 +02:00
Gina Häußge
4109b2f6c2 Announcements: Unit tests for the converters 2017-04-10 13:57:21 +02:00
Gina Häußge
9f32e91e05 Turned lazyload into jquery plugin, used for announcements
On call of the lazyload plugin, all matched img elements will be
checked if they have a data-src attribute. If so, their src attribute
will be replaced with the contents of the data-src attribute
(effectively loading the image) and the data-src attribute will be
removed (so that multiple calls don't call multiple processing).
2017-04-10 11:54:03 +02:00
Gina Häußge
7c8f148fa8 Announcements: Don't load imgs until reader is opened
Closes #1858
2017-04-10 11:21:18 +02:00
Gina Häußge
d1c6381792 Intermediary page: Offer "reload now" once server is up but not cached 2017-04-10 10:45:16 +02:00
Gina Häußge
a477268beb More logging for preemptive cache 2017-04-10 10:43:46 +02:00
Gina Häußge
346f818707 PGMR: More general flexibility for os compat check
* Don't restrict the list of compatibility values to check against
    to only those we have mapped, also support unmapped more exotic
    ones.

  * Allow 1:1 check against sys.platform values (with startswith).
    Combined with the above that allows very granular compatibility
    modelling ("freebsd11", "freebsd12") if required.

  * Instead of only whitelisting ("linux", "freebsd") now also black
    listing is possible ("!windows").

    A detected os must match all provided whitelist elements (if the
    whitelist is empty that is considered always the case) and none of
    the backlist elements (if the blacklist is empty that is also
    considered always the case).

See the included unit tests for examples of how this works.
2017-04-07 09:18:37 +02:00
Gina Häußge
956d9581c5 PMGR: Add freebsd os compatibility flag 2017-04-07 09:16:26 +02:00
Gina Häußge
7828ab0bf9 Fix tests for server.util.*
Weren't properly included in test suite, and those for the flask
utility also had some errors due to buggy test implementation.
2017-04-07 09:15:08 +02:00
Gina Häußge
41e9d96815 Use pip instead of python setup.py develop in CLI for plugin install
Apparently python setup.py develop tries to re-install all scripts
provided by plugins (maybe only under Windows?). Since that includes
OctoPrint's own executable, things will explode with an access denied
error there. Switching over to pip install -e . fixes that, and also
is more conform with the install approach the plugin will take in
production anyhow.
2017-04-07 09:15:05 +02:00
Gina Häußge
09d1025dfc Use blacklisting instead of whitelisting for checking daemon support
Just to be on the safe side... This is _exactly_ the same behaviour
as it was under 1.2.x again.
2017-04-06 10:02:48 +02:00
Gina Häußge
163fd83bf5 PGMR: Detect necessity to reinstall
So far using the "... from URL" or "... from an uploaded archive"
mechanism for installing a plugin would fail without further
information if the plugin to be installed was already installed.

The plugin manager will now detect this situation by parsing the
corresponding message from the pip output and trigger a reinstall
instantly.

A message about this will be logged to octoprint.log and the install
output.

Additionally the error handling for installation errors has been
slightly improved (install output no longer says "Done!" but "Error!"
with the reason as provided by the server) and the "could not install
plugin from URL unknown" issue should also be solved.
2017-04-04 15:18:37 +02:00
Gina Häußge
e109bf0ca6 Fix: Make Printer.is_ready behave as advertised 2017-04-03 18:48:45 +02:00
Gina Häußge
4d324c5239 Fix unit tests 2017-04-03 18:47:27 +02:00
Gina Häußge
8cbf5a74b3 Fix analysis backlog calculation for specific path on storage
We need to convert the provided path into a local storage one first,
otherwise the following scandir calls will fall on their faces.
2017-04-03 17:18:26 +02:00