kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
v1.0.222
rodzic
abf5605f6e
commit
631ac67c38
|
@ -1,3 +1,5 @@
|
|||
v1.0.222: Added Keyboard shortcuts for GotoZero, and switching between Incremental/Continuous jogging
|
||||
v1.0.221: Corrected product names for XYZ Probe Plus
|
||||
v1.0.220: New XYZ and Custom Probe wizards, new Probe Button on Main toolbar, fixed File Assocation Opening (Bug #119 ), added loaded Filename to titlebar (Issue #116), changed Keybinding for Devtools to ctrl+shift+i, added shortcut key F6 to jump to console (Issue #112)
|
||||
v1.0.216-219: Internal Testing versions only
|
||||
v1.0.215: Fixed bug with Z Plate retract where plate is thicker than 10mm
|
||||
|
|
|
@ -35,9 +35,20 @@ $(document).ready(function() {
|
|||
|
||||
if (localStorage.getItem('keyboardShortcuts')) {
|
||||
keyboardShortcuts = JSON.parse(localStorage.getItem('keyboardShortcuts'));
|
||||
// fix incorrect key naming bug from an old version
|
||||
if (keyboardShortcuts.xP == "arrowright") {
|
||||
keyboardShortcuts.xP == "right"
|
||||
}
|
||||
// add new key defaults to existing allocations
|
||||
if (!keyboardShortcuts.incJogMode) {
|
||||
keyboardShortcuts.incJogMode = "/"
|
||||
}
|
||||
if (!keyboardShortcuts.conJogMode) {
|
||||
keyboardShortcuts.conJogMode = "*"
|
||||
}
|
||||
if (!keyboardShortcuts.gotozeroxyz) {
|
||||
keyboardShortcuts.gotozeroxyz = "del"
|
||||
}
|
||||
} else {
|
||||
keyboardShortcuts = {
|
||||
xP: "right", //X+
|
||||
|
@ -52,7 +63,10 @@ $(document).ready(function() {
|
|||
playpause: "space", // Start, Pause, Resume
|
||||
unlockAlarm: "end", // Clear Alarm
|
||||
home: "home", // Home All
|
||||
setzeroxyz: "insert" // Set ZERO XYZ
|
||||
setzeroxyz: "insert", // Set ZERO XYZ
|
||||
gotozeroxyz: "del", // go to zero xyz
|
||||
incJogMode: "/", // Incremental Jog Mode
|
||||
conJogMode: "*" // Continuous Jog Mode
|
||||
}
|
||||
}
|
||||
bindKeys()
|
||||
|
@ -281,11 +295,17 @@ function bindKeys() {
|
|||
}
|
||||
if (keyboardShortcuts.stepM.length) {
|
||||
$(document).bind('keydown', keyboardShortcuts.stepM, function(e) {
|
||||
$('#jogTypeContinuous').prop('checked', false)
|
||||
allowContinuousJog = false;
|
||||
$('.distbtn').show();
|
||||
changeStepSize(-1)
|
||||
});
|
||||
}
|
||||
if (keyboardShortcuts.stepP.length) {
|
||||
$(document).bind('keydown', keyboardShortcuts.stepP, function(e) {
|
||||
$('#jogTypeContinuous').prop('checked', false)
|
||||
allowContinuousJog = false;
|
||||
$('.distbtn').show();
|
||||
changeStepSize(1)
|
||||
});
|
||||
}
|
||||
|
@ -326,6 +346,31 @@ function bindKeys() {
|
|||
});
|
||||
}
|
||||
|
||||
if (keyboardShortcuts.gotozeroxyz.length) {
|
||||
$(document).bind('keydown', keyboardShortcuts.gotozeroxyz, function(e) {
|
||||
sendGcode('G21 G90');
|
||||
sendGcode('G0 Z5');
|
||||
sendGcode('G0 X0 Y0');
|
||||
sendGcode('G0 Z0');
|
||||
});
|
||||
}
|
||||
|
||||
if (keyboardShortcuts.incJogMode.length) {
|
||||
$(document).bind('keydown', keyboardShortcuts.incJogMode, function(e) {
|
||||
$('#jogTypeContinuous').prop('checked', false)
|
||||
allowContinuousJog = false;
|
||||
$('.distbtn').show();
|
||||
});
|
||||
}
|
||||
|
||||
if (keyboardShortcuts.conJogMode.length) {
|
||||
$(document).bind('keydown', keyboardShortcuts.conJogMode, function(e) {
|
||||
$('#jogTypeContinuous').prop('checked', true)
|
||||
allowContinuousJog = true;
|
||||
$('.distbtn').hide()
|
||||
});
|
||||
}
|
||||
|
||||
localStorage.setItem('keyboardShortcuts', JSON.stringify(keyboardShortcuts));
|
||||
}
|
||||
|
||||
|
@ -357,6 +402,12 @@ function keyboardShortcutsEditor() {
|
|||
<input type="text" class="keyboardshortcutinput" readonly id="setzeroxyznewKey" value="` + keyboardShortcuts.setzeroxyz + `" onclick="$('.keyboardshortcutinput').removeClass('alert').removeClass('newKeyAssignment'); $('#setzeroxyznewKey').addClass('alert').addClass('newKeyAssignment')">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 ml-1 mr-1">
|
||||
<label class="cell-sm-6"><i class="fas fa-chart-line fg-openbuilds fa-fw"></i> Goto XYZ Zero</label>
|
||||
<div class="cell-sm-6">
|
||||
<input type="text" class="keyboardshortcutinput" readonly id="gotozeroxyznewKey" value="` + keyboardShortcuts.gotozeroxyz + `" onclick="$('.keyboardshortcutinput').removeClass('alert').removeClass('newKeyAssignment'); $('#setzeroxyznewKey').addClass('alert').addClass('newKeyAssignment')">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 ml-1 mr-1">
|
||||
<label class="cell-sm-6"><i class="fas fa-bell fg-openbuilds fa-fw"></i> Unlock Alarm</label>
|
||||
<div class="cell-sm-6">
|
||||
|
@ -418,6 +469,20 @@ function keyboardShortcutsEditor() {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-1 ml-1 mr-1">
|
||||
<label class="cell-sm-6"><i class="fas fa-step-forward fg-openbuilds fa-fw"></i> Incremental Jog Mode<br></label>
|
||||
<div class="cell-sm-6">
|
||||
<input type="text" class="keyboardshortcutinput" readonly id="incJogModeKey" value="` + keyboardShortcuts.incJogMode + `" onclick="$('.keyboardshortcutinput').removeClass('alert').removeClass('newKeyAssignment'); $('#stepPnewKey').addClass('alert').addClass('newKeyAssignment')">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 ml-1 mr-1">
|
||||
<label class="cell-sm-6"><i class="fas fa-running fg-openbuilds fa-fw"></i> Continuous Jog Mode<br></label>
|
||||
<div class="cell-sm-6">
|
||||
<input type="text" class="keyboardshortcutinput" readonly id="conJogModeKey" value="` + keyboardShortcuts.conJogMode + `" onclick="$('.keyboardshortcutinput').removeClass('alert').removeClass('newKeyAssignment'); $('#stepPnewKey').addClass('alert').addClass('newKeyAssignment')">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>`
|
||||
|
@ -445,6 +510,9 @@ function keyboardShortcutsEditor() {
|
|||
keyboardShortcuts.unlockAlarm = $('#unlocknewKey').val()
|
||||
keyboardShortcuts.home = $('#homenewKey').val()
|
||||
keyboardShortcuts.setzeroxyz = $('#setzeroxyznewKey').val()
|
||||
keyboardShortcuts.incJogMode = $("#incJogModeKey").val()
|
||||
keyboardShortcuts.conJogMode = $("#conJogModeKey").val()
|
||||
keyboardShortcuts.gotozeroxyz = $("#gotozeroxyznewKey").val()
|
||||
bindKeys()
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "OpenBuildsCONTROL",
|
||||
"version": "1.0.221",
|
||||
"version": "1.0.222",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "OpenBuildsCONTROL CNC Machine Interface Software",
|
||||
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
||||
|
|
Ładowanie…
Reference in New Issue