From 6bf6736ae74a4e528d46eee5ff9fe61fc2f134c0 Mon Sep 17 00:00:00 2001 From: openbuilds-engineer Date: Wed, 10 Oct 2018 20:36:56 +0200 Subject: [PATCH] Added test-case for non-arduino-compliant boards which has AutoReset disabled in hardware like PhoenixCNC etc --- index.js | 11 ++++++++++- package.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a6cb85b..c68d276 100644 --- a/index.js +++ b/index.js @@ -671,13 +671,22 @@ io.on("connection", function(socket) { } else { addQRealtime("\n"); // this causes smoothie to send the welcome string } + setTimeout(function() { //wait for controller to be ready + if (status.machine.firmware.type.length < 1) { + console.log("Lets see if we have Grbl instance with a board that doesnt have AutoReset"); + addQRealtime(String.fromCharCode(0x18)); // ctrl-x (needed for rx/tx connection) + console.log("Sent: Ctrl+x"); + } + }, config.grblWaitTime * 1000); + setTimeout(function() { //wait for controller to be ready if (status.machine.firmware.type.length < 1) { console.log("No GRBL, lets see if we have Smoothie?"); addQRealtime("version\n"); // Check if it's Smoothieware? console.log("Sent: version"); } - }, config.grblWaitTime * 1000); + }, config.grblWaitTime * 2000); + if (config.firmwareWaitTime > 0) { setTimeout(function() { // Close port if we don't detect supported firmware after 2s. diff --git a/package.json b/package.json index e67c114..09593d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "OpenBuildsMachineDriver", - "version": "1.0.101", + "version": "1.0.102", "license": "AGPL-3.0", "description": "Machine Interface Driver for OpenBuilds", "author": "github.com/openbuilds ",