diff --git a/octoprint/server.py b/octoprint/server.py index 43a00b0..3c0f07e 100644 --- a/octoprint/server.py +++ b/octoprint/server.py @@ -187,11 +187,11 @@ def jog(): if "x" in request.values.keys(): # jog x x = request.values["x"] - printer.commands(["G91", "G1 X" + x + " F6000", "G90"]) + printer.commands(["G91", "G1 X" + x + " F3000", "G90"]) if "y" in request.values.keys(): # jog y y = request.values["y"] - printer.commands(["G91", "G1 Y" + y + " F6000", "G90"]) + printer.commands(["G91", "G1 Y" + y + " F3000", "G90"]) if "z" in request.values.keys(): # jog z z = request.values["z"] @@ -409,4 +409,4 @@ def main(): run(host=options.host, port=options.port, debug=options.debug) if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/octoprint/static/css/ui.css b/octoprint/static/css/ui.css index ef0aebc..a056978 100644 --- a/octoprint/static/css/ui.css +++ b/octoprint/static/css/ui.css @@ -155,14 +155,18 @@ table th.timelapse_files_action, table td.timelapse_files_action { margin-right: 20px; } -#controls .jog-panel > h4 { - border-bottom: 1px solid #ddd; +#controls h1 { + text-align: left; } #controls .jog-panel > div { text-align: center; } +#controls .jog-panel > div.distance { + text-align: left; +} + #controls .box { width: 30px; height: 30px; @@ -177,6 +181,15 @@ table th.timelapse_files_action, table td.timelapse_files_action { margin-bottom: 10px; } +#controls .btn-group { + margin-top: 10px; + margin-bottom: 10px; +} + +#controls .btn-group > .btn { + min-width: 50px; +} + .text-right { text-align: right; } diff --git a/octoprint/static/js/ui.js b/octoprint/static/js/ui.js index ddd5b2d..55c76e4 100644 --- a/octoprint/static/js/ui.js +++ b/octoprint/static/js/ui.js @@ -409,12 +409,14 @@ function ControlsViewModel() { return control; } - self.sendJogCommand = function(axis, distance) { + self.sendJogCommand = function(axis, multiplier, distance) { + if (typeof distance === "undefined") + distance = $('#jog_distance button.active').data('distance'); $.ajax({ url: AJAX_BASEURL + "control/jog", type: "POST", dataType: "json", - data: axis + "=" + distance + data: axis + "=" + ( distance * multiplier ) }) } diff --git a/octoprint/templates/index.html b/octoprint/templates/index.html index 50c3d53..6889fdf 100644 --- a/octoprint/templates/index.html +++ b/octoprint/templates/index.html @@ -169,32 +169,43 @@
-
-

X/Y

-
- + +
+

X/Y

+
+ +
+
+ + + +
+
+ +
-
- - - + +
+

Z

+
+ +
+
+ +
+
+ +
-
- -
-
- -
-

Z

-
- -
-
- -
-
- + +
+
+ + + + +