Commit graph

61 commits

Author SHA1 Message Date
Gina Häußge
1ea0cf9213 Always reset the job data on disconnect
If former state was "Printing", so far the full disconnect state handling
wasn't done properly.
2016-02-16 09:52:56 +01:00
Gina Häußge
d267a752cd Capture NoSuchStorage error on SD card fails
We currently do not have a storage configured for SD card since
that hasn't yet been ported to the storage interface. So on an
SD card fail we need to capture that error when attempting to log
the print recovery data, or there will be issues processing
the cancel properly. A bit more of error handling is a good
idea here in any case too.

Fixes #1226
2016-02-16 09:13:22 +01:00
Gina Häußge
9e8b5312d5 Persist print recovery data on print failures 2016-02-08 12:47:13 +01:00
Gina Häußge
2b4a985d85 Assume the presence of a heated bed in the default profile 2015-12-07 11:04:09 +01:00
Gina Häußge
a731f748d9 Moved existing hidden file checks to utilize octoprint.util.is_hidden_path 2015-11-20 10:02:06 +01:00
Gina Häußge
5c8d9007f6 Fixed some missing exception capturing
(cherry picked from commit 2f86a6a)
2015-10-23 13:36:27 +02:00
Gina Häußge
91163dc4f4 Fixed existing doctests, added some new ones, enabled doctests in nosetests
(cherry picked from commit 02c3bf8)
2015-10-23 13:36:18 +02:00
Gina Häußge
57bf457d97 Fix: current filename in job data should never be prefixed with /
That was a tiny detail missing in 8bef18c2a8 that
caused issues with detecting which file was currently selected on the printer's
SD card (for "do not delete that" checks on the API).
2015-10-22 13:42:57 +02:00
Gina Häußge
947f4c89cc Fixed a win-only issue causing the gcode view not to reload on file modification 2015-10-07 18:52:18 +02:00
Gina Häußge
7f2e0161a8 atomic_write context to save configs first to temp file, then move
Should prevent corruption of files
(cherry picked from commit c6d0290)
2015-08-24 14:56:12 +02:00
Thomas Hou
8bbb642a56 fixed bug: when new job start, job progress is last 100%.
(cherry picked from commit 200ad3b)
2015-07-29 09:19:44 +02:00
Gina Häußge
0c54eaf176 Fix: Use Exception, not BaseException
Custom exception should be derived from Exception, not BaseException.

Not only is this specified in the python documentation, but also
tornado will be able to handle Exceptions in requests perfectly fine
and return an HTTP 500 for them, but crash hard (as in, server shut
down follows) for BaseExceptions.
(cherry picked from commit 29b047b)
2015-06-28 02:24:47 +02:00
Gina Häußge
fa57f160dc Log cancelled prints only once
Thanks to @imrahil for the headsup
2015-05-13 14:00:12 +02:00
Gina Häußge
f19d0f0360 Base cut off point for temperature graph on timestamps instead of data points
Cut off of the temperature graph is now not based on the number of data points any more but on the actual time of the data points. Anything older than ``n`` minutes will be cut off, with ``n`` defaulting to 30min. This value can be changed under "Temperatures" in the Settings

Closes #343
2015-05-05 18:18:55 +02:00
Gina Häußge
0ef66c74b0 Fix: Corectly send origin center for circular volumes
Also added more logging in case of invalid profile detection.
2015-05-04 11:27:25 +02:00
Gina Häußge
fcdb556f3b Made autodetection more robust and fixed it not running if a preset for a baudrate existed
Thanks @Salandora
2015-04-30 17:25:52 +02:00
Gina Häußge
fb5aaffdc1 Added a "fake ack" button to terminal tab, as counter measure for lost "ok"s
In case an ok gets lost on the line, this allows to have the communication between
OctoPrint and the printer take up again.
2015-04-27 18:13:39 +02:00
Gina Häußge
3ebc6f0f1d Fix: Reselect current printer profile if it was updated and deny deleting the current printer profile 2015-04-24 12:05:38 +02:00
Gina Häußge
88af79509f Delect selected files upon comm disconnect in the printer handler
Should solve #861
2015-04-22 11:42:41 +02:00
Gina Häußge
cd244f341d Small fixes prior to merge of #852
* Proper origin visualization in gcode viewer for centered rectangular
   * Validation of origin profile entry
   * Auto-migration of existing profiles upon load
   * Added changelog entry
2015-04-16 15:20:18 +02:00
Mark Walker
5a27ab6e54 Move the centered option into printer volume
Also, modify the cura slicer to recognize the setting and avoid
adjusting the model position, just leave it in the center where it would
be on a circular platform
2015-04-15 04:05:48 -07:00
Mark Walker
a4df56dcb7 Undo so we can go another way 2015-04-15 04:04:34 -07:00
Mark Walker
fbe50e33d3 Add a printer profile option to allow centered origin on rectangular
beds

Some printers have (0, 0) at the center of the bed.  Circular beds
commonly, but also some rectangular beds.
2015-04-15 02:33:31 -07:00
Gina Häußge
8ff0096eb6 Fix & Docs: Plugins may only have one mixin implementation
Multiple mixins are allowed of course. Allowing multiple implementations lead to too many problems due to plugin names for referring to the APIs of SimpleApiPlugins or the assets of AssetPlugins.

 Hence __plugin_implementations__ has been deprecated in favor of __plugin_implementation__. The plugin subsystem will automatically copy the first implementation from __plugin_implementations__ to __plugin_implementation__ and log a deprecation warning.

 Adjusted documentation accordingly. Also added docs for helpers.
2015-03-30 16:50:06 +02:00
Gina Häußge
9b3daeea01 Exception.message => str(Exception) 2015-03-26 12:04:05 +01:00
Gina Häußge
aa0e7a6dd3 Fixed `/api/printer` which wasn't adapter yet to new internal offset data model 2015-03-18 15:54:06 +01:00
Gina Häußge
22c73d831a More cleanup for the feedback controls
Preprocessing for better performancy, unit tests for preprocessing, controls don't need a type anymore (makes things way less complicated and repetitive)
2015-03-10 21:49:18 +01:00
Gina Häußge
dee205fc2f Fixed octoprint.printer.standard.select_tool
Was expecting integers although it does get a tool identifier. Also fixed docs accordingly.
2015-03-06 16:54:41 +01:00
Gina Häußge
aecc7a4734 Added triggering GCODE scripts to the REST API and custom controls 2015-03-06 16:04:43 +01:00
Gina Häußge
d447308ef0 Even more documentation of the internal modules 2015-03-06 01:42:49 +01:00
Gina Häußge
975cc5ccfc GCODE scripts are now Jinja templates
Refactored some things in octoprint.util.comm and octoprint.settings, added migration function to get users of the devel version up to date with their gcode scripts. Migration function will be removed again one week from now.
2015-03-06 01:42:09 +01:00
Gina Häußge
88ac1974d1 Time estimation for SD printing needs less strict thresholds 2015-03-04 20:41:10 +01:00
Gina Häußge
f0b2f6d509 Fix: Display full name currently selected SD file
Wrong truncation caused first character to be missing
2015-03-04 20:39:36 +01:00
Gina Häußge
333c9ba205 Refactoring of "printer" modules
- renamed methods from camelCase to snake_case
- renamed callback mathods from comm module from camelCase to snake_case
- extracted and documented public interface to be used by plugins
- extracted callback interface to be implemented by subscribed callbacks to printer
 - moved standard implementation to custom package
 - moved time estimation classes to custom package
2015-03-03 17:01:33 +01:00
Gina Häußge
c3834c16fa Merge branch 'devel' into dev/gcodeScripts
Conflicts:
	CHANGELOG.md
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/js/app/viewmodels/timelapse.js
	src/octoprint/util/comm.py
2015-03-01 14:11:43 +01:00
Gina Häußge
cd3ead3f30 More documentation 2015-02-27 20:28:24 +01:00
Gina Häußge
c76b84e1be Fixed file not found error when selecting a local file for printing
Introduced by 8bef18c2a8

Reported in #788
2015-02-27 01:37:37 +01:00
Gina Häußge
8bef18c2a8 Fix handling of SD card files in folders
OctoPrint got confused by prepended / in files on printer's SD cards
located within folders.

New handling makes comm always use absolute path names for SD card
file names (even those in the root), printer converts between
this representation and the storage interface compatible version
of file and folder names being stated relative to the root (so
no leading /)
2015-02-26 18:24:10 +01:00
Gina Häußge
e19b0d2a49 Merge branch 'devel' into dev/gcodeScripts
Conflicts:
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/js/app/main.js
	src/octoprint/static/js/app/viewmodels/settings.js
2015-02-24 09:32:46 +01:00
Gina Häußge
4abcf1054b Added controls for changing feed and flow rate factors to Controls tab
Closes #362
2015-02-22 21:20:56 +01:00
Gina Häußge
1e6679c40c Corrected some merge errors, got gcode scripts to work, broke temperature polling in the process
TODO:
- Fix temperature polling
- Document new hook octoprint.comm.protocol.scripts
2015-02-19 22:32:20 +01:00
Gina Häußge
654e255b68 Merge branch 'devel' into dev/gcodeScripts
Conflicts:
	src/octoprint/server/__init__.py
	src/octoprint/server/api/settings.py
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/js/app/viewmodels/settings.js
2015-02-18 17:18:22 +01:00
Gina Häußge
258b824ff8 self._printer in plugins now allows direct access to the transport object (serial instance in most cases) 2015-02-17 21:53:45 +01:00
Gina Häußge
197ed7b912 More documentation 2015-02-13 12:50:02 +01:00
Gina Häußge
d8dffc9dd3 Fall back to unmodified default profile if the overridden version is invalid 2015-02-03 11:46:30 +01:00
Gina Häußge
83204eda3b Merge branch 'devel' into gcodeScripts
Conflicts:
	src/octoprint/printer/__init__.py
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/less/octoprint.less
	src/octoprint/templates/settings.jinja2
2015-01-19 15:25:11 +01:00
Gina Häußge
4e4ad0be8b Fixed file sending to SD card
Closes #709
2015-01-12 16:00:37 +01:00
Gina Häußge
f238ef40ec Better error validation for printer profiles
Data types loaded from disk were not properly ensured to match expected types and input validation also had deficits.

Should fix #714
2015-01-12 15:07:14 +01:00
Gina Häußge
0737ee65bd Support action: commands sent from printer, for now only pause, resume and disconnect are supported, plus a new hook "octoprint.comm.protocol.action" to add handlers of custom actions via plugins.
Added "!!DEBUG:" command to virtual printer to be able to trigger such commands to be sent by it.
2014-12-20 00:31:46 +01:00
Gina Häußge
873a825e57 Commented out loggers used for debugging/evaluating print time estimation 2014-12-18 12:02:14 +01:00