From deb38f84555db9acb148b94de5ba2f307ff1869b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 18 Apr 2014 14:28:52 +0200 Subject: [PATCH 1/4] 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 --- src/octoprint/server/ajax/control.py | 32 ---------------------------- 1 file changed, 32 deletions(-) diff --git a/src/octoprint/server/ajax/control.py b/src/octoprint/server/ajax/control.py index 2b38835f..efc7e99e 100644 --- a/src/octoprint/server/ajax/control.py +++ b/src/octoprint/server/ajax/control.py @@ -145,38 +145,6 @@ def jog(): length = request.values["extrude"] printer.commands(["G91", "G1 E%s F%d" % (length, movementSpeedE), "G90"]) - movementSpeed = settings().get(["printerParameters", "movementSpeed", ["x", "y", "z"]], asdict=True) - - valid_axes = ["x", "y", "z"] - ##~~ jog command - if command == "jog": - # validate all jog instructions, make sure that the values are numbers - validated_values = {} - for axis in valid_axes: - if axis in data: - value = data[axis] - if not isinstance(value, (int, long, float)): - return make_response("Not a number for axis %s: %r" % (axis, value), 400) - validated_values[axis] = value - - # execute the jog commands - for axis, value in validated_values.iteritems(): - # TODO make this a generic method call (printer.jog(axis, value)) to get rid of gcode here - printer.commands(["G91", "G1 %s%.4f F%d" % (axis.upper(), value, movementSpeed[axis]), "G90"]) - - ##~~ home command - elif command == "home": - validated_values = [] - axes = data["axes"] - for axis in axes: - if not axis in valid_axes: - return make_response("Invalid axis: %s" % axis, 400) - validated_values.append(axis) - - # execute the home command - # TODO make this a generic method call (printer.home(axis, ...)) to get rid of gcode here - printer.commands(["G91", "G28 %s" % " ".join(map(lambda x: "%s0" % x.upper(), validated_values)), "G90"]) - return jsonify(SUCCESS) From 887ec45b6bbbdbac1aa62a5df11f2009a3c8753a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 19 May 2014 22:48:41 +0200 Subject: [PATCH 2/4] Create CONTRIBUTING.md --- CONTRIBUTING.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..99bafba2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +Bug Reports +----------- + +**READ [How to file a bug report](https://github.com/foosel/OctoPrint/wiki/How-to-file-a-bug-report)!**. + +Pull Requests +------------- + +1. Please create all pull requests against the `devel` branch. +2. Create **one pull request per feature/bug fix**. +3. Create a custom branch for your feature/bug fix and use that as base for your pull request. Pull requests directly against your version of `devel` will be closed. +4. In your pull request's description, state what your pull request is doing, as in, what feature does it implement, what bug does it fix. + From 536e17eac4270111f5edb64a091dc57f4b267b39 Mon Sep 17 00:00:00 2001 From: Salandora Date: Thu, 22 May 2014 17:56:50 +0200 Subject: [PATCH 3/4] Bug fix for Emergency Stop --- src/octoprint/util/comm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index caf30518..e72541b9 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1018,6 +1018,9 @@ class MachineCom(object): self._resendDelta = None return None + def _gcode_M112(self, cmd): # It's an emergency what todo? Canceling the print should be the minimum + self.cancelPrint() + return cmd ### MachineCom callback ################################################################################################ From fa564c6029604524db9914c6eaf8ef6cb342f9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sat, 21 Jun 2014 20:11:04 +0200 Subject: [PATCH 4/4] Insert src folder at first position of sys.path --- run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run b/run index 35ebbef8..0c51da39 100755 --- a/run +++ b/run @@ -16,7 +16,7 @@ I don't know anything about). """ os.rename(old, os.path.join(basedir, "octoprint.backup")) -sys.path.append(os.path.join(basedir, "src")) +sys.path.insert(0, os.path.join(basedir, "src")) import octoprint octoprint.main()