leveling: Added speed settings parameter
This commit is contained in:
parent
c3b56364b9
commit
ce7546b781
|
@ -24,6 +24,8 @@ class KlipperPlugin(
|
||||||
macros=[{'name':"Echo", 'macro':"ECHO"}],
|
macros=[{'name':"Echo", 'macro':"ECHO"}],
|
||||||
probeHeight=0,
|
probeHeight=0,
|
||||||
probeLift=5,
|
probeLift=5,
|
||||||
|
probeSpeedXy=800,
|
||||||
|
probeSpeedZ=500,
|
||||||
probePoints=[{'x':0, 'y':0}])
|
probePoints=[{'x':0, 'y':0}])
|
||||||
|
|
||||||
def get_template_configs(self):
|
def get_template_configs(self):
|
||||||
|
|
|
@ -14,23 +14,23 @@ $(function() {
|
||||||
self.startLeveling = function() {
|
self.startLeveling = function() {
|
||||||
self.activePoint(0);
|
self.activePoint(0);
|
||||||
OctoPrint.control.sendGcode("G28")
|
OctoPrint.control.sendGcode("G28")
|
||||||
self.moveToPoint(self.activePoint);
|
self.moveToPoint(self.activePoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
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("G1 Z" + (self.settings.settings.plugins.klipper.probeHeight()*1 + self.settings.settings.plugins.klipper.probeLift()*1));
|
||||||
OctoPrint.control.sendGcode("G28")
|
OctoPrint.control.sendGcode("G28")
|
||||||
}
|
}
|
||||||
|
|
||||||
self.nextPoint = function() {
|
self.nextPoint = function() {
|
||||||
self.activePoint(self.activePoint()+1);
|
self.activePoint(self.activePoint()+1);
|
||||||
self.moveToPoint(self.activePoint);
|
self.moveToPoint(self.activePoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
self.previousPoint = function() {
|
self.previousPoint = function() {
|
||||||
self.activePoint(self.activePoint()-1);
|
self.activePoint(self.activePoint()-1);
|
||||||
self.moveToPoint(self.activePoint);
|
self.moveToPoint(self.activePoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
self.pointCount = function() {
|
self.pointCount = function() {
|
||||||
|
@ -40,9 +40,18 @@ $(function() {
|
||||||
self.moveToPoint = function(index) {
|
self.moveToPoint = function(index) {
|
||||||
var point = self.settings.settings.plugins.klipper.probePoints()[index];
|
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(
|
||||||
OctoPrint.control.sendGcode("G1 X" + point.x() + " Y" + point.y());
|
"G1 Z" + (self.settings.settings.plugins.klipper.probeHeight()*1 + self.settings.settings.plugins.klipper.probeLift()*1) +
|
||||||
OctoPrint.control.sendGcode("G1 Z" + self.settings.settings.plugins.klipper.probeHeight());
|
" F" + self.settings.settings.plugins.klipper.probeSpeedZ()
|
||||||
|
);
|
||||||
|
OctoPrint.control.sendGcode(
|
||||||
|
"G1 X" + point.x() + " Y" + point.y() +
|
||||||
|
" F" + self.settings.settings.plugins.klipper.probeSpeedXy()
|
||||||
|
);
|
||||||
|
OctoPrint.control.sendGcode(
|
||||||
|
"G1 Z" + self.settings.settings.plugins.klipper.probeHeight() +
|
||||||
|
" F" + self.settings.settings.plugins.klipper.probeSpeedZ()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,19 @@
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" class="input-block-level span3" data-bind="value: settings.settings.plugins.klipper.probeLift">
|
<input type="text" class="input-block-level span3" data-bind="value: settings.settings.plugins.klipper.probeLift">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Probe Speed XY</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" class="input-block-level span3" data-bind="value: settings.settings.plugins.klipper.probeSpeedXy">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Probe Speed Z</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" class="input-block-level span3" data-bind="value: settings.settings.plugins.klipper.probeSpeedZ">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<h5>{{ _('Probe Points') }}</h5>
|
<h5>{{ _('Probe Points') }}</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue