interface
openbuilds-engineer 2020-11-09 21:35:02 +02:00
rodzic cc19013943
commit 71adf60acf
4 zmienionych plików z 101 dodań i 41 usunięć

Wyświetl plik

@ -1,4 +1,5 @@
v1.0.255: Fixed an typo in Probe wizard v1.0.256: Enhanced Continuous Jog to prevent running
v1.0.255: Fixed an typo in Probe wizard, test of Soft Limits calculation Changes
v1.0.254: Fixed Continous Jog calculation bug v1.0.254: Fixed Continous Jog calculation bug
v1.0.253: Fix 3D Viewer Bug with Fusion outputs #157 v1.0.253: Fix 3D Viewer Bug with Fusion outputs #157
v1.0.252: Fix for hold:0 status on jog with soft-limits v1.0.252: Fix for hold:0 status on jog with soft-limits

Wyświetl plik

@ -360,7 +360,7 @@ $(document).ready(function() {
$('.xM').on('touchstart mousedown', function(ev) { $('.xM').on('touchstart mousedown', function(ev) {
ev.preventDefault(); ev.preventDefault();
if (allowContinuousJog) { // startJog(); if (allowContinuousJog) { // startJog();
if (!waitingForStatus && laststatus.comms.runStatus == "Idle") { if (!waitingForStatus && laststatus.comms.runStatus !== "Jog") {
var direction = "X-"; var direction = "X-";
var distance = 1000; var distance = 1000;
@ -370,14 +370,22 @@ $(document).ready(function() {
var mindistance = parseInt(grblParams.$130) var mindistance = parseInt(grblParams.$130)
var maxdistance = 0; // Grbl all negative coordinates var maxdistance = 0; // Grbl all negative coordinates
// Negative move: // Negative move:
distance = (mindistance + (parseFloat(laststatus.machine.position.offset.x) + parseFloat(laststatus.machine.position.work.x))) - 5 distance = (mindistance + (parseFloat(laststatus.machine.position.offset.x) + parseFloat(laststatus.machine.position.work.x))) - 1
distance = distance.toFixed(3);
if (distance < 1) {
toastJogWillHit("X-");
}
} }
} }
var feed = $('#jograte').val(); var feed = $('#jograte').val();
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n"); if (distance >= 1) {
continuousJogRunning = true; socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
waitingForStatus = true; continuousJogRunning = true;
$('.xM').click(); waitingForStatus = true;
$('.xM').click();
}
} else {
toastJogNotIdle();
} }
} else { } else {
var feedrate = $('#jograte').val(); var feedrate = $('#jograte').val();
@ -397,7 +405,7 @@ $(document).ready(function() {
// console.log("xp down") // console.log("xp down")
ev.preventDefault(); ev.preventDefault();
if (allowContinuousJog) { // startJog(); if (allowContinuousJog) { // startJog();
if (!waitingForStatus && laststatus.comms.runStatus == "Idle") { if (!waitingForStatus && laststatus.comms.runStatus !== "Jog") {
var direction = "X"; var direction = "X";
var distance = 1000; var distance = 1000;
if (Object.keys(grblParams).length > 0) { if (Object.keys(grblParams).length > 0) {
@ -406,14 +414,22 @@ $(document).ready(function() {
var mindistance = parseInt(grblParams.$130) var mindistance = parseInt(grblParams.$130)
var maxdistance = 0; // Grbl all negative coordinates var maxdistance = 0; // Grbl all negative coordinates
// Positive move: // Positive move:
distance = (maxdistance - (parseFloat(laststatus.machine.position.offset.x) + parseFloat(laststatus.machine.position.work.x))) - 5 distance = (maxdistance - (parseFloat(laststatus.machine.position.offset.x) + parseFloat(laststatus.machine.position.work.x))) - 1
distance = distance.toFixed(3);
if (distance < 1) {
toastJogWillHit("X+");
}
} }
} }
var feed = $('#jograte').val(); var feed = $('#jograte').val();
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n"); if (distance >= 1) {
continuousJogRunning = true; socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
waitingForStatus = true; continuousJogRunning = true;
$('.xP').click(); waitingForStatus = true;
$('.xP').click();
}
} else {
toastJogNotIdle();
} }
} else { } else {
var feedrate = $('#jograte').val(); var feedrate = $('#jograte').val();
@ -433,7 +449,7 @@ $(document).ready(function() {
$('.yM').on('touchstart mousedown', function(ev) { $('.yM').on('touchstart mousedown', function(ev) {
ev.preventDefault(); ev.preventDefault();
if (allowContinuousJog) { // startJog(); if (allowContinuousJog) { // startJog();
if (!waitingForStatus && laststatus.comms.runStatus == "Idle") { if (!waitingForStatus && laststatus.comms.runStatus !== "Jog") {
var direction = "Y-"; var direction = "Y-";
var distance = 1000; var distance = 1000;
@ -443,15 +459,23 @@ $(document).ready(function() {
var mindistance = parseInt(grblParams.$131) var mindistance = parseInt(grblParams.$131)
var maxdistance = 0; // Grbl all negative coordinates var maxdistance = 0; // Grbl all negative coordinates
// Negative move: // Negative move:
distance = (mindistance + (parseFloat(laststatus.machine.position.offset.y) + parseFloat(laststatus.machine.position.work.y))) - 5 distance = (mindistance + (parseFloat(laststatus.machine.position.offset.y) + parseFloat(laststatus.machine.position.work.y))) - 1
distance = distance.toFixed(3);
if (distance < 1) {
toastJogWillHit("Y-");
}
} }
} }
var feed = $('#jograte').val(); var feed = $('#jograte').val();
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n"); if (distance >= 1) {
continuousJogRunning = true; socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
waitingForStatus = true; continuousJogRunning = true;
$('.yM').click(); waitingForStatus = true;
$('.yM').click();
}
} else {
toastJogNotIdle();
} }
} else { } else {
var feedrate = $('#jograte').val(); var feedrate = $('#jograte').val();
@ -470,7 +494,7 @@ $(document).ready(function() {
$('.yP').on('touchstart mousedown', function(ev) { $('.yP').on('touchstart mousedown', function(ev) {
ev.preventDefault(); ev.preventDefault();
if (allowContinuousJog) { // startJog(); if (allowContinuousJog) { // startJog();
if (!waitingForStatus && laststatus.comms.runStatus == "Idle") { if (!waitingForStatus && laststatus.comms.runStatus !== "Jog") {
var direction = "Y"; var direction = "Y";
var distance = 1000; var distance = 1000;
@ -480,15 +504,23 @@ $(document).ready(function() {
var mindistance = parseInt(grblParams.$131) var mindistance = parseInt(grblParams.$131)
var maxdistance = 0; // Grbl all negative coordinates var maxdistance = 0; // Grbl all negative coordinates
// Positive move: // Positive move:
distance = (maxdistance - (parseFloat(laststatus.machine.position.offset.y) + parseFloat(laststatus.machine.position.work.y))) - 5 distance = (maxdistance - (parseFloat(laststatus.machine.position.offset.y) + parseFloat(laststatus.machine.position.work.y))) - 1
distance = distance.toFixed(3);
if (distance < 1) {
toastJogWillHit("Y+");
}
} }
} }
var feed = $('#jograte').val(); var feed = $('#jograte').val();
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n"); if (distance >= 1) {
continuousJogRunning = true; socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
waitingForStatus = true; continuousJogRunning = true;
$('#yP').click(); waitingForStatus = true;
$('#yP').click();
}
} else {
toastJogNotIdle();
} }
} else { } else {
var feedrate = $('#jograte').val(); var feedrate = $('#jograte').val();
@ -507,7 +539,7 @@ $(document).ready(function() {
$('.zM').on('touchstart mousedown', function(ev) { $('.zM').on('touchstart mousedown', function(ev) {
ev.preventDefault(); ev.preventDefault();
if (allowContinuousJog) { // startJog(); if (allowContinuousJog) { // startJog();
if (!waitingForStatus && laststatus.comms.runStatus == "Idle") { if (!waitingForStatus && laststatus.comms.runStatus !== "Jog") {
var direction = "Z-"; var direction = "Z-";
var distance = 1000; var distance = 1000;
@ -517,15 +549,23 @@ $(document).ready(function() {
var mindistance = parseInt(grblParams.$132) var mindistance = parseInt(grblParams.$132)
var maxdistance = 0; // Grbl all negative coordinates var maxdistance = 0; // Grbl all negative coordinates
// Negative move: // Negative move:
distance = (mindistance + (parseFloat(laststatus.machine.position.offset.z) + parseFloat(laststatus.machine.position.work.z))) - 5 distance = (mindistance + (parseFloat(laststatus.machine.position.offset.z) + parseFloat(laststatus.machine.position.work.z))) - 1
distance = distance.toFixed(3);
if (distance < 1) {
toastJogWillHit("Z-");
}
} }
} }
var feed = $('#jograte').val(); var feed = $('#jograte').val();
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n"); if (distance >= 1) {
continuousJogRunning = true; socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
waitingForStatus = true; continuousJogRunning = true;
$('.zM').click(); waitingForStatus = true;
$('.zM').click();
}
} else {
toastJogNotIdle();
} }
} else { } else {
var feedrate = $('#jograte').val(); var feedrate = $('#jograte').val();
@ -544,7 +584,7 @@ $(document).ready(function() {
$('.zP').on('touchstart mousedown', function(ev) { $('.zP').on('touchstart mousedown', function(ev) {
ev.preventDefault(); ev.preventDefault();
if (allowContinuousJog) { // startJog(); if (allowContinuousJog) { // startJog();
if (!waitingForStatus && laststatus.comms.runStatus == "Idle") { if (!waitingForStatus && laststatus.comms.runStatus !== "Jog") {
var direction = "Z"; var direction = "Z";
var distance = 1000; var distance = 1000;
@ -554,15 +594,22 @@ $(document).ready(function() {
var mindistance = parseInt(grblParams.$132) var mindistance = parseInt(grblParams.$132)
var maxdistance = 0; // Grbl all negative coordinates var maxdistance = 0; // Grbl all negative coordinates
// Positive move: // Positive move:
distance = (maxdistance - (parseFloat(laststatus.machine.position.offset.z) + parseFloat(laststatus.machine.position.work.z))) - 5 distance = (maxdistance - (parseFloat(laststatus.machine.position.offset.z) + parseFloat(laststatus.machine.position.work.z))) - 1
distance = distance.toFixed(3);
if (distance < 1) {
toastJogWillHit("Z+");
}
} }
} }
var feed = $('#jograte').val(); var feed = $('#jograte').val();
socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n"); if (distance >= 1) {
continuousJogRunning = true; socket.emit('runCommand', "$J=G91 G21 " + direction + distance + " F" + feed + "\n");
waitingForStatus = true; continuousJogRunning = true;
$('.zP').click(); waitingForStatus = true;
$('.zP').click();
}
} else {
toastJogNotIdle();
} }
} else { } else {
var feedrate = $('#jograte').val(); var feedrate = $('#jograte').val();
@ -706,4 +753,16 @@ function home() {
} else if (laststatus != undefined && laststatus.machine.firmware.type == 'smoothie') { } else if (laststatus != undefined && laststatus.machine.firmware.type == 'smoothie') {
sendGcode('G28') sendGcode('G28')
} }
}
function toastJogWillHit(axis) {
printLog("<span class='fg-red'>[ jog ] </span><span class='fg-green'>Unable to jog toward " + axis + ", will hit soft-limit</span>")
var toast = Metro.toast.create;
toast("Unable to jog toward " + axis + ", will hit soft-limit", null, 1000, "bg-darkRed fg-white")
}
function toastJogNotIdle(axis) {
printLog("<span class='fg-red'>[ jog ] </span><span class='fg-green'>Wait for machine to be Idle, before jogging</span>")
var toast = Metro.toast.create;
toast("Wait for machine to be Idle, before jogging", null, 1000, "bg-darkRed fg-white")
} }

Wyświetl plik

@ -578,7 +578,7 @@ io.on("connection", function(socket) {
// jogWindow.setOverlayIcon(nativeImage.createFromPath(iconAlarm), 'Alarm'); // jogWindow.setOverlayIcon(nativeImage.createFromPath(iconAlarm), 'Alarm');
// } // }
// } // }
}, 100); }, 50);
@ -979,7 +979,7 @@ io.on("connection", function(socket) {
if (status.comms.connectionStatus > 0) { if (status.comms.connectionStatus > 0) {
addQRealtime("?"); addQRealtime("?");
} }
}, 100); }, 50);
} else if (data.indexOf("LPC176") >= 0) { // LPC1768 or LPC1769 should be Smoothieware } else if (data.indexOf("LPC176") >= 0) { // LPC1768 or LPC1769 should be Smoothieware
status.comms.blocked = false; status.comms.blocked = false;
debug_log("Smoothieware detected"); debug_log("Smoothieware detected");

Wyświetl plik

@ -1,6 +1,6 @@
{ {
"name": "OpenBuildsCONTROL", "name": "OpenBuildsCONTROL",
"version": "1.0.255", "version": "1.0.256",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"description": "OpenBuildsCONTROL CNC Machine Interface Software", "description": "OpenBuildsCONTROL CNC Machine Interface Software",
"author": "github.com/openbuilds <webmaster@openbuilds.com>", "author": "github.com/openbuilds <webmaster@openbuilds.com>",