leveling: Fix. Point index not used

This commit is contained in:
mfm 2018-01-24 18:39:48 +01:00
parent 9b6e8faf70
commit c3b56364b9
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ $(function() {
self.stopLeveling = function() { self.stopLeveling = function() {
self.activePoint(-1); self.activePoint(-1);
OctoPrint.control.sendGcode("G1 Z" + self.settings.settings.plugins.klipper.probeHeight() + self.settings.settings.plugins.klipper.probeLift());
OctoPrint.control.sendGcode("G28") OctoPrint.control.sendGcode("G28")
} }
@ -37,7 +38,7 @@ $(function() {
} }
self.moveToPoint = function(index) { self.moveToPoint = function(index) {
var point = self.settings.settings.plugins.klipper.probePoints()[0]; var point = self.settings.settings.plugins.klipper.probePoints()[index];
OctoPrint.control.sendGcode("G1 Z" + self.settings.settings.plugins.klipper.probeHeight() + self.settings.settings.plugins.klipper.probeLift()); OctoPrint.control.sendGcode("G1 Z" + self.settings.settings.plugins.klipper.probeHeight() + self.settings.settings.plugins.klipper.probeLift());
OctoPrint.control.sendGcode("G1 X" + point.x() + " Y" + point.y()); OctoPrint.control.sendGcode("G1 X" + point.x() + " Y" + point.y());