Commit graph

807 commits

Author SHA1 Message Date
Gina Häußge
45c1958d83 Versioneer now also returns and persists the branch from which OctoPrint was installed
Changed version output accordingly to now display "{version} ({branch} branch)" if branch information is available (which should be the case if installation was performed from git).
(cherry picked from commit a48b5de)
2014-09-03 10:56:39 +02:00
Gina Häußge
e51d9439c5 Modified versioneer to allow specification of manual versions based on branches
You can now define a lookup file explicitely mapping virtual version tags to branches via regular expressions and a reference commit from which the commit distance will be calculated.

Format of the file is

  <branch-regex> <tag> <reference commit>

The file is processed from top to bottom, the first matching line wins. If <tag> or <reference commit> are left out, the lookup table does not apply to the matched branches and the regular versioneer resolution (via git describe) takes place.

Current configuration makes "master", "staging" and any branch starting with "fix/" make use the default behaviour, all other branches (so basically all development branches) are defined as "1.2.0-dev"
(cherry picked from commit 212f40c)
2014-09-03 10:53:54 +02:00
Gina Häußge
a48b5deb29 Versioneer now also returns and persists the branch from which OctoPrint was installed
Changed version output accordingly to now display "{version} ({branch} branch)" if branch information is available (which should be the case if installation was performed from git).
2014-09-02 12:06:02 +02:00
Gina Häußge
212f40cd1a Modified versioneer to allow specification of manual versions based on branches
You can now define a lookup file explicitely mapping virtual version tags to branches via regular expressions and a reference commit from which the commit distance will be calculated.

Format of the file is

  <branch-regex> <tag> <reference commit>

The file is processed from top to bottom, the first matching line wins. If <tag> or <reference commit> are left out, the lookup table does not apply to the matched branches and the regular versioneer resolution (via git describe) takes place.

Current configuration makes "master", "staging" and any branch starting with "fix/" make use the default behaviour, all other branches (so basically all development branches) are defined as "1.2.0-dev"
2014-09-02 11:35:42 +02:00
Gina Häußge
18952c57ff Added automatic migration of old event subscription format to the new one
(cherry picked from commit e7088ef)
2014-08-31 22:54:16 +02:00
Gina Häußge
95f084fb36 i18n: Forgot to include compiled javascript i18n resources for Romanian 2014-08-31 22:03:00 +02:00
Gina Häußge
0b237a2469 i18n: Added Romanian translation 2014-08-31 22:02:23 +02:00
Gina Häußge
f970594c28 Merge branch 'translation' of https://github.com/guysoft/OctoPrint into devel 2014-08-31 21:44:18 +02:00
guysoft
425f6f7c0b Add Hebrew compiled translation 2014-08-31 18:51:11 +03:00
guysoft
c229dc1548 Adding Hebrew strings to translation 2014-08-31 18:46:48 +03:00
Gina Häußge
e4cc84b771 Merge branch 'master' into devel
Conflicts:
	docs/index.rst
	setup.py
	src/octoprint/server/__init__.py
	src/octoprint/server/api/__init__.py
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/gcodeviewer/js/renderer.js
	src/octoprint/static/js/app/viewmodels/printerstate.js
	src/octoprint/static/less/octoprint.less
	src/octoprint/templates/index.jinja2
2014-08-31 15:28:07 +02:00
guysoft
a8e9c5aaf2 Initial creation of Hebrew translation 2014-08-31 13:28:16 +03:00
Gina Häußge
e77efde503 Make key removal from session more solid
Do not die a horrible death if the key you are attempting to remove from the session upon logout doesn't exist. Attempt at
fixing #556
2014-08-29 09:26:57 +02:00
Gina Häußge
4583128c02 i18n: First version of french translation 2014-08-28 19:23:10 +02:00
Gina Häußge
35b1232b0a Fixed hen-egg problem in setup.py
setup.py tried to use babel imports before the necessary requirements
were fetched. Now only tries to import that stuff if
babel_{refresh|compile|new} is called instead of importing it
in the file header.
2014-08-28 15:59:57 +02:00
Gina Häußge
bc8fe527f7 Updated german translation to include "Connection" too 2014-08-28 15:54:32 +02:00
Gina Häußge
2943343003 Forgot to make "Connection" translatable, fixed 2014-08-28 15:50:42 +02:00
Gina Häußge
4e061ef385 i18n: Made the string "OctoPrint" translatable too to allow for different writing systems 2014-08-27 20:11:45 +02:00
Gina Häußge
22bde81712 i18n: Removed a test string I had forgotten to remove earlier and also realised that I hadn't pushed the most recent version yet 2014-08-27 19:41:06 +02:00
Gina Häußge
0adbef9696 Updated german translation 2014-08-27 14:49:39 +02:00
Gina Häußge
53e52c841b First version of OctoPrint with i18n/l10n support
Also included is a translation for (informal) german.

New languages can be added with "python setup.py babel_new --locale=<language code>" which will create the corresponding .po file from the existing .pot file under "src/octoprint/translations/<language code>". Translations can be refreshed from strings in source with "python setup.py babel_refresh". Existing translations can be compiled into usable translation files (.mo for python and .js for Javascript) via "python setup.py babel_compile".

 You'll need to install the development dependencies for all of this to work, just issue "pip install -r requirements-dev.txt"

 Note: numbers are not yet correctly formatted for their respective locale (e.g. "2.5mm" instead of "2,5mm" in german).
2014-08-27 14:46:46 +02:00
Gina Häußge
b78bb9e970 Make watched folder configurable via UI 2014-08-19 15:55:52 +02:00
Gina Häußge
d6959f64c3 Merge remote-tracking branch 'origin/staging' into staging 2014-08-14 16:56:53 +02:00
Aaron Bieber
c5dbc71db3 add serial types for OpenBSD
(cherry picked from commit a439dc4)
2014-08-14 16:55:00 +02:00
Gina Häußge
fbd9440711 Merge pull request #551 from qbit/devel
add serial types for OpenBSD
2014-08-14 16:37:36 +02:00
Aaron Bieber
a439dc4cd8 add serial types for OpenBSD 2014-08-14 08:23:22 -06:00
Gina Häußge
fe3a47f2d5 Resolved issue with tornado 4.0.1 (incompatibility between existing and custom http1connection implementation)
Compare #544 and #546. Pinned tornado version to 4.0.1 (since the change in this commit is not backwards compatible), dependency update is mandatory.
2014-08-13 20:07:02 +02:00
Gina Häußge
519429cebb Correctly check for null values and don't try to access non existing keys
Fixes #544
2014-08-13 09:46:52 +02:00
Gina Häußge
4aee779385 Added two file headers 2014-08-12 15:35:56 +02:00
Gina Häußge
7903119cb4 Removed unused code 2014-08-12 15:29:04 +02:00
Gina Häußge
af9a6a8a6e Don't overwrite query string of webcam URI
If there's a query already present, just append the timestamp to it with a & in between instead of creating a new query.
(cherry picked from commit 51c77be)
2014-08-12 09:54:25 +02:00
Gina Häußge
dffa00dc5e If a tool did not extrude anything, skip it in the filament usage summary
Also targets #539
2014-08-11 18:26:33 +02:00
Gina Häußge
6c5b32d92b New option to set default extrusion length in Control panel
Adds a new config key printerParameters.defaultExtrusionLength which can be configured via the settings dialog in the Printer section and then gets used to set the placeholder value on the extrusion/retraction control and as fallback if the user entered no value when clicking the Extrude/Retract button.

Closes #513
2014-08-11 17:37:26 +02:00
Gina Häußge
7d5c55fc95 Added sanity check for extruder selection in gcode files
Any T command targeting a number higher than the value specified in the settings for gcodeAnalysis.maxExtruders (defaults to 10) will be ignored and trigger a warning in the log file.

Fix for #539
2014-08-11 15:21:50 +02:00
Gina Häußge
0d5d28e4a6 Submit login form upon enter in password field, switch to password field upon enter in username field
(cherry picked from commit ff22ab0)
2014-08-08 17:13:53 +02:00
Gina Häußge
90e50db189 Also update the metadata correctly when an analysis finishes
Closes #476 for good
(cherry picked from commit 65624ed)
2014-08-08 17:13:41 +02:00
Gina Häußge
e9a7cad202 Made the navbar static instead of fixed to improve usability on mobile devices
This is just a hack really, the proper approach would be to finally move to a real responsive design, but this should prove as a valid workaround until that is realized.

Closes #257 for now.
(cherry picked from commit 02212bd)
2014-08-08 17:12:01 +02:00
Gina Häußge
60cf0b1099 Made the navbar static instead of fixed to improve usability on mobile devices
This is just a hack really, the proper approach would be to finally move to a real responsive design, but this should prove as a valid workaround until that is realized.

Closes #257 for now.
(cherry picked from commit 02212bd)
2014-08-08 17:10:42 +02:00
Gina Häußge
aefb72f7cc API version 1.0 is too early, we'll set it to 0.1 for now until it is really stable and not missing things like system commands and such
(cherry picked from commit 4d434d3)
2014-08-08 17:07:02 +02:00
Gina Häußge
4d434d36be API version 1.0 is too early, we'll set it to 0.1 for now until it is really stable and not missing things like system commands and such 2014-08-08 17:06:43 +02:00
Gina Häußge
f69abdcc14 Version resource on API with API and software version
(cherry picked from commit 907f505)
2014-08-08 17:04:31 +02:00
Gina Häußge
568fcbf547 Don't close serial port before switching to state "closed serial port"
Depending on what was happening in the monitoring thread this could lead to an attempt to write to the already closed port, logging an error and killing the interface in the process. Also fixed a timing issue in the state reporting towards the frontend, state updates and readings for clients are now wrapped in a mutex

Closes #492
(cherry picked from commit 11fb18f)
2014-08-08 16:58:38 +02:00
Gina Häußge
7028bbfbfd GCODE viewer now interprets inverted axes for printer control and mirrors print bed accordingly.
Should enable people to set their axes origin so that the viewer matches what they see on their printer.

Should close #431
(cherry picked from commit 030ffe6)
2014-08-08 16:55:05 +02:00
Gina Häußge
c552e9e9be Fixed a couple of issue with the gcode viewer
Most notably the interfering options tracked in #398, but also made "Center viewport on model" and "Zoom in on model" automatically deselect and de-apply if viewport gets manipulated by user, therefore properly allowing the re-select by the user to work to.

Closes #398
(cherry picked from commit f195af0)
2014-08-08 16:52:28 +02:00
Gina Häußge
f8e8914f7d Merge branch 'master' into staging
Conflicts:
	setup.py
	src/octoprint/server/ajax/control.py
2014-08-08 16:37:25 +02:00
Gina Häußge
f195af017e Fixed a couple of issue with the gcode viewer
Most notably the interfering options tracked in #398, but also made "Center viewport on model" and "Zoom in on model" automatically deselect and de-apply if viewport gets manipulated by user, therefore properly allowing the re-select by the user to work to.

Closes #398
2014-08-08 16:22:48 +02:00
Gina Häußge
6474f25253 Be able to cope with more types of SD card file list
Now only takes a look at the last contained item in a split for whitespace of the filename. If that's parseable as an integer, it's probably the size of the file and everything before that the filename. If not, the whole line is the filename, regardless of how many whitespace in contains in between.

 See #534
2014-08-08 12:20:46 +02:00
Gina Häußge
6d2851e742 Fixed a missing ; 2014-08-08 10:13:47 +02:00
Gina Häußge
11fb18f598 Don't close serial port before switching to state "closed serial port"
Depending on what was happening in the monitoring thread this could lead to an attempt to write to the already closed port, logging an error and killing the interface in the process. Also fixed a timing issue in the state reporting towards the frontend, state updates and readings for clients are now wrapped in a mutex

Closes #492
2014-08-07 18:07:19 +02:00
Bryan Mayland
e0b33799d5 Fix events with gcode command lists not firing 2014-08-07 09:23:50 -04:00
Gina Häußge
17d3d9deb7 Reverse proxy wrapper now supports configuration of the http headers to utilize for determining prefix and scheme
Introduced two new configuration settings, server.reverseProxy.prefixHeader and server.reverseProxy.schemeHeader to define the headers to evaluate for prefix and scheme to use respectively, also moved server.baseUrl and server.scheme to server.reverseProxy.fallbackPrefix and server.reverseProxy.fallbackScheme.

Also fixed SockJS URI as generated in index.jinja to include BASE_URL.

 Should do what PR #507 intended, but with less code duplication.
2014-08-07 13:34:58 +02:00
Gina Häußge
02212bde21 Made the navbar static instead of fixed to improve usability on mobile devices
This is just a hack really, the proper approach would be to finally move to a real responsive design, but this should prove as a valid workaround until that is realized.

Closes #257 for now.
2014-08-07 09:55:50 +02:00
Gina Häußge
86c6cda79a Stop customized RequestHandler from sending another set of headers after the response
This was causing the GET request for the list of files following directly after a successful response from an upload to get associated with the second empty response sent directly after the upload and such lead to a funny timing issue causing the file list not to update correctly since the response to THAT request -- while received by the client -- could then not be processed.

See #455
2014-08-06 16:21:32 +02:00
Gina Häußge
488eb1fac3 Also reset "otherRequestInProgress" if the request fails 2014-08-06 12:15:02 +02:00
Gina Häußge
3eab5503f1 And even more debugging 2014-08-06 11:22:46 +02:00
Gina Häußge
61f84302f3 More debugging 2014-08-06 10:41:42 +02:00
Gina Häußge
5dc0333580 First couple of print statements for debugging a Heisenbug 2014-08-06 10:18:23 +02:00
Gina Häußge
f2092ee89c Merge branch 'devel' into dev/largeFileUpload 2014-08-05 19:59:05 +02:00
Gina Häußge
d4e7c2e1b1 We actually do want to run the configured system commands on the shell, so set shell to True
Also includes a workaround for sarge bug no. 21

Closes #489
2014-08-05 19:03:04 +02:00
Gina Häußge
9d69951faa Fixed double file request after file upload causing autoscrolling to uploaded file to not work 2014-08-05 12:33:08 +02:00
Gina Häußge
2d68b6e589 Get default max body size from settings too 2014-08-05 11:37:50 +02:00
Gina Häußge
b4af85f405 Finalizing upload streaming support
Major refactoring of octoprint.server.util (divided into smaller submodules), extended Tornado to allow for request-specific max content lengths, introduced settings parameters to configure maximum upload size, maximum request body size and file suffixes

See #455
2014-08-05 11:26:13 +02:00
Gina Häußge
e9ca09da87 Introduced UploadStorageFallbackHandler which rewrites multipart file upload forms to store the contained files in temporary files (like nginx-upload), made the file upload API in OctoPrint utilize this 2014-08-04 14:45:46 +02:00
Gina Häußge
d770c20b5a Working streaming file upload for now 2014-08-03 18:53:10 +02:00
Gina Häußge
1ef9c617b3 Trying to get large file uploads to work 2014-08-02 10:24:41 +02:00
Gina Häußge
8aab0ee318 Should fix #529 2014-08-01 14:20:11 +02:00
Gina Häußge
f9d1086062 UI now displays last print time as approx. total print time if available, otherwise uses estimated print time if available
Closes #523
2014-07-31 18:16:53 +02:00
Gina Häußge
5e8a04e54d Merge pull request #481 from Salandora/bugFixes
Bug fixes
2014-07-31 10:10:21 +02:00
Gina Häußge
be99c59725 Properly handle exceptions other than a non-zero return code for slicing and timelapse rendering
Closes #508
2014-07-17 15:34:00 +02:00
Gina Häußge
f6e2a59008 Correctly handle GET requests on /api/printer/{tool|bed} when printer is not operational
Closes #515
2014-07-17 13:02:00 +02:00
Gina Häußge
65624ed77e Also update the metadata correctly when an analysis finishes
Closes #476 for good
2014-06-23 18:54:45 +02:00
Gina Häußge
6a3241fa0b Another try at fixing #476 2014-06-23 16:22:57 +02:00
Gina Häußge
ff22ab0026 Submit login form upon enter in password field, switch to password field upon enter in username field 2014-06-23 13:55:49 +02:00
Gina Häußge
907f5051e1 Version resource on API with API and software version 2014-06-23 13:31:31 +02:00
Gina Häußge
18162cf110 Versioning by versioneer: https://github.com/warner/python-versioneer/
(cherry picked from commit 285f464)
2014-06-22 01:12:06 +02:00
Gina Häußge
285f464b43 Versioning by versioneer: https://github.com/warner/python-versioneer/ 2014-06-22 00:41:03 +02:00
Gina Häußge
585bfba850 Merge branch 'master' into devel
Conflicts:
	src/octoprint/server/ajax/control.py
2014-06-21 20:19:49 +02:00
Gina Häußge
522eb40808 Documented SockJS interface, deprecated /api/state 2014-06-08 16:52:28 +02:00
Gina Häußge
fa8d4eff0f Merge branch 'jonnor/api-allow-cors' into devel 2014-06-07 18:00:49 +02:00
Gina Häußge
666a9ef0fa ACCESS_CONTROL_REQUEST_HEADERS => Access-Control-Request-Headers
While flask internally translates that just right back, this makes the implementation more readable since it matches the standard header name
2014-06-07 17:49:55 +02:00
Jon Nordby
014ea3eadc API: Clarify Access-Control-Request-Header handling
'headers' was a way too generic name, and the code structure implied
it was used in place of 'resp.headers' or 'request.headers', which is not the case.
Also add comment about the purpose of this code.
2014-06-07 14:42:58 +02:00
Gina Häußge
f7e1b39af9 Added checkbox to the settings dialog for CORS, also slight changes in the documentation 2014-06-07 13:21:54 +02:00
Jon Nordby
651a9d30ce API: Only allow cross-origin requests if explicitly enabled
To enable, set the key "allowCrossOrigin" under "api" in config.yml
No user interface for this option yet
2014-06-07 01:04:32 +02:00
Jon Nordby
0bd6005cb9 API: Allow cross-origin requests
When a REST API is called from within a browser page from a different domain,
the server needs to explicitly allow this. This makes the OctoPrint
API available also to other webapps, for instance those hosted on same network in hackerspace.
2014-06-07 00:27:19 +02:00
Gina Häußge
3ee745d79c Always send commands with checksum when printing 2014-06-05 21:23:07 +02:00
Gina Häußge
ec508f5224 And another place I forgot to adapt to the new sd file list format 2014-06-01 18:44:39 +02:00
Gina Häußge
1b9523f700 Forgot to adapt verifyFileExists to new sd file list format 2014-06-01 11:54:03 +02:00
Gina Häußge
ee31808522 Also support extended sd file list (including size in bytes) from printer
See also #486 where support for SD_EXTENDED_DIR format was requested between the lines ;)
2014-05-30 18:05:43 +02:00
Gina Häußge
7414c921f3 Forgot to add some files to git again, argh! 2014-05-29 17:41:46 +02:00
Gina Häußge
d1d6e8e11c Filename might be None, do not try to pass that to os.path.basename.
See #486
2014-05-29 13:09:29 +02:00
Gina Häußge
778f9039fb supportRepetierTargetTemp being true is a too broad expression, also check for TargetExtr or TargetBed on line
See #486
2014-05-29 13:04:51 +02:00
Gina Häußge
4904c184f7 Removed accidentally committed dummy error (for testing pnotify migration) 2014-05-29 13:02:56 +02:00
Gina Häußge
cbde819e07 Better error reporting for timelapse rendering and system commands, updated pnotify and added possibility to add a "more" section to notifications 2014-05-26 22:51:45 +02:00
Salandora
3d6cb623f0 Autodetect Baudrate bugfix 2014-05-26 10:46:47 +02:00
Salandora
47cfcd7b12 Event Progress bugfix 2014-05-26 10:45:55 +02:00
Gina Häußge
244128c7ed Merge remote-tracking branch 'origin/devel' into devel 2014-05-25 20:19:03 +02:00
Gina Häußge
9c9b98dde4 Properly detect current file, forgot to adjust detection stuff in upload API after renaming things in the job tracking.
Thanks to Bryan Mayland for spotting this.

Closes #476
2014-05-25 20:18:41 +02:00
Salandora
536e17eac4 Bug fix for Emergency Stop 2014-05-22 17:56:50 +02:00
Gina Häußge
7bba1dc944 Merge pull request #473 from Salandora/EmergencyBug
Emergency Stop should not only trigger an event but also at least cancel the print

Closes #448
2014-05-22 12:33:32 +02:00
Salandora
59c859fb17 Bug fix for Emergency Stop 2014-05-22 11:46:42 +02:00
Gina Häußge
faa0521428 Renamed folder "watchdog" to "watched" 2014-05-19 18:02:24 +02:00
Gina Häußge
8886b20c01 And also forgot to push one more file
Kids, never code while on a moving train with a flaky internet connection, you tend to miss important things...
2014-05-19 18:00:57 +02:00
Gina Häußge
4739c71ee0 Now using watchdog to monitor a "watchdog" folder for gcode or stl files being added
Use this to define a folder on your system from which to automatically import/move added files into OctoPrint.

Also now monitoring the uploads folder so that if files are removed externally during runtime, the metadata.yaml will be cleaned up.
2014-05-16 11:36:23 +02:00
Gina Häußge
030ffe6dce GCODE viewer now interprets inverted axes for printer control and mirrors print bed accordingly.
Should enable people to set their axes origin so that the viewer matches what they see on their printer.

Should close #431
2014-05-14 22:48:56 +02:00
Gina Häußge
da19ad7943 Static endpoint in tornado for fetching the current webcam snaphot (authenticated users/apikey only) 2014-05-14 22:22:04 +02:00
Gina Häußge
e7088ef06c Added automatic migration of old event subscription format to the new one 2014-05-14 12:59:57 +02:00
Gina Häußge
92c7f886df Removed accidentally committed logging message 2014-05-14 09:36:20 +02:00
Gina Häußge
59727875db Only interpret stand alone T{n} as a tool change command
Compare https://groups.google.com/forum/#!topic/octoprint/X8t1btetMmg
2014-05-14 09:19:50 +02:00
Gina Häußge
98063422de Changed file search a bit (instant search) and made scroll bar adjust directly when file list changes 2014-05-13 17:59:24 +02:00
Gina Häußge
4ce4786a58 Also forgot to add md5 js lib 2014-05-13 16:26:41 +02:00
Gina Häußge
3eb9714e68 Forgot to add slimscroll jquery plugin 2014-05-13 16:25:56 +02:00
Gina Häußge
ee64dc38f6 Upgraded Font Awesome and introduced new file list 2014-04-28 22:11:56 +02:00
Gina Häußge
deb38f8455 Fixed an embarrassing merge error from waaay back. Didn't disrupt operation but caused funny error messages in the log.
Thanks to @nophead for reporting this.

Closes #433
2014-04-18 14:28:52 +02:00
Gina Häußge
73f0b9dabd Always interpret negative duration as 0.
Negative durations, especially for print time left, might arise if estimation is estimating less than current print time. So we just erase that margin of error in the UI.

Closes #435
2014-04-18 14:21:27 +02:00
Gina Häußge
9ab4fa608a Corrected typo for print bed command "offset", expected parameter is called "offset" not "offsets"
Compare #444
2014-04-18 14:03:38 +02:00
Gina Häußge
bf9d5efe43 Decrease image counter if an image could not be captured from webcam
Should keep rendering of timelapse from breaking if only a couple of images couldn't be captured due to whatever reason. Suggested by @midopple in #344
2014-04-01 22:32:10 +02:00
Gina Häußge
7b56b36564 Merge branch 'devel' into imrahil-print_time 2014-04-01 22:24:34 +02:00
Gina Häußge
6e107e6368 Start counting the layers at 1 instead of 0 in the gcode viewer.
Fixes #424
2014-04-01 22:18:35 +02:00
Gina Häußge
1a7a468eb6 Better error handling for capture issues during timelapsing
Should help debugging issue #425 and any future problems in that area.
2014-04-01 20:40:55 +02:00
Jarek Szczepanski
13e6070dd9 Added last print time to popover on file list 2014-03-31 13:14:18 +02:00
Gina Häußge
8cc8e45afd Logging is now configurable via config-file 2014-03-31 12:16:42 +02:00
Gina Häußge
e373cde4f7 Some more work on the REST API documentation & set Location header on file upload response 2014-03-24 22:50:56 +01:00
Gina Häußge
072079df05 Further work on the REST API, documented most of /api/printer and while at it also fixed #365 2014-03-24 18:27:43 +01:00
Gina Häußge
22614f09a0 Merge branch 'devel' of github.com:foosel/OctoPrint into devel 2014-03-22 22:39:38 +01:00
Gina Häußge
c858c8f75b Small adjustments to #407
- Refactored drawGrid into two functions drawRectangularGrid and drawCircularGrid
- Made sure grid for circular beds always "starts" at (0,0) so that e.g. for a radius of 105mm the center of the bed will be on the grid lines
- Made center on circular bed be better visible by making origin lines thicker
- Made initial focus on bed center properly
2014-03-22 22:36:11 +01:00
Gina Häußge
ba7d0a60e4 Merge branch 'devel' into nullie-circular-beds 2014-03-22 20:39:42 +01:00
C-o-r-E
619fe9a0e7 Fix error where API state is requested and printer is offline 2014-03-17 23:04:57 -04:00
Gina Häußge
64dacc7c70 Merge remote-tracking branch 'origin/devel' into devel 2014-03-15 20:36:56 +01:00
Gina Häußge
f7c75442e7 Merge branch 'master' into devel
Conflicts:
	src/octoprint/server/api/settings.py
	src/octoprint/settings.py
	src/octoprint/static/js/app/viewmodels/settings.js
	src/octoprint/util/comm.py
2014-03-15 20:36:35 +01:00
Gina Häußge
293611287e New setting for repetier to always assume SD card is present (since firmware does not report whether initialization succeeded via explicit message)
Fixes #289
2014-03-15 16:30:29 +01:00
Gina Häußge
254c3814d5 Merge pull request #415 from nullie/fix-temperature-table-size
Revert "Add box-sizing: border-box to temperature table th. Should fix #...
2014-03-14 16:50:39 +01:00
Gina Häußge
44c1920d9b Merge pull request #414 from nullie/fix-actual-column-style
Fix style attribute for Actual column header, should fix #412
2014-03-14 16:17:07 +01:00
Ilya Novoselov
109372d10b Fix style attribute for Actual column header, should fix #412 2014-03-14 21:01:04 +06:00
Ilya Novoselov
94847b846b Revert "Add box-sizing: border-box to temperature table th. Should fix #412"
This reverts commit 54b01d30da.
2014-03-14 20:47:56 +06:00
Ilya Novoselov
54b01d30da Add box-sizing: border-box to temperature table th. Should fix #412 2014-03-14 16:52:07 +06:00
Gina Häußge
0509eb3f0a Merge branch 'master' into devel
Conflicts:
	setup.py
	src/octoprint/gcodefiles.py
	src/octoprint/printer.py
	src/octoprint/server/ajax/control.py
	src/octoprint/server/ajax/gcodefiles.py
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/static/js/app/main.js
	src/octoprint/util/comm.py
2014-03-13 20:25:33 +01:00
Gina Häußge
d7e37cf658 origin is "sd" for files from the SD card, not "sdcard".
Fixes #411
2014-03-13 20:15:29 +01:00
Ilya Novoselov
b81a4b6d5e Should resolve #402 (only for cicular beds) 2014-03-11 21:16:36 +06:00
Gina Häußge
bdade99837 Operate on current transformation matrix when zooming
Closes #398
2014-03-10 18:54:18 +01:00
Gina Häußge
29be139803 Do not overwrite possibly existing target temp if only a single hotend is present
See #360
2014-03-10 14:40:01 +01:00
Gina Häußge
ca8779676c Added configurable timeout settings for temperature and sd status query, made communication timeout reset everytime a non-empty line is received from the printer 2014-03-10 13:52:09 +01:00
Gina Häußge
ee03d62997 Fixed M110 and sd status reporting on virtual printer 2014-03-10 13:13:03 +01:00
Gina Häußge
e068012cfb Fixed a regex matcher
(cherry picked from commit 8fbb304)
2014-03-10 13:04:47 +01:00
Gina Häußge
8fbb30437c Fixed a regex matcher 2014-03-10 13:04:12 +01:00
Gina Häußge
9396ed765c Virtual printer now supports "repetier style" target temperature reporting 2014-03-10 11:26:29 +01:00
Gina Häußge
d7f2075b1d Only list those SD files that have a ASCII filename
According to the RepRap protocol we should actually not ever get anything other than those anyways, as the protocol is defined as ASCII-only. In the future there might be a way to somehow handle such files too, for the time being this fixes issues though where non-ascii files on the SD made the whole SD file handling not work.

 Closes #381
(cherry picked from commit b115b6f)
2014-03-09 13:53:39 +01:00
Gina Häußge
e5ac94a16f Merge branch 'master' into staging
Conflicts:
	run
	src/octoprint/util/comm.py
2014-03-09 13:47:49 +01:00
Gina Häußge
2be05d4f9a Do not try to send bed temp on API if not available 2014-03-09 13:43:59 +01:00
Gina Häußge
f3ee2d2bfd Fix for saved timelapse configs vs. new post roll setting
See #384
2014-03-05 21:57:27 +01:00
Gina Häußge
f580acaf70 Added post roll to timelapse
You can now define an amount of seconds that should be added to the rendered timelapse (so, since the current fps setting is 25 frames per seconds, 25 * the configured amount of post roll seconds images will need to be captured).

Timed timelapses add this to the actual run time of the timelapse capturing process (so if you configure 1s post roll, a timed timelapse will run 25s longer than the print)

Z-triggered timelapses just create one last capture from the webcam and use this image again and again (so 25 times for a post roll of 1s).

Implements #384
2014-03-05 20:52:25 +01:00
Gina Häußge
27322a971f Also support repetier target temperature output
Should fix #360
2014-03-03 23:04:36 +01:00
Gina Häußge
8b5d6c9367 Changed handling of bed temperatures
Will now be left unset if not detected (instead of dying a horrible death), modified frontend to not display bed settings in such cases. While at it also (hopefully) fixed "Target: off" for bed issue.

TODO: Support repetier's "TargetBed:", "TargetExtr%n" syntax

Fixes #399, partially solves #360
2014-03-03 22:34:09 +01:00
Gina Häußge
9b031ff9d3 Hopefully fixed a race condition that could occur when pressing "Print" (file not opened yet, but comm layer tries to fetch next command) 2014-03-03 15:25:42 +01:00
Gina Häußge
de59e8aa56 Fixed temperature graph again after changes from last night 2014-03-03 09:53:34 +01:00
Gina Häußge
850aa5b797 Renamed compiled regexes to match the new naming scheme 2014-03-03 09:35:43 +01:00
Gina Häußge
9107fd839b Extracted all used regexes in the comm layer and precompiled them
Possible improvement of #390

(cherry picked from commit 89cae22b91)

Conflicts:
	src/octoprint/util/comm.py
2014-03-03 09:20:59 +01:00
Gina Häußge
82ee48b166 Settings for bed dimension (PR) and extruder offsets
Changed the bed dimension PR slightly to use a computed property instead of two separate values and only a computed reader, added options for extruder offsets.
2014-03-02 22:15:19 +01:00
Gina Häußge
17f3c5777e Merge branch 'devel' into Salandora-settings 2014-03-02 22:13:03 +01:00
Salandora
2cb787f816 remove unused Variables 2014-02-28 16:49:07 +01:00
Salandora
feba135cac Bed Dimensions in Printer Settings 2014-02-28 16:48:07 +01:00
Gina Häußge
45c9e75e4e Slight refactoring of a PR
Corrected indentation, removed jumpy cursor, fixed off-by-one errors on history limits, limited history to a maximum of 300 entries ("300 items of command history should really be enough for anybody!")
2014-02-24 21:57:02 +01:00
Gina Häußge
586a7a85e3 Merge branch 'devel' into chriskoz-terminalHistorySupport 2014-02-24 19:11:33 +01:00
Gina Häußge
f844bd99c7 Properly authenticate log file downloads on Tornado as well
Only allow for users with role admin.
2014-02-24 14:13:55 +01:00
Gina Häußge
ace102e1c1 Added API documentation, adjusted API and returned data model slightly to be consistent with other parts of the API, made log file management restricted to admins.
TODO: Make downloading of logs also restricted to admins
2014-02-24 09:57:51 +01:00
Chris Kosmakos
b976461c29 minor cleanup on command history. removing unneeded var. 2014-02-23 19:02:00 -08:00
Gina Häußge
ad7243844e Merge branch 'devel' into Salandora-logDownload 2014-02-23 13:33:31 +01:00
Gina Häußge
4a6a458cdd Removed unused parts from backend code, moved formatting to frontend, added date column, switched to modification date (might be more interesting in case of the log files) 2014-02-23 12:25:46 +01:00
Gina Häußge
197d46b511 Fixed indentation 2014-02-23 11:17:29 +01:00
Salandora
cf25d3d7be Moved Log tab to Settings 2014-02-20 18:08:21 +01:00
Chris Kosmakos
036e0af960 added basic terminal command history
use up/down keys to navigate through command history.
2014-02-20 10:46:22 +00:00
Gina Häußge
b115b6f66c Only list those SD files that have a ASCII filename
According to the RepRap protocol we should actually not ever get anything other than those anyways, as the protocol is defined as ASCII-only. In the future there might be a way to somehow handle such files too, for the time being this fixes issues though where non-ascii files on the SD made the whole SD file handling not work.

 Closes #381
2014-02-17 10:25:40 +01:00
Gina Häußge
592f3dce9a Bugfix: Do not run gcode analyzer when a print is ongoing
Evaluate active flag on gcode analyzer AFTER fetching an item from the work queue, otherwise it will always start working once it finds something if the active flag was true once but then switched to false while the queue was still empty.

Thanks to @Salandora for spotting this.

Fixes #357
2014-02-15 10:26:39 +01:00
Gina Häußge
bcef0dd2c5 Merge remote-tracking branch 'origin/devel' into devel 2014-02-15 10:02:05 +01:00
Gina Häußge
3f86272913 There's now a different mechanism in place to prevent mobile browsers from crashing on large gcode files being visualized 2014-02-15 10:00:14 +01:00
Gina Häußge
322834b762 Moved "Less scary error message" patch to new location 2014-02-15 09:58:52 +01:00
Gina Häußge
04ddf30167 Merge branch 'devel' into jamesgao-devel
Conflicts:
	src/octoprint/server.py
2014-02-15 09:58:11 +01:00
Gabe Rosenhouse
a630b74fa8 fix crash when getStartTime() returns None 2014-02-14 21:04:23 -08:00
Salandora
c5c382ade6 Log tab added to download and remove logs 2014-01-27 09:35:51 +01:00
Gina Häußge
858873dfa0 Also provide the filename (basename without the path) in print events 2014-01-20 15:33:08 +01:00
Gina Häußge
7231acc236 Couple of multi extruder related fixes
- also recognize such temperature reports that do not contain a "T:" but a "T0:" (should help with parts of #345)
- properly parse temperature commands to track target temp during slow heatup
- for the former point, also keep track of the currently selected tool
- simulate heatup and replies without "T:" in virtual printer (to test all this)
- also auto-caps T commands in terminal
2014-01-11 15:15:46 +01:00
Gina Häußge
565757580b TransferDone and SlicingDone events should also carry the seconds of elapsed time as a float instead of a (rounded) string 2014-01-09 21:06:03 +01:00
Gina Häußge
620d7de02f Added time needed for printing file to PrintDone event's payload
Fixes #333
2014-01-09 20:59:40 +01:00
Gina Häußge
bba625a68f Also recognize --iknowwhatimdoing when running as daemon
Fixes #337
(cherry picked from commit 417487e)
2014-01-09 20:07:27 +01:00
Gina Häußge
417487e195 Also recognize --iknowwhatimdoing when running as daemon
Fixes #337
2014-01-09 20:04:08 +01:00
Gina Häußge
fba48b1d90 Do not reset extrusion amount in UI
Fixes #340
2014-01-09 19:59:21 +01:00
Gina Häußge
78f62847a3 Changed payload format of error event 2014-01-09 19:58:10 +01:00
Gina Häußge
3bfaa33c58 Don't prefix tool number for temperature command when only one extruder is present
Temporary workaround for #341
2014-01-08 19:32:04 +01:00
Gina Häußge
d0cb119bb0 A bit more error resilience for handling data received from the backend
See #339
2014-01-06 18:00:14 +01:00
Gina Häußge
3fc6b1e8cf If no tool offset is defined for the current extruder, just assume 0 instead of dying
Hopefully this fixes #339
2014-01-06 17:52:05 +01:00
Gina Häußge
ae06af9bc5 Make sure we always have color to draw lines with 2014-01-06 15:16:15 +01:00
Gina Häußge
260a378e8c Don't disable gcode viewer upon reset of connection 2014-01-06 11:16:10 +01:00
Gina Häußge
94e052af83 Set all heaters to off upon cancel of print job 2014-01-06 11:11:59 +01:00
Gina Häußge
d56ab9b79b Forgot a file... again 2014-01-06 00:17:09 +01:00
Gina Häußge
ad556e7413 More work on the GCode viewer
- confirmation dialog when trying to visualize large files (different threshold for mobile and "regular" devices, configurable of course, although only via config file right now) - should also help a bit with issues leading to #215
 - proper clearing of the viewer area when reconnecting to the backend (e.g. after server restart)

 Also all of this plus previous commits closes #35
2014-01-06 00:16:33 +01:00
Gina Häußge
b9f49a83e0 Refetch file list when deleting a file
See #338
2014-01-05 21:01:58 +01:00
Gina Häußge
ebec2c95c0 Some small fixes. 2014-01-05 14:42:01 +01:00
Gina Häußge
d62627c8a5 Made zooming on model work too 2014-01-05 13:22:42 +01:00
Gina Häußge
96d2c7fad9 Lots of changes:
- GCODE viewer now supports multiple extruders and configurable bed sizes
- GCODE viewer also now based on callbacks and config injection instead of dependence on elements in the embedding website
- Switched GCODE viewer to bootstrap-slider for the layer/command sliders, patched bootstrap-slider a bit up (TODO: PR to upstream)
- GCODE interpreter in backend also calculates filament usage for all extruders
- More consequent use of LESS, switched bootstrap to LESS source to have access to variables and mixins, introduced config setting to switch between usage of compiled CSS (checked in as well) or LESS, defaults to CSS
2014-01-05 11:23:44 +01:00
Gina Häußge
3aac75f5b5 Added pusher.color.js 2014-01-01 02:40:17 +01:00
Gina Häußge
908d39ad39 Refining temperature control REST API, also added support for multi extrusion while at it 2014-01-01 02:39:35 +01:00
Gina Häußge
084ffb0dc1 Multi extruder support for GCODE viewer
Filament usage calculation per layer is still buggy though
2014-01-01 02:37:44 +01:00
Gina Häußge
cec2bdb805 Send completion percentage as float (incl. available decimals) 2013-12-25 23:39:51 +01:00
Gina Häußge
a0374cb4ea Hopefully fixed the issue where the /printer/... part of the api wouldn't be loaded
I'm still not happy with that circular import stuff I'm currently doing... there must be a better way to better split stuff built with flask? To investigate...
2013-12-22 18:29:12 +01:00
Gina Häußge
538338abfe More work on the API + documentation
Changed some endpoints again (removed "/control" path element) and made API spit out only raw data (e.g. seconds, millimeters, unix timestamps etc) instead of formatted versions. Modified frontend to take care of formatting this data itself.
2013-12-22 02:01:48 +01:00
Gina Häußge
64084bb628 A couple of manual merges... 2013-12-21 15:51:32 +01:00
Gina Häußge
df269eb4f7 More intelligent handling of disabling and re-enabling the webcam stream.
See #314
(cherry picked from commit 1dd0aba)
2013-12-21 14:52:06 +01:00
Gina Häußge
722b03dca8 Disable webcam stream when control tab is not in focus.
Fixes #316
(cherry picked from commit 1b4a7c7)
2013-12-21 14:51:53 +01:00
Gina Häußge
3ddfc93c1b Use G28 for homing (G1 was a copy-paste-error)
Fixes #314
(cherry picked from commit 5b8126a)
2013-12-21 14:51:43 +01:00
Gina Häußge
5eb70fa57d Properly calculate time deltas (forgot the days)
(cherry picked from commit 84012d1)
2013-12-21 14:50:46 +01:00
Gina Häußge
eccc9d6fbd WARNING: A lot of changes to the existing API and the event system.
This WILL break existing API clients and probably some event handlers too. I'm sorry for the disruptive changes, but I needed to rectify some decisions before they went too far utilized elsewhere to still be corrected.

 Basically this change completely removes the old API and switches it (same endpoint) with the new one, that's basically the existing AJAX API that the client uses, but way more RESTful and based on JSON (exception being the file upload).

 The event system has been revamped to carry more payload data (and in an extensible form as dictionary, to allow for later addition of attributes to single events), with the existing event listeners adjusted to also allow users to make use of this data in their consumers.

 Documentation has been greatly enhanced for the REST API (and is still being added to), the events will be documented here as well.
2013-12-21 14:46:20 +01:00
Gina Häußge
049ed723a7 Merge branch 'revampedEvents' into devel 2013-12-21 13:01:29 +01:00
Gina Häußge
09bed4e74f Started documenting OctoPrint's REST API 2013-12-15 18:45:38 +01:00
Gina Häußge
7a8e71b837 Fixed api_access decorator 2013-12-14 17:48:06 +01:00
Gina Häußge
90336277a7 Fixed refresh of SD file list
Closes #326
2013-12-14 10:11:27 +01:00
Gina Häußge
0b662b7211 Revamped the events slightly
Payload data can now be properly injected into event handlers such as command triggers. Added a couple of new events to use for update triggers to the frontend instead of custom code, further decoupling the application. Movie rendering now also causes a frontend notification.
2013-12-02 17:04:00 +01:00
Gina Häußge
9f7fc73441 data["print"] is now a boolean, so we don't need to check against valid_boolean_trues anymore but can use it directly instead
Fixes #317
2013-11-25 16:54:44 +01:00
Gina Häußge
677d33e448 Fixed sending of command again. Also now make g and m codes appear in uppercase automatically. 2013-11-25 11:46:24 +01:00
Gina Häußge
1dd0aba8f5 More intelligent handling of disabling and re-enabling the webcam stream.
See #314
2013-11-24 17:33:05 +01:00
Gina Häußge
1b4a7c7896 Disable webcam stream when control tab is not in focus.
Fixes #316
2013-11-24 16:55:14 +01:00
Gina Häußge
5b8126ae17 Use G28 for homing (G1 was a copy-paste-error)
Fixes #314
2013-11-24 13:12:02 +01:00
Gina Häußge
84012d1232 Properly calculate time deltas (forgot the days) 2013-11-20 22:00:47 +01:00
Gina Häußge
e690053fd4 Added user apikeys, made ajax api available via apikeys, restified ajax api (WIP) 2013-11-19 22:53:26 +01:00
Gina Häußge
ae3e474c92 Fix relative path to git root 2013-11-18 13:35:40 +01:00
Gina Häußge
297d101f5f Only apply the temperature offset if the temperature being set from the GCODE isn't 0 ("heaters off") 2013-11-18 11:35:38 +01:00
Gina Häußge
4d2213544e Made metadata saving for gcode files more error resilient (hopefully that is) 2013-11-15 20:54:13 +01:00
Gina Häußge
895d077d85 Refactored parts of comm.py to reduce length of _monitor 2013-11-11 22:03:15 +01:00
Gina Häußge
35b010b059 Better fitting error message when opening a known serial port fails (e.g. due to permission problems), auto detection errors now got their own message
Fixes #294
2013-11-10 20:29:37 +01:00
Gina Häußge
fdfa433243 Fixed #296 2013-11-10 18:55:36 +01:00
Gina Häußge
aa69d181bf Fixed load API 2013-11-10 17:31:55 +01:00
Gina Häußge
e9f218208d Merge remote-tracking branch 'origin/devel' into devel 2013-11-09 20:30:04 +01:00
Gina Häußge
8ca3baee04 Fixed a couple of things with the new blueprints, should work now 2013-11-09 20:26:18 +01:00
Gina Häußge
3c68353c57 Merge pull request #293 from tonnerre/sane-ulimit
Don't give everyone write access to octoprint data.
2013-11-04 09:22:32 -08:00
Gina Häußge
fe37ab3cd8 Refactored server.py into submodules, extracted ajax and rest api into their own blueprints, and while doing all this also took care of #291 2013-10-28 22:08:36 +01:00
Tonnerre LOMBARD
f7f8c09a77 Actually, umask 002 is what we want here. 2013-10-27 02:39:29 +02:00
Tonnerre LOMBARD
37c949e83b Currently, octoprint gives write access to all files in its data
directory to everybody.

This was probably considered appropriate for the case of octoprint
running on a single-user device, but given that Unix has groups
support, it is not necessary, and can be very harmful.
2013-10-27 02:32:14 +02:00
Tonnerre LOMBARD
b35258fad6 Remove the version name from the minified less.js version. 2013-10-26 23:28:38 +02:00
Gina Häußge
1a6030c737 Added missing docstring 2013-10-21 10:29:59 +02:00
Gina Häußge
9008a2fb7f Moved axes inverting to printer settings, changed naming and data format a bit 2013-10-20 22:22:58 +02:00
Gina Häußge
47f8ab24d9 Introduced event queue to properly decouple event processing from firing 2013-10-20 22:21:42 +02:00
Gina Häußge
4b41a47f93 Merge branch 'CapnBry-invertany' into devel
Conflicts:
	src/octoprint/templates/settings.jinja2
2013-10-20 15:28:18 +02:00
Gina Häußge
edd801aa7b Only process gcode files during backlog processing (compare #268) 2013-10-20 15:05:22 +02:00
Gina Häußge
ef8787acf9 Removed obsolete GcodeLoader in printer module
(cherry picked from commit a7eb5f6493)
2013-10-20 15:03:14 +02:00
Gina Häußge
29a9ee40d5 SwallowOkAfterResend isn't repetier only anymore
(cherry picked from commit 48f5a44)
2013-10-20 14:53:31 +02:00
Gina Häußge
4094d28c07 Make swallowOkAfterResend default to True, part of the fix for #166
(cherry picked from commit 5a6cd58)
2013-10-20 14:52:37 +02:00
Gina Häußge
3b56cdaaa3 Unbind old click handlers from confirmation dialog before use.
Fixes #279
2013-10-13 19:38:04 +02:00
James Gao
4581722bbe Less scary message with Ctrl-C, remove gcode viewer for android 2013-10-09 11:22:40 -07:00
Bryan Mayland
2afd715f77 Move the Invert Controls checkboxes to the bottom of the settings dialog
Also replace my tabs with space. We're doing spaces instead of tabs now?
Maybe just for html.
2013-09-26 09:44:33 -04:00
Bryan Mayland
8d78104be8 Allow inverting of any control axis from the webui, not just Z
Users who have already set the "invert Z" option must re-enable the
setting as the storage of the option has changed.
2013-09-26 09:41:09 -04:00
Gina Häußge
076c6764a0 Properly restart sd prints
Fixes #258
2013-09-23 21:57:54 +02:00
Gina Häußge
8ff48ed88d Moved filetype decision stuff into gcodefiles module 2013-09-23 21:36:12 +02:00
Gina Häußge
4b05f125a0 Changed SD filename generation, made SD handling more reliable as a whole (cherry picked from commit 717ec041) 2013-09-23 18:40:46 +02:00
Gina Häußge
df05a80201 Do not crash if SD card fails in firmware 2013-09-22 22:14:46 +02:00
Gina Häußge
6b2912b0e2 Changed renaming to sd filenames to also work properly with very short names (and names with more .) as at least Marlin seems to hiccup on something like "file.gco.gco" 2013-09-22 16:04:36 +02:00
Gina Häußge
4ea2345eda Added .g to the allowed extensions for file uploads 2013-09-22 15:31:55 +02:00
Gina Häußge
a7477e0184 Added option to invert Z axis controls 2013-09-22 12:52:39 +02:00
Gina Häußge
6492ab66b0 Workaround for issue described in #250 2013-09-16 22:28:21 +02:00
Gina Häußge
51ae782f02 Moved octoprint sources to "src" folder, adjusted setup.py and run script accordingly 2013-09-15 21:45:33 +02:00