kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
v1.0.233
rodzic
7b15f79600
commit
432c6201c5
|
@ -1,4 +1,5 @@
|
||||||
v1.0.231: Fix bug in Keyboard Jog
|
v1.0.233: Cleanup code
|
||||||
|
v1.0.232: Fix bug in Keyboard Jog
|
||||||
v1.0.231: Fix bug in Keyboard Shortcut editor
|
v1.0.231: Fix bug in Keyboard Shortcut editor
|
||||||
v1.0.230: Updated Macros Editor with support for JS macros, new Icon selector, etc
|
v1.0.230: Updated Macros Editor with support for JS macros, new Icon selector, etc
|
||||||
v1.0.229: XYZ Probe Routine: Change Z level from absolute to relative, Enable homing button in Alarms state (to allow homing if alarm = position lost), added Backup Grbl Settings button
|
v1.0.229: XYZ Probe Routine: Change Z level from absolute to relative, Enable homing button in Alarms state (to allow homing if alarm = position lost), added Backup Grbl Settings button
|
||||||
|
|
|
@ -1210,13 +1210,13 @@
|
||||||
<div class="dialog dark" id="downloadUpdate" data-role="dialog" data-overlay-click-close="true" data-to-top="true">
|
<div class="dialog dark" id="downloadUpdate" data-role="dialog" data-overlay-click-close="true" data-to-top="true">
|
||||||
<div class="dialog-title">Update Ready</div>
|
<div class="dialog-title">Update Ready</div>
|
||||||
<div class="dialog-content">
|
<div class="dialog-content">
|
||||||
Version <code><span id="availVersion">1.0.100</span></code> update ready to be installed!<br> Note that proceeding will:
|
Updated version <code><span id="availVersion">1.0.100</span></code> has finished downloading and is ready to be installed!<br> Note that proceeding will:
|
||||||
<ul>
|
<ul>
|
||||||
<li>Stops any running jobs</li>
|
<li>Stop any running jobs</li>
|
||||||
<li>Shuts down this instance of OpenBuilds CONTROL</li>
|
<li>Shut down this instance of OpenBuilds CONTROL</li>
|
||||||
<li>Launches the installer for the new version</li>
|
<li>Launch the installer for the new version</li>
|
||||||
</ul>
|
</ul>
|
||||||
<small>You may want to wait until your machine is idle before continuing</small>
|
<small>You may want to wait until your machine is idle, and it it's a convenient time for you to do this, before continuing</small>
|
||||||
<small id="changelogupdate"></small>
|
<small id="changelogupdate"></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialog-actions">
|
<div class="dialog-actions">
|
||||||
|
|
|
@ -86,12 +86,15 @@ function bindKeys() {
|
||||||
newVal += 'shift+'
|
newVal += 'shift+'
|
||||||
}
|
}
|
||||||
newVal += e.key
|
newVal += e.key
|
||||||
|
newVal = newVal.toLowerCase();
|
||||||
var macro = searchMacro("macrokeyboardshortcut", newVal, buttonsarray)
|
var macro = searchMacro("macrokeyboardshortcut", newVal, buttonsarray)
|
||||||
console.log(macro)
|
console.log(macro)
|
||||||
if (macro.codetype == "gcode") {
|
if (macro && macro.codetype == "gcode") {
|
||||||
sendGcode(macro.gcode); // TODO change to runMacro with JS
|
sendGcode(macro.gcode); // TODO change to runMacro with JS
|
||||||
} else if (macro.codetype == "javascript") {
|
} else if (macro && macro.codetype == "javascript") {
|
||||||
executeJS(macro.javascript)
|
executeJS(macro.javascript)
|
||||||
|
} else {
|
||||||
|
printLog("Macro not found for " + newVal)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -99,216 +102,93 @@ function bindKeys() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bind for Jog and Control Buttons
|
// Bind for Jog and Control Buttons
|
||||||
|
|
||||||
|
// JOG KEYS
|
||||||
if (keyboardShortcuts) {
|
if (keyboardShortcuts) {
|
||||||
if (keyboardShortcuts.xM.length) {
|
if (keyboardShortcuts.xM.length) {
|
||||||
$(document).bind('keydown', keyboardShortcuts.xM, function(event) {
|
$(document).bind('keydown', keyboardShortcuts.xM, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
|
||||||
if (!event.originalEvent.repeat) {
|
if (!event.originalEvent.repeat) {
|
||||||
var direction = "X-";
|
|
||||||
var distance = 1000;
|
|
||||||
|
|
||||||
if (Object.keys(grblParams).length > 0) {
|
|
||||||
if (parseInt(grblParams.$20) == 1) {
|
|
||||||
// Soft Limits is enabled so lets calculate maximum move distance
|
|
||||||
var mindistance = parseInt(grblParams.$130)
|
|
||||||
var maxdistance = 0; // Grbl all negative coordinates
|
|
||||||
// Negative move:
|
|
||||||
distance = (mindistance + (parseInt(laststatus.machine.position.offset.x) + parseInt(laststatus.machine.position.work.x))) - 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var feed = $('#jograte').val();
|
|
||||||
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
|
|
||||||
continuousJogRunning = true;
|
|
||||||
$('#xM').click();
|
|
||||||
rippleEffect($('#xMprobe'), "#e21b1b")
|
rippleEffect($('#xMprobe'), "#e21b1b")
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$('#xM').mousedown();
|
$('#xM').mousedown();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(document).bind('keyup', keyboardShortcuts.xM, function(event) {
|
$(document).bind('keyup', keyboardShortcuts.xM, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
$('#xM').mouseup();
|
||||||
cancelJog()
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyboardShortcuts.xP.length) {
|
if (keyboardShortcuts.xP.length) {
|
||||||
$(document).bind('keydown', keyboardShortcuts.xP, function(event) {
|
$(document).bind('keydown', keyboardShortcuts.xP, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
|
||||||
if (!event.originalEvent.repeat) {
|
if (!event.originalEvent.repeat) {
|
||||||
var direction = "X";
|
|
||||||
var distance = 1000;
|
|
||||||
if (Object.keys(grblParams).length > 0) {
|
|
||||||
if (parseInt(grblParams.$20) == 1) {
|
|
||||||
// Soft Limits is enabled so lets calculate maximum move distance
|
|
||||||
var mindistance = parseInt(grblParams.$130)
|
|
||||||
var maxdistance = 0; // Grbl all negative coordinates
|
|
||||||
// Positive move:
|
|
||||||
distance = (maxdistance - (parseInt(laststatus.machine.position.offset.x) + parseInt(laststatus.machine.position.work.x))) - 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var feed = $('#jograte').val();
|
|
||||||
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
|
|
||||||
continuousJogRunning = true;
|
|
||||||
$('#xP').click();
|
|
||||||
rippleEffect($('#xPprobe'), "#e21b1b")
|
rippleEffect($('#xPprobe'), "#e21b1b")
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$('#xP').mousedown();
|
$('#xP').mousedown();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).bind('keyup', keyboardShortcuts.xP, function(event) {
|
$(document).bind('keyup', keyboardShortcuts.xP, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
$('#xP').mouseup();
|
||||||
cancelJog()
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (keyboardShortcuts.yM.length) {
|
if (keyboardShortcuts.yM.length) {
|
||||||
$(document).bind('keydown', keyboardShortcuts.yM, function(event) {
|
$(document).bind('keydown', keyboardShortcuts.yM, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
|
||||||
if (!event.originalEvent.repeat) {
|
if (!event.originalEvent.repeat) {
|
||||||
var direction = "Y-";
|
|
||||||
var distance = 1000;
|
|
||||||
|
|
||||||
if (Object.keys(grblParams).length > 0) {
|
|
||||||
if (parseInt(grblParams.$20) == 1) {
|
|
||||||
// Soft Limits is enabled so lets calculate maximum move distance
|
|
||||||
var mindistance = parseInt(grblParams.$131)
|
|
||||||
var maxdistance = 0; // Grbl all negative coordinates
|
|
||||||
// Negative move:
|
|
||||||
distance = (mindistance + (parseInt(laststatus.machine.position.offset.y) + parseInt(laststatus.machine.position.work.y))) - 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var feed = $('#jograte').val();
|
|
||||||
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
|
|
||||||
continuousJogRunning = true;
|
|
||||||
$('#yM').click();
|
|
||||||
rippleEffect($('#yMprobe'), "#5de21b")
|
rippleEffect($('#yMprobe'), "#5de21b")
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$('#yM').mousedown();
|
$('#yM').mousedown();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).bind('keyup', keyboardShortcuts.yM, function(event) {
|
$(document).bind('keyup', keyboardShortcuts.yM, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
$('#yM').mouseup();
|
||||||
cancelJog()
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (keyboardShortcuts.yP.length) {
|
if (keyboardShortcuts.yP.length) {
|
||||||
$(document).bind('keydown', keyboardShortcuts.yP, function(event) {
|
$(document).bind('keydown', keyboardShortcuts.yP, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
|
||||||
if (!event.originalEvent.repeat) {
|
if (!event.originalEvent.repeat) {
|
||||||
var direction = "Y";
|
|
||||||
var distance = 1000;
|
|
||||||
|
|
||||||
if (Object.keys(grblParams).length > 0) {
|
|
||||||
if (parseInt(grblParams.$20) == 1) {
|
|
||||||
// Soft Limits is enabled so lets calculate maximum move distance
|
|
||||||
var mindistance = parseInt(grblParams.$131)
|
|
||||||
var maxdistance = 0; // Grbl all negative coordinates
|
|
||||||
// Positive move:
|
|
||||||
distance = (maxdistance - (parseInt(laststatus.machine.position.offset.y) + parseInt(laststatus.machine.position.work.y))) - 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var feed = $('#jograte').val();
|
|
||||||
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
|
|
||||||
continuousJogRunning = true;
|
|
||||||
$('#yP').click();
|
|
||||||
rippleEffect($('#yPprobe'), "#5de21b")
|
rippleEffect($('#yPprobe'), "#5de21b")
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$('#yP').mousedown();
|
$('#yP').mousedown();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(document).bind('keyup', keyboardShortcuts.yP, function(event) {
|
$(document).bind('keyup', keyboardShortcuts.yP, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
$('#yP').mouseup();
|
||||||
cancelJog()
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (keyboardShortcuts.zM.length) {
|
if (keyboardShortcuts.zM.length) {
|
||||||
$(document).bind('keydown', keyboardShortcuts.zM, function(event) {
|
$(document).bind('keydown', keyboardShortcuts.zM, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
|
||||||
if (!event.originalEvent.repeat) {
|
if (!event.originalEvent.repeat) {
|
||||||
var direction = "Z-";
|
|
||||||
var distance = 1000;
|
|
||||||
|
|
||||||
if (Object.keys(grblParams).length > 0) {
|
|
||||||
if (parseInt(grblParams.$20) == 1) {
|
|
||||||
// Soft Limits is enabled so lets calculate maximum move distance
|
|
||||||
var mindistance = parseInt(grblParams.$132)
|
|
||||||
var maxdistance = 0; // Grbl all negative coordinates
|
|
||||||
// Negative move:
|
|
||||||
distance = (mindistance + (parseInt(laststatus.machine.position.offset.z) + parseInt(laststatus.machine.position.work.z))) - 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var feed = $('#jograte').val();
|
|
||||||
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
|
|
||||||
continuousJogRunning = true;
|
|
||||||
$('#zM').click();
|
|
||||||
rippleEffect($('#zMprobe'), "#1ba1e2")
|
rippleEffect($('#zMprobe'), "#1ba1e2")
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$('#zM').mousedown();
|
$('#zM').mousedown();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(document).bind('keyup', keyboardShortcuts.zM, function(event) {
|
$(document).bind('keyup', keyboardShortcuts.zM, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
$('#zM').mouseup();
|
||||||
cancelJog()
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (keyboardShortcuts.zP.length) {
|
if (keyboardShortcuts.zP.length) {
|
||||||
$(document).bind('keydown', keyboardShortcuts.zP, function(event) {
|
$(document).bind('keydown', keyboardShortcuts.zP, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
|
||||||
if (!event.originalEvent.repeat) {
|
if (!event.originalEvent.repeat) {
|
||||||
var direction = "Z";
|
|
||||||
var distance = 1000;
|
|
||||||
|
|
||||||
if (Object.keys(grblParams).length > 0) {
|
|
||||||
if (parseInt(grblParams.$20) == 1) {
|
|
||||||
// Soft Limits is enabled so lets calculate maximum move distance
|
|
||||||
var mindistance = parseInt(grblParams.$132)
|
|
||||||
var maxdistance = 0; // Grbl all negative coordinates
|
|
||||||
// Positive move:
|
|
||||||
distance = (maxdistance - (parseInt(laststatus.machine.position.offset.z) + parseInt(laststatus.machine.position.work.z))) - 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var feed = $('#jograte').val();
|
|
||||||
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
|
|
||||||
continuousJogRunning = true;
|
|
||||||
$('#zP').click();
|
|
||||||
rippleEffect($('#zPprobe'), "#1ba1e2")
|
rippleEffect($('#zPprobe'), "#1ba1e2")
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$('#zP').mousedown();
|
$('#zP').mousedown();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(document).bind('keyup', keyboardShortcuts.zP, function(event) {
|
$(document).bind('keyup', keyboardShortcuts.zP, function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (allowContinuousJog) {
|
$('#zP').mouseup();
|
||||||
cancelJog()
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// END JOG KEYS
|
||||||
|
|
||||||
if (keyboardShortcuts.stepM.length) {
|
if (keyboardShortcuts.stepM.length) {
|
||||||
$(document).bind('keydown', keyboardShortcuts.stepM, function(e) {
|
$(document).bind('keydown', keyboardShortcuts.stepM, function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
@ -42,8 +42,10 @@ function getChangelog() {
|
||||||
}
|
}
|
||||||
template2 += `</ul>`
|
template2 += `</ul>`
|
||||||
$("#changelog").html(template2);
|
$("#changelog").html(template2);
|
||||||
var template3 = `Changelog: <hr> <ul>`
|
|
||||||
for (var line = 0; line < 3; line++) {
|
// Update Dialog
|
||||||
|
var template3 = `<h6>Changelog:</h6> <hr> <ul>`
|
||||||
|
for (var line = 0; line < 5; line++) {
|
||||||
template3 += '<li>' + lines[line] + '</li>'
|
template3 += '<li>' + lines[line] + '</li>'
|
||||||
}
|
}
|
||||||
template3 += `</ul>`
|
template3 += `</ul>`
|
||||||
|
|
Ładowanie…
Reference in New Issue