diff options
author | midopple <mdoppler@gmx.at> | 2012-02-01 21:21:23 +0100 |
---|---|---|
committer | midopple <mdoppler@gmx.at> | 2012-02-01 21:21:23 +0100 |
commit | da6a2e0436a3878296b665bf2a4f75caa1e2bcb7 (patch) | |
tree | 90e11599341f9ae3563a1dd7fc26f7187400e3ad /Sprinter | |
parent | 2ffe5ec2b5ecb390eb8ffacc584b614b2263bdf4 (diff) |
Check Uart Puffer while circle processing (CMD: G2 / G3)
Diffstat (limited to 'Sprinter')
-rw-r--r-- | Sprinter/arc_func.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Sprinter/arc_func.cpp b/Sprinter/arc_func.cpp index 03b6d1f..211d3dd 100644 --- a/Sprinter/arc_func.cpp +++ b/Sprinter/arc_func.cpp @@ -104,6 +104,12 @@ void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8 for (i = 1; i<segments; i++) { // Increment (segments-1) + if((count == 10) || (count == 15)) + { + //Read the next two Commands while arc is calculating + check_buffer_while_arc(); + } + if (count < N_ARC_CORRECTION) //25 pieces { // Apply vector rotation matrix @@ -129,13 +135,10 @@ void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8 arc_target[axis_linear] += linear_per_segment; arc_target[E_AXIS] += extruder_per_segment; - //showString(PSTR("sec:")); - //Serial.println(i); plan_buffer_line(arc_target[X_AXIS], arc_target[Y_AXIS], arc_target[Z_AXIS], arc_target[E_AXIS], feed_rate); } // Ensure last segment arrives at target location. - //showString(PSTR("Last sec\r\n")); plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], feed_rate); // plan_set_acceleration_manager_enabled(acceleration_manager_was_enabled); |