From edcbaf1a71171b2d3e01753494311b05c8b7d795 Mon Sep 17 00:00:00 2001
From: unknown
Date: Tue, 18 Jun 2024 21:46:49 +0200
Subject: [PATCH] v1.0.377
---
CHANGELOG.txt | 6 ++++++
app/js/grbl-settings-templates.js | 6 +++---
app/js/websocket.js | 5 +++++
index.js | 29 +++++++++++++++++++----------
package.json | 2 +-
5 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 502d91a..8aac25c 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,9 @@
+v1.0.377:
+- Fixed Grbl Settings Description for $14, $486
+- Fixed USB descriptor for Pico
+- Removed remaining Smoothieware leftovers
+- Re-Enabled DTR toggle for native USB support
+
v1.0.376:
- Updated installer End User License Agreement
v1.0.375:
diff --git a/app/js/grbl-settings-templates.js b/app/js/grbl-settings-templates.js
index 6b2a63c..8405e8a 100644
--- a/app/js/grbl-settings-templates.js
+++ b/app/js/grbl-settings-templates.js
@@ -403,8 +403,8 @@ var grblSettingsTemplate2 = {
},
14: {
key: `$14`,
- title: `Limit pins invert, mask`,
- description: ``,
+ title: `Invert control input signals, mask`,
+ description: ` = bitmask where bit 0 = reset, 1 = feed hold, 2 = cycle start, 3 = safety door, 4 = block delete, 5 = stop disable, 6 = e-stop, 7 = probe connected`,
template: ``,
utils: ``
},
@@ -874,7 +874,7 @@ var grblSettingsTemplate2 = {
},
486: {
key: `$486`,
- title: `Unlock required after E-Stop as boolean`,
+ title: `Lock coordinate systems as bitfield`,
description: `Lock coordinate systems against accidental changes. 0 - G59.1 (1) / 1 - G59.2 (2) / 2 - G59.3 (4)`,
template: ``,
utils: ``
diff --git a/app/js/websocket.js b/app/js/websocket.js
index 288c417..ebf4d86 100644
--- a/app/js/websocket.js
+++ b/app/js/websocket.js
@@ -1266,6 +1266,11 @@ function friendlyPort(i) {
img = 'silabs.png';
note = 'Silicon Labs USB to UART';
}
+ if (laststatus.comms.interfaces.ports[i].productId == '000A' && laststatus.comms.interfaces.ports[i].vendorId == '2E8A') {
+ // found CP2102
+ img = 'pipico.png';
+ note = 'Raspberry Pi Pico CDC AURT';
+ }
if (laststatus.comms.interfaces.ports[i].productId == '2303' && laststatus.comms.interfaces.ports[i].vendorId == '067B') {
// found CP2102
// img = 'nodemcu.png';
diff --git a/index.js b/index.js
index 5d13bdc..3aacd6b 100644
--- a/index.js
+++ b/index.js
@@ -1131,17 +1131,15 @@ io.on("connection", function(socket) {
if (status.comms.connectionStatus < 1) {
-
-
if (data.type == "usb") {
console.log("connect", "Connecting to " + data.port + " via " + data.type);
- // Fix for autoreset getting stuck on MacOS with Silabs Chip
+
var allowRtsCts = false
var allowHupcl = false
if (process.platform == 'darwin') {
- allowRtsCts = true
- allowHupcl = true
+ allowRtsCts = true // Fix for autoreset getting stuck on MacOS with Silabs Chip
+ allowHupcl = true // Fix for autoreset getting stuck on MacOS with Silabs Chip
}
port = new SerialPort({
@@ -1207,6 +1205,7 @@ io.on("connection", function(socket) {
}); // end port.onclose
function portOpened(port, data) {
+
debug_log("PORT INFO: Connected to " + port.path + " at " + port.baudRate);
var output = {
'command': 'connect',
@@ -1219,6 +1218,7 @@ io.on("connection", function(socket) {
addQRealtime("\n"); // this causes smoothie and grblHAL to send the welcome string
+
var output = {
'command': 'connect',
'response': "Attempting to detect Controller (1): (Autoreset)",
@@ -1226,6 +1226,7 @@ io.on("connection", function(socket) {
}
io.sockets.emit('data', output);
+
setTimeout(function() { //wait for controller to be ready
if (status.machine.firmware.type.length < 1) {
debug_log("Didnt detect firmware after AutoReset. Lets see if we have Grbl instance with a board that doesnt have AutoReset");
@@ -1242,20 +1243,28 @@ io.on("connection", function(socket) {
setTimeout(function() { //wait for controller to be ready
if (status.machine.firmware.type.length < 1) {
- debug_log("No firmware yet, probably not Grbl then. lets see if we have Smoothie?");
+ debug_log("Didnt detect firmware after AutoReset or Ctrl+X. Lets try toggling DTR");
var output = {
'command': 'connect',
- 'response': "Attempting to detect Controller (3): (others)",
+ 'response': "Attempting to detect Controller (3): (DTR Enable)",
'type': 'info'
}
io.sockets.emit('data', output);
- addQRealtime("version\n"); // Check if it's Smoothieware?
- debug_log("Sent: version");
+
+ // toggle DTR on
+ port.set({
+ "dtr": true
+ }, console.log("Set DTR"));
+ // then try Ctrl+X again
+ setTimeout(function() {
+ addQRealtime(String.fromCharCode(0x18)); // ctrl-x (needed for rx/tx connection)
+ debug_log("Sent: Ctrl+x after DTR toggle");
+ }, 200);
}
}, config.grblWaitTime * 2000);
- setTimeout(function() {
+ setTimeout(function() {
if (status.machine.firmware.type.length > 1) {
if (status.machine.firmware.type === "grbl") {
debug_log("GRBL detected");
diff --git a/package.json b/package.json
index 28c4b49..72ac16a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "OpenBuildsCONTROL",
- "version": "1.0.376",
+ "version": "1.0.377",
"license": "AGPL-3.0",
"description": "OpenBuildsCONTROL CNC Machine Host Software",
"author": "github.com/openbuilds ",