Commit 884f7c7 1 parent 95b7023 commit 884f7c7 Copy full SHA for 884f7c7
File tree 1 file changed +16
-2
lines changed
Marlin/src/feature/bedlevel/ubl
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 36
36
#include " ../../../MarlinCore.h"
37
37
#include < math.h>
38
38
39
+ // #define DEBUG_UBL_MOTION
40
+ #define DEBUG_OUT ENABLED (DEBUG_UBL_MOTION)
41
+ #include " ../../../core/debug_out.h"
42
+
39
43
#if !UBL_SEGMENTED
40
44
45
+ // TODO: The first and last parts of a move might result in very short segment(s)
46
+ // after getting split on the cell boundary, so moves like that should not
47
+ // get split. This will be most common for moves that start/end near the
48
+ // corners of cells. To fix the issue, simply check if the start/end of the line
49
+ // is very close to a cell boundary in advance and don't split the line there.
50
+
41
51
void unified_bed_leveling::line_to_destination_cartesian (const_feedRate_t scaled_fr_mm_s, const uint8_t extruder) {
42
52
/* *
43
53
* Much of the nozzle movement will be within the same cell. So we will do as little computation
176
186
dest.z += z0;
177
187
planner.buffer_segment (dest, scaled_fr_mm_s, extruder);
178
188
179
- } // else printf("FIRST MOVE PRUNED ");
189
+ }
190
+ else
191
+ DEBUG_ECHOLNPGM (" [ubl] skip Y segment" );
180
192
}
181
193
182
194
// At the final destination? Usually not, but when on a Y Mesh Line it's completed.
225
237
dest.z += z0;
226
238
if (!planner.buffer_segment (dest, scaled_fr_mm_s, extruder)) break ;
227
239
228
- } // else printf("FIRST MOVE PRUNED ");
240
+ }
241
+ else
242
+ DEBUG_ECHOLNPGM (" [ubl] skip Y segment" );
229
243
}
230
244
231
245
if (xy_pos_t (current_position) != xy_pos_t (end))
You can’t perform that action at this time.
0 commit comments