Skip to content

Commit bdc853e

Browse files
committed
Fixed issue with M3 laser state changes and coincident targets.
[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.
1 parent f51268e commit bdc853e

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

doc/log/commit_log_v1.1.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
----------------
2+
Date: 2017-01-31
3+
Author: Sonny Jeon
4+
Subject: Additional build info in the $I printout.
5+
6+
- [new] Added total available planner buffer blocks (15 shown, but
7+
there are 16. one is used by the ring buffer and to execute system
8+
motions) and serial RX buffer bytes. This information is useful for
9+
GUIs to setup and optimize their streaming protocols easily.
10+
11+
[doc] Updated the interface document to reflect the change.
12+
13+
114
----------------
215
Date: 2017-01-29
316
Author: Sonny Jeon

grbl/grbl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
// Grbl versioning system
2525
#define GRBL_VERSION "1.1f"
26-
#define GRBL_VERSION_BUILD "20170131"
26+
#define GRBL_VERSION_BUILD "20170223"
2727

2828
// Define standard libraries used by Grbl.
2929
#include <avr/io.h>

grbl/motion_control.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ void mc_line(float *target, plan_line_data_t *pl_data)
6565
} while (1);
6666

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

7276

0 commit comments

Comments
 (0)