diff --git a/AUTHORS.md b/AUTHORS.md index 2bc8d675e..cce0893dc 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -117,6 +117,7 @@ date of first contribution): * [Kelly Anderson](https://github.com/cbxbiker61) * [Jim Neill](https://github.com/jneilliii) * [Dustin Kerber](https://github.com/kerber) + * [Tobias Schürg](https://github.com/tobiasschuerg) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/docs/jsclientlib/printer.rst b/docs/jsclientlib/printer.rst index d79d3d6de..e0c014bab 100644 --- a/docs/jsclientlib/printer.rst +++ b/docs/jsclientlib/printer.rst @@ -144,7 +144,7 @@ Sets the current flowrate multiplier. - ``factor`` is expected to be a integer value between 75 and 125 representing the new flowrate percentage. + ``factor`` is expected to be a integer value >0 representing the new flowrate percentage. See the ``flowrate`` command in :ref:`Issue a tool command ` for more details. @@ -325,7 +325,7 @@ Sets the feedrate multiplier to use. - ``factor`` is expected to be a integer value between 0 and 200 representing the new feedrate percentage. + ``factor`` is expected to be a integer value >0 representing the new feedrate percentage. See the ``feedrate`` command in :ref:`Issue a print head command ` for more details. diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py index 10ccd329d..35910282e 100644 --- a/src/octoprint/printer/standard.py +++ b/src/octoprint/printer/standard.py @@ -456,25 +456,27 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): self._comm.setTemperatureOffset(offsets) self._setOffsets(self._comm.getOffsets()) - def _convert_rate_value(self, factor, min=0, max=200): + def _convert_rate_value(self, factor, min_val=None, max_val=None): if not isinstance(factor, (int, float, long)): raise ValueError("factor is not a number") if isinstance(factor, float): factor = int(factor * 100.0) - if factor < min or factor > max: - raise ValueError("factor must be a value between {} and {}".format(min, max)) + if min_val and factor < min_val: + raise ValueError("factor must be a value >={}".format(min_val)) + elif max_val and factor > max_val: + raise ValueError("factor must be a value <={}".format(max_val)) return factor def feed_rate(self, factor, *args, **kwargs): - factor = self._convert_rate_value(factor, min=50, max=200) + factor = self._convert_rate_value(factor, min_val=1) self.commands("M220 S%d" % factor, tags=kwargs.get("tags", set()) | {"trigger:printer.feed_rate"}) def flow_rate(self, factor, *args, **kwargs): - factor = self._convert_rate_value(factor, min=75, max=125) + factor = self._convert_rate_value(factor, min_val=1) self.commands("M221 S%d" % factor, tags=kwargs.get("tags", set()) | {"trigger:printer.flow_rate"}) diff --git a/src/octoprint/templates/tabs/control.jinja2 b/src/octoprint/templates/tabs/control.jinja2 index c30e198a2..ea58b269b 100644 --- a/src/octoprint/templates/tabs/control.jinja2 +++ b/src/octoprint/templates/tabs/control.jinja2 @@ -80,8 +80,12 @@
- - + +
+ + % + +
@@ -98,15 +102,21 @@
- + mm
- - +
+ +
+ + % + +
+