Skip to content

Commit

Permalink
Fixed issue with M3 laser state changes and coincident targets.
Browse files Browse the repository at this point in the history
[fix] When in M3 constant laser power mode, a change from G0 to G1
would not set the laser on, if G1 was passed with a coincident target.
Motion controller now checks for a coincident target situation and will
force a spindle sync when detected.
  • Loading branch information
chamnit committed Feb 23, 2017
1 parent f51268e commit bdc853e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
13 changes: 13 additions & 0 deletions doc/log/commit_log_v1.1.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
----------------
Date: 2017-01-31
Author: Sonny Jeon
Subject: Additional build info in the $I printout.

- [new] Added total available planner buffer blocks (15 shown, but
there are 16. one is used by the ring buffer and to execute system
motions) and serial RX buffer bytes. This information is useful for
GUIs to setup and optimize their streaming protocols easily.

[doc] Updated the interface document to reflect the change.


----------------
Date: 2017-01-29
Author: Sonny Jeon
Expand Down
2 changes: 1 addition & 1 deletion grbl/grbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

// Grbl versioning system
#define GRBL_VERSION "1.1f"
#define GRBL_VERSION_BUILD "20170131"
#define GRBL_VERSION_BUILD "20170223"

// Define standard libraries used by Grbl.
#include <avr/io.h>
Expand Down
8 changes: 6 additions & 2 deletions grbl/motion_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ void mc_line(float *target, plan_line_data_t *pl_data)
} while (1);

// Plan and queue motion into planner buffer
// uint8_t plan_status; // Not used in normal operation.
plan_buffer_line(target, pl_data);
if (plan_buffer_line(target, pl_data) == PLAN_EMPTY_BLOCK) {
if (bit_istrue(settings.flags,BITFLAG_LASER_MODE)) {
// Correctly set laser state, if there is a coincident position passed. Forces a buffer sync.
spindle_sync((pl_data->condition & (PL_COND_FLAG_SPINDLE_CW|PL_COND_FLAG_SPINDLE_CCW)), pl_data->spindle_speed);
}
}
}


Expand Down

0 comments on commit bdc853e

Please sign in to comment.