From 9ce2a7bef6a838eba6ffd4d3e3e9fe6dff3160c2 Mon Sep 17 00:00:00 2001
From: openbuilds-engineer
Date: Thu, 11 Feb 2021 20:30:00 +0200
Subject: [PATCH] v1.0.283
---
CHANGELOG.txt | 1 +
app/js/jog.js | 12 ++++++------
app/js/websocket.js | 2 ++
index.js | 19 ++++++++++++++-----
package.json | 2 +-
5 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f15a4c4..dda65dd 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,4 @@
+v1.0.283: Fixed realtime feedrate indicator
v1.0.282: Improved logging messages for Interface Firmware flashing tool, Fixed bug with non-standard Grbl Firmwares that have Variable Speed disabled
v1.0.281: Added "Restore Backup" button for Grbl Settings, Fixed jog increment for mm after switching between in/mm
v1.0.280: Socket.IO Bug fixed
diff --git a/app/js/jog.js b/app/js/jog.js
index c85d3b6..69f41f0 100644
--- a/app/js/jog.js
+++ b/app/js/jog.js
@@ -375,7 +375,7 @@ $(document).ready(function() {
}
}
if (allowContinuousJog) { // startJog();
- if (!waitingForStatus && laststatus.comms.runStatus == "Idle") {
+ if (!waitingForStatus && laststatus.comms.runStatus == "Idle" || laststatus.comms.runStatus == "Door:0") {
var direction = "X-";
var distance = 1000;
@@ -428,7 +428,7 @@ $(document).ready(function() {
}
}
if (allowContinuousJog) { // startJog();
- if (!waitingForStatus && laststatus.comms.runStatus == "Idle") {
+ if (!waitingForStatus && laststatus.comms.runStatus == "Idle" || laststatus.comms.runStatus == "Door:0") {
var direction = "X";
var distance = 1000;
if (hasSoftLimits) {
@@ -479,7 +479,7 @@ $(document).ready(function() {
}
}
if (allowContinuousJog) { // startJog();
- if (!waitingForStatus && laststatus.comms.runStatus == "Idle") {
+ if (!waitingForStatus && laststatus.comms.runStatus == "Idle" || laststatus.comms.runStatus == "Door:0") {
var direction = "Y-";
var distance = 1000;
@@ -531,7 +531,7 @@ $(document).ready(function() {
}
}
if (allowContinuousJog) { // startJog();
- if (!waitingForStatus && laststatus.comms.runStatus == "Idle") {
+ if (!waitingForStatus && laststatus.comms.runStatus == "Idle" || laststatus.comms.runStatus == "Door:0") {
var direction = "Y";
var distance = 1000;
@@ -583,7 +583,7 @@ $(document).ready(function() {
}
}
if (allowContinuousJog) { // startJog();
- if (!waitingForStatus && laststatus.comms.runStatus == "Idle") {
+ if (!waitingForStatus && laststatus.comms.runStatus == "Idle" || laststatus.comms.runStatus == "Door:0") {
var direction = "Z-";
var distance = 1000;
@@ -635,7 +635,7 @@ $(document).ready(function() {
}
}
if (allowContinuousJog) { // startJog();
- if (!waitingForStatus && laststatus.comms.runStatus == "Idle") {
+ if (!waitingForStatus && laststatus.comms.runStatus == "Idle" || laststatus.comms.runStatus == "Door:0") {
var direction = "Z";
var distance = 1000;
diff --git a/app/js/websocket.js b/app/js/websocket.js
index 3c1496b..c9c9707 100644
--- a/app/js/websocket.js
+++ b/app/js/websocket.js
@@ -598,6 +598,8 @@ function initSocket() {
//$("#realSpeed").html(("S=" + status.machine.overrides.realSpindle / 25.4).toFixed(0) + "in/min");
}
+ console.log(JSON.stringify(status.machine.overrides, null, 4));
+
// Windows Power Management
if (status.driver.operatingsystem == "windows") {
diff --git a/index.js b/index.js
index 1e178e8..f574ba0 100644
--- a/index.js
+++ b/index.js
@@ -2076,8 +2076,8 @@ function parseFeedback(data) {
}
}
// Extract realtime Feed and Spindle (for Grbl > v1.1 only!)
- var startFS = data.search(/FS:/i) + 3;
- if (startFS > 3) {
+ var startFS = data.search(/\|FS:/i) + 4;
+ if (startFS > 4) {
var fs = data.replace(">", "").substr(startFS).split(/,|\|/);
if (Array.isArray(fs)) {
if (fs[0]) {
@@ -2090,9 +2090,10 @@ function parseFeedback(data) {
}
// extras realtime feed (if variable spindle is disabled)
- var startF = data.search(/F:/i) + 2;
- if (startF > 2) {
+ var startF = data.search(/\|F:/i) + 3;
+ if (startF > 3) {
var f = data.replace(">", "").substr(startF).split(/,|\|/);
+ console.log(JSON.stringify(f, null, 4))
if (Array.isArray(f)) {
if (f[0]) {
status.machine.overrides.realFeed = parseInt(f[0]);
@@ -2107,7 +2108,7 @@ function parseFeedback(data) {
var pins = pinsdata[0].split('')
status.machine.inputs = pins;
if (!_.isEqual(pins, oldpinslist)) {
- if (pins.includes('H') || pins.includes('D')) {
+ if (pins.includes('H')) {
// pause
pause();
var output = {
@@ -2118,6 +2119,14 @@ function parseFeedback(data) {
io.sockets.emit('data', output);
} // end if HOLD
+ if (pins.includes('D')) {
+ // pause
+ pause();
+
+ } else {
+ unpause();
+ }
+
if (pins.includes('R')) {
// abort
stop(true);
diff --git a/package.json b/package.json
index d4449ac..2b77101 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "OpenBuildsCONTROL",
- "version": "1.0.282",
+ "version": "1.0.283",
"license": "AGPL-3.0",
"description": "OpenBuildsCONTROL CNC Machine Interface Software",
"author": "github.com/openbuilds ",