Commit graph

1438 commits

Author SHA1 Message Date
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