From e62578eb114b02256b28ef7ed5a75c66f8333314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 30 Jun 2013 00:03:34 +0200 Subject: [PATCH 1/3] Reset peakZ on new print (cherry picked from commit 83a864d) --- octoprint/printer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/octoprint/printer.py b/octoprint/printer.py index 442979ca..3030277d 100644 --- a/octoprint/printer.py +++ b/octoprint/printer.py @@ -56,7 +56,7 @@ class Printer(): self._currentZ = None - self.peakZ = -1 + self._peakZ = -1 self._progress = None self._printTime = None self._printTimeLeft = None @@ -185,6 +185,7 @@ class Printer(): return self._setCurrentZ(None) + self._peakZ = -1 self._comm.startPrint() def togglePausePrint(self): @@ -396,8 +397,8 @@ class Printer(): oldZ = self._currentZ # only do this if we hit a new Z peak level. Some slicers do a Z-lift when retracting / moving without printing # and some do anti-backlash up-then-down movement when advancing layers - if newZ > self.peakZ: - self.peakZ = newZ + if newZ > self._peakZ: + self._peakZ = newZ eventManager().fire("ZChange", newZ) self._setCurrentZ(newZ) @@ -615,7 +616,6 @@ class StateMonitor(object): self._gcodeData = None self._sdUploadData = None self._currentZ = None - self._peakZ = -1 self._progress = None self._changeEvent = threading.Event() From aa9d92417a75e17361cbe4c4e7451bde5ec84813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 30 Jun 2013 19:15:16 +0200 Subject: [PATCH 2/3] Removed peakZ again, doesn't work this way Slicers might raise the print head first for a "nose dive" onto the print platform, leading to a high peakZ already dialed in, with no way to get it down again. This way events won't be fired until the print reaches the height of the initial starting point. As a z-change is a z-change if z changes, we'll just fire the event now (if oldZ != newZ). Event consumers will have to think of a way to filter out the noise. (cherry picked from commit 9227bb5) --- octoprint/printer.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/octoprint/printer.py b/octoprint/printer.py index 3030277d..5ba8f51b 100644 --- a/octoprint/printer.py +++ b/octoprint/printer.py @@ -56,7 +56,6 @@ class Printer(): self._currentZ = None - self._peakZ = -1 self._progress = None self._printTime = None self._printTimeLeft = None @@ -185,7 +184,6 @@ class Printer(): return self._setCurrentZ(None) - self._peakZ = -1 self._comm.startPrint() def togglePausePrint(self): @@ -395,12 +393,11 @@ class Printer(): Callback method for the comm object, called upon change of the z-layer. """ oldZ = self._currentZ - # only do this if we hit a new Z peak level. Some slicers do a Z-lift when retracting / moving without printing - # and some do anti-backlash up-then-down movement when advancing layers - if newZ > self._peakZ: - self._peakZ = newZ + if newZ != oldZ: + # we have to react to all z-changes, even those that might "go backward" due to a slicer's retraction or + # anti-backlash-routines. Event subscribes should individually take care to filter out "wrong" z-changes eventManager().fire("ZChange", newZ) - + self._setCurrentZ(newZ) def mcSdStateChange(self, sdReady): From 407c61cb2422bb6d43ac16f2809ef79c642c2603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 1 Jul 2013 15:23:40 +0200 Subject: [PATCH 3/3] Removed contents that are now found on the website, added note regarding filing bug reports --- README.md | 63 ++++++++++++------------------------------------------- 1 file changed, 13 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 0f6ea7cd..d0985402 100644 --- a/README.md +++ b/README.md @@ -3,26 +3,16 @@ OctoPrint [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=foosel&url=https://github.com/foosel/OctoPrint&title=OctoPrint&language=&tags=github&category=software) -OctoPrint provides a responsive web interface for controlling a 3D printer (RepRap, Ultimaker, ...). It currently -allows +OctoPrint provides a responsive web interface for controlling a 3D printer (RepRap, Ultimaker, ...). It is Free Software +and released under the [GNU Affero General Public License V3](http://www.gnu.org/licenses/agpl.html). -* uploading .gcode files to the server plus optionally the printer's SD card and managing them via the UI -* selecting a file for printing, getting the usual stats regarding filament length etc (stats not available for SD files) -* starting, pausing and canceling a print job -* while connected to the printer, gaining information regarding the current temperature of both head and bed (if available) in a nice shiny javascript-y temperature graph -* while printing, gaining information regarding the current progress of the print job (height, percentage etc) -* reading the communication log and send arbitrary codes to be executed by the printer -* moving the X, Y and Z axis (jog controls), extruding, retracting and custom controls -* previewing the GCODE of the selected model to print (via gCodeVisualizer), including rendering of the progress during printing (not available when SD printing) -* optional: visual monitoring of the printer via webcam stream integrated into the UI (using e.g. MJPG-Streamer) -* optional: creation of timelapse recordings of the printjob via webcam stream (using e.g. MJPG-Streamer) -- currently two timelaspe methods are implemented, triggering a shot on z-layer change or every "n" seconds -* optional: access control to provide a read-only mode on the web interface, allowing any actions only to logged in users +Its website can be found at [octoprint.org](http://octoprint.org). -The intended usecase is to run OctoPrint on a single-board computer like the Raspberry Pi and a WiFi module, -connect the printer to the server and therefore create a WiFi-enabled 3D printer. If you want to add a webcam for visual -monitoring and timelapse support, you'll need a **powered** USB hub. +Reporting bugs +-------------- -OctoPrint is Free Software and released under the [GNU Affero General Public License V3](http://www.gnu.org/licenses/agpl.html). +OctoPrint's issue tracker can be found [on Github](https://github.com/foosel/OctoPrint/issues). **Before opening a new +ticket please take a look at [this guide on how to file a bug report with OctoPrint](https://github.com/foosel/OctoPrint/wiki/How-to-file-a-bug-report).** Dependencies ------------ @@ -68,41 +58,14 @@ See `run --help` for further information. Configuration ------------- -If not specified via the commandline, the configfile `config.yaml` for OctoPrint is expected in the settings folder, which is located at ~/.octoprint on Linux, at %APPDATA%/OctoPrint on Windows and at ~/Library/Application Support/OctoPrint on MacOS. +If not specified via the commandline, the configfile `config.yaml` for OctoPrint is expected in the settings folder, +which is located at `~/.octoprint` on Linux, at `%APPDATA%/OctoPrint` on Windows and +at `~/Library/Application Support/OctoPrint` on MacOS. -A comprehensive overview of all available configuration settings can be found [on the wiki](https://github.com/foosel/OctoPrint/wiki/Configuration). +A comprehensive overview of all available configuration settings can be found +[on the wiki](https://github.com/foosel/OctoPrint/wiki/Configuration). Setup on a Raspberry Pi running Raspbian ---------------------------------------- -A comprehensive setup guide can be found [on the wiki](https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian). - -Credits -------- - -OctoPrint started out as a fork of Cura (https://github.com/daid/Cura) for adding a web interface to its -printing functionality and was originally named "Printer WebUI". It still uses Cura's communication code for talking to -the printer, but has been reorganized to only include those parts of Cura necessary for its targeted use case. - -It also uses the following libraries and frameworks for backend and frontend: - -* Flask: http://flask.pocoo.org/ -* Tornado: http://www.tornadoweb.org/ -* Tornadio2: https://github.com/MrJoes/tornadio2 -* PyYAML: http://pyyaml.org/ -* Socket.io: http://socket.io/ -* jQuery: http://jquery.com/ -* Bootstrap: http://twitter.github.com/bootstrap/ -* Font Awesome: http://fortawesome.github.com/Font-Awesome/ -* Knockout.js: http://knockoutjs.com/ -* Underscore.js: http://underscorejs.org/ -* Flot: http://www.flotcharts.org/ -* jQuery File Upload: http://blueimp.github.com/jQuery-File-Upload/ -* Pines Notify: http://pinesframework.org/pnotify/ -* gCodeVisualizer: https://github.com/hudbrog/gCodeViewer - -The following software is recommended for Webcam support on the Raspberry Pi: - -* MJPG-Streamer: http://sourceforge.net/apps/mediawiki/mjpg-streamer/index.php?title=Main_Page - -I also want to thank [Janina Himmen](http://jhimmen.de/) for providing the kick-ass logo! +A comprehensive setup guide can be found [on the wiki](https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian). \ No newline at end of file