Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added code to handle the break command sent by GRBL once serial conne… #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mglotzbach
Copy link

GRBL firmware seems to issue a serial break once the connection is established. This would leave the chrome serial service in a paused state. By simply unpausing the serial service, grbl firmware continues to work as expected.

@mglotzbach
Copy link
Author

One clarification... I am using GRBL 1.1 on a CNC xPro V3 controller. Unsure if the break is unique to GRBL or just this revision.

@@ -230,8 +230,12 @@ app.service('machineService', function($rootScope, $timeout, warningService) {

// Log errors
chrome.serial.onReceiveError.addListener(function(info) {
if (info.error === "break") {
chrome.serial.setPaused(info.connectionId, false, function() {});
} else {
warningService.warn("connection", "error with serial communication: " + info.error);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Please indent this block you've surrounded.

@@ -230,8 +230,12 @@ app.service('machineService', function($rootScope, $timeout, warningService) {

// Log errors
chrome.serial.onReceiveError.addListener(function(info) {
if (info.error === "break") {
chrome.serial.setPaused(info.connectionId, false, function() {});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be appropriate to still log the error to the console so it's clear that this condition is being encountered in the logs. See line 21 for an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants