From a6fbd4a5d84df26facfa24f3fa3745748e9d0eb4 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Thu, 24 Nov 2016 21:17:25 +0100 Subject: [PATCH 1/4] Distribute GLCD screen updates in time Currently we draw and send the screens for a graphical LCD all at once. We draw in two or four parts but draw them directly behind each other. For the tested status screen this takes 59-62ms in a single block. During this time nothing else (except the interrupts) can be done. When printing a sequence of very short moves the buffer drains - sometimes until it's empty. This PR splits the screen update into parts. Currently we have 10 time slots. During the first one the complete screen is drawn. (60,0,0,0,0,0,0,0,0,0,0) Here i introduce pauses for doing other things. (30,30,0,0,0,0,0,0) or (15,15,15,15,0,0,0,0,0,0) Drawing in consecutive time slots prevents from lagging too much. Even with a 4 stripe display all the drawing is done after 400ms. Previous experiments with a even better distribution of the time slots like (30,0,0,0,0,30,0,0,0,0) and (15,0,15,0,15,0,15,0,0,0) did not feel good when using the menu, because of too much lag. Because of the previous PRs to speed up the display updates and especially reducing the difference between drawing 2 or 4 stripes, it now makes sense for the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER to go from 2 to 4 stripes. This costs about 1-2ms per complete screen update, but is payed back by having partial updates lasting only the half time and two additional brakes. Also ~256 byte of framebuffer are saved in RAM. 13:45:59.213 : echo: #:17 >:13 s:30; #:16 >:13 s:29; S#:33 S>:26 S:59 13:46:00.213 : echo: #:16 >:14 s:30; #:17 >:13 s:30; S#:33 S>:27 S:60 13:46:01.215 : echo: #:17 >:13 s:30; #:16 >:13 s:29; S#:33 S>:26 S:59 13:46:02.215 : echo: #:16 >:13 s:29; #:16 >:14 s:30; S#:32 S>:27 S:59 13:46:03.214 : echo: #:17 >:13 s:30; #:17 >:13 s:30; S#:34 S>:26 S:60 13:46:04.214 : echo: #:16 >:13 s:29; #:16 >:14 s:30; S#:32 S>:27 S:59 13:46:05.212 : echo: #:16 >:14 s:30; #:17 >:13 s:30; S#:33 S>:27 S:60 13:46:06.212 : echo: #:17 >:13 s:30; #:16 >:13 s:29; S#:33 S>:26 S:59 03:30:36.779 : echo: #:8 >:7 s:15; #:10 >:7 s:17; #:8 >:6 s:14; #:8 >:7 s:15; S#:34 S>:27 S:61 03:30:37.778 : echo: #:8 >:6 s:14; #:10 >:7 s:17; #:9 >:7 s:16; #:8 >:6 s:14; S#:35 S>:26 S:61 03:30:38.778 : echo: #:8 >:6 s:14; #:11 >:7 s:18; #:8 >:6 s:14; #:8 >:7 s:15; S#:35 S>:26 S:61 03:30:39.777 : echo: #:8 >:6 s:14; #:10 >:7 s:17; #:8 >:8 s:16; #:8 >:6 s:14; S#:34 S>:27 S:61 03:30:40.780 : echo: #:8 >:6 s:14; #:11 >:7 s:18; #:8 >:6 s:14; #:8 >:6 s:14; S#:35 S>:25 S:60 03:30:41.780 : echo: #:9 >:6 s:15; #:10 >:7 s:17; #:8 >:6 s:14; #:9 >:6 s:15; S#:36 S>:25 S:61 03:30:42.779 : echo: #:8 >:6 s:14; #:10 >:8 s:18; #:8 >:6 s:14; #:8 >:6 s:14; S#:34 S>:26 S:60 03:30:43.778 : echo: #:9 >:6 s:15; #:10 >:7 s:17; #:8 >:7 s:15; #:9 >:6 s:15; S#:36 S>:26 S:62 #: draw a stripe >: transfer a stripe s: sum of of draw and transfer for one stripe S#: sum of draws for a complete screen S>: sum of transfers for a complete screen S: time to draw and transfer a complete screen --- Marlin/ultralcd.cpp | 96 +++++++++++++++++------------ Marlin/ultralcd_impl_DOGM.h | 2 +- Marlin/ultralcd_st7920_u8glib_rrd.h | 4 +- 3 files changed, 59 insertions(+), 43 deletions(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 2aa5055b66..dda4418f0e 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -64,6 +64,9 @@ void lcd_status_screen(); millis_t next_lcd_update_ms; uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to draw, decrements after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial) +#if ENABLED(DOGLCD) + bool drawing_screen = false; +#endif #if ENABLED(DAC_STEPPER_CURRENT) #include "stepper_dac.h" //was dac_mcp4728.h MarlinMain uses stepper dac for the m-codes @@ -413,6 +416,9 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to #endif lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; screen_changed = true; + #if ENABLED(DOGLCD) + drawing_screen = false; + #endif } } @@ -2832,6 +2838,9 @@ void lcd_update() { encoderPosition += (encoderDiff * encoderMultiplier) / ENCODER_PULSES_PER_STEP; encoderDiff = 0; + #if ENABLED(DOGLCD) + drawing_screen = false; // refresh the complete screen for a encoder change (different menu-item/value) + #endif } return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; lcdDrawUpdate = LCDVIEW_REDRAW_NOW; @@ -2864,20 +2873,28 @@ void lcd_update() { if (LCD_HANDLER_CONDITION) { - if (lcdDrawUpdate) { - - switch (lcdDrawUpdate) { - case LCDVIEW_CALL_NO_REDRAW: - lcdDrawUpdate = LCDVIEW_NONE; - break; - case LCDVIEW_CLEAR_CALL_REDRAW: // set by handlers, then altered after (rarely occurs here) - case LCDVIEW_CALL_REDRAW_NEXT: // set by handlers, then altered after (never occurs here?) - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT - case LCDVIEW_NONE: - break; - } // switch - + #if ENABLED(DOGLCD) + if (lcdDrawUpdate || drawing_screen) + #else + if (lcdDrawUpdate) + #endif + { + #if ENABLED(DOGLCD) + if (!drawing_screen) + #endif + { + switch (lcdDrawUpdate) { + case LCDVIEW_CALL_NO_REDRAW: + lcdDrawUpdate = LCDVIEW_NONE; + break; + case LCDVIEW_CLEAR_CALL_REDRAW: // set by handlers, then altered after (rarely occurs here) + case LCDVIEW_CALL_REDRAW_NEXT: // set by handlers, then altered after (never occurs here?) + lcdDrawUpdate = LCDVIEW_REDRAW_NOW; + case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT + case LCDVIEW_NONE: + break; + } // switch + } #if ENABLED(ULTIPANEL) #define CURRENTSCREEN() (*currentScreen)(), lcd_clicked = false #else @@ -2885,17 +2902,13 @@ void lcd_update() { #endif #if ENABLED(DOGLCD) // Changes due to different driver architecture of the DOGM display - static int8_t dot_color = 0; - dot_color = 1 - dot_color; - u8g.firstPage(); - do { - lcd_setFont(FONT_MENU); - u8g.setPrintPos(125, 0); - u8g.setColorIndex(dot_color); // Set color for the alive dot - u8g.drawPixel(127, 63); // draw alive dot - u8g.setColorIndex(1); // black on white - CURRENTSCREEN(); - } while (u8g.nextPage()); + if (!drawing_screen) { + u8g.firstPage(); + drawing_screen = 1; + } + lcd_setFont(FONT_MENU); + CURRENTSCREEN(); + if (drawing_screen && (drawing_screen = u8g.nextPage())) return; #else CURRENTSCREEN(); #endif @@ -2911,22 +2924,25 @@ void lcd_update() { #endif // ULTIPANEL - switch (lcdDrawUpdate) { - case LCDVIEW_CLEAR_CALL_REDRAW: - lcd_implementation_clear(); - case LCDVIEW_CALL_REDRAW_NEXT: - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - break; - case LCDVIEW_REDRAW_NOW: - lcdDrawUpdate = LCDVIEW_NONE; - break; - case LCDVIEW_NONE: - break; - } // switch - + #if ENABLED(DOGLCD) + if (!drawing_screen) + #endif + { + switch (lcdDrawUpdate) { + case LCDVIEW_CLEAR_CALL_REDRAW: + lcd_implementation_clear(); + case LCDVIEW_CALL_REDRAW_NEXT: + lcdDrawUpdate = LCDVIEW_REDRAW_NOW; + break; + case LCDVIEW_REDRAW_NOW: + lcdDrawUpdate = LCDVIEW_NONE; + break; + case LCDVIEW_NONE: + break; + } // switch + } } // LCD_HANDLER_CONDITION - - } + } // ELAPSED(ms, next_lcd_update_ms) } void set_utf_strlen(char* s, uint8_t n) { diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index 46a5225618..f8ffe74981 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -145,7 +145,7 @@ #elif ENABLED(U8GLIB_ST7920) //U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes // No 4 stripe device available from u8glib. - //U8GLIB_ST7920_128X64 u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 8 stripes + //U8GLIB_ST7920_128X64_1X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 8 stripes U8GLIB_ST7920_128X64_RRD u8g(0); // Number of stripes can be adjusted in ultralcd_st7920_u8glib_rrd.h with PAGE_HEIGHT #elif ENABLED(CARTESIO_UI) // The CartesioUI display diff --git a/Marlin/ultralcd_st7920_u8glib_rrd.h b/Marlin/ultralcd_st7920_u8glib_rrd.h index 1dc39360f9..66e1f17224 100644 --- a/Marlin/ultralcd_st7920_u8glib_rrd.h +++ b/Marlin/ultralcd_st7920_u8glib_rrd.h @@ -32,8 +32,8 @@ #define ST7920_CS_PIN LCD_PINS_RS //#define PAGE_HEIGHT 8 //128 byte framebuffer -//#define PAGE_HEIGHT 16 //256 byte framebuffer -#define PAGE_HEIGHT 32 //512 byte framebuffer +#define PAGE_HEIGHT 16 //256 byte framebuffer +//#define PAGE_HEIGHT 32 //512 byte framebuffer #define LCD_PIXEL_WIDTH 128 #define LCD_PIXEL_HEIGHT 64 From d7b948610a3fb6b2dec88bb128a187451b2263b3 Mon Sep 17 00:00:00 2001 From: akaJes Date: Sat, 5 Nov 2016 18:01:26 +0200 Subject: [PATCH 2/4] Experimental bilinear subdivision option --- Marlin/Configuration.h | 12 ++ Marlin/Marlin_main.cpp | 152 ++++++++++++++++-- .../Cartesio/Configuration.h | 12 ++ .../Felix/Configuration.h | 12 ++ .../Felix/DUAL/Configuration.h | 12 ++ .../Hephestos/Configuration.h | 12 ++ .../Hephestos_2/Configuration.h | 12 ++ .../K8200/Configuration.h | 12 ++ .../K8400/Configuration.h | 12 ++ .../K8400/Dual-head/Configuration.h | 12 ++ .../RepRapWorld/Megatronics/Configuration.h | 12 ++ .../RigidBot/Configuration.h | 12 ++ .../SCARA/Configuration.h | 12 ++ .../TAZ4/Configuration.h | 12 ++ .../WITBOX/Configuration.h | 12 ++ .../adafruit/ST7565/Configuration.h | 12 ++ .../delta/biv2.5/Configuration.h | 12 ++ .../delta/generic/Configuration.h | 12 ++ .../delta/kossel_mini/Configuration.h | 12 ++ .../delta/kossel_pro/Configuration.h | 12 ++ .../delta/kossel_xl/Configuration.h | 12 ++ .../makibox/Configuration.h | 12 ++ .../tvrrug/Round2/Configuration.h | 12 ++ 23 files changed, 399 insertions(+), 17 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 5565afb3b1..8377b2fd14 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -820,10 +820,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 9e6c09c681..8ca8a1ff67 100755 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2437,6 +2437,102 @@ static void clean_up_after_endstop_or_probe_move() { SERIAL_EOL; } + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + #define ABL_GRID_POINTS_VIRT_X (ABL_GRID_POINTS_X - 1) * (BILINEAR_SUBDIVISIONS) + 1 + #define ABL_GRID_POINTS_VIRT_Y (ABL_GRID_POINTS_Y - 1) * (BILINEAR_SUBDIVISIONS) + 1 + float bed_level_grid_virt[ABL_GRID_POINTS_VIRT_X][ABL_GRID_POINTS_VIRT_Y]; + float bed_level_grid_virt_temp[ABL_GRID_POINTS_X + 2][ABL_GRID_POINTS_Y + 2]; //temporary for calculation (maybe dynamical?) + int bilinear_grid_spacing_virt[2] = { 0 }; + + static void bed_level_virt_print() { + SERIAL_ECHOLNPGM("Subdivided with CATMULL ROM Leveling Grid:"); + for (uint8_t x = 0; x < ABL_GRID_POINTS_VIRT_X; x++) { + SERIAL_PROTOCOLPGM(" "); + if (x < 10) SERIAL_PROTOCOLCHAR(' '); + SERIAL_PROTOCOL((int)x); + } + SERIAL_EOL; + for (uint8_t y = 0; y < ABL_GRID_POINTS_VIRT_Y; y++) { + if (y < 10) SERIAL_PROTOCOLCHAR(' '); + SERIAL_PROTOCOL((int)y); + for (uint8_t x = 0; x < ABL_GRID_POINTS_VIRT_X; x++) { + SERIAL_PROTOCOLCHAR(' '); + float offset = bed_level_grid_virt[x][y]; + if (offset < 999.0) { + if (offset > 0) SERIAL_CHAR('+'); + SERIAL_PROTOCOL_F(offset, 5); + } + else + SERIAL_PROTOCOLPGM(" ===="); + } + SERIAL_EOL; + } + SERIAL_EOL; + } + #define LINEAR_EXTRAPOLATION(E, I) (E * 2 - I) + static void bed_level_virt_prepare() { + for (uint8_t y = 1; y <= ABL_GRID_POINTS_Y; y++) { + + for (uint8_t x = 1; x <= ABL_GRID_POINTS_X; x++) + bed_level_grid_virt_temp[x][y] = bed_level_grid[x - 1][y - 1]; + + bed_level_grid_virt_temp[0][y] = LINEAR_EXTRAPOLATION( + bed_level_grid_virt_temp[1][y], + bed_level_grid_virt_temp[2][y] + ); + + bed_level_grid_virt_temp[(ABL_GRID_POINTS_X + 2) - 1][y] = + LINEAR_EXTRAPOLATION( + bed_level_grid_virt_temp[(ABL_GRID_POINTS_X + 2) - 2][y], + bed_level_grid_virt_temp[(ABL_GRID_POINTS_X + 2) - 3][y] + ); + } + for (uint8_t x = 0; x < ABL_GRID_POINTS_X + 2; x++) { + bed_level_grid_virt_temp[x][0] = LINEAR_EXTRAPOLATION( + bed_level_grid_virt_temp[x][1], + bed_level_grid_virt_temp[x][2] + ); + bed_level_grid_virt_temp[x][(ABL_GRID_POINTS_Y + 2) - 1] = + LINEAR_EXTRAPOLATION( + bed_level_grid_virt_temp[x][(ABL_GRID_POINTS_Y + 2) - 2], + bed_level_grid_virt_temp[x][(ABL_GRID_POINTS_Y + 2) - 3] + ); + } + } + static float bed_level_virt_cmr(const float p[4], const uint8_t i, const float t) { + return ( + p[i-1] * -t * sq(1 - t) + + p[i] * (2 - 5 * sq(t) + 3 * t * sq(t)) + + p[i+1] * t * (1 + 4 * t - 3 * sq(t)) + - p[i+2] * sq(t) * (1 - t) + ) * 0.5; + } + static float bed_level_virt_2cmr(const uint8_t x, const uint8_t y, const float &tx, const float &ty) { + float row[4], column[4]; + for (uint8_t i = 0; i < 4; i++) { + for (uint8_t j = 0; j < 4; j++) // can be memcopy or through memory access + column[j] = bed_level_grid_virt_temp[i + x - 1][j + y - 1]; + row[i] = bed_level_virt_cmr(column, 1, ty); + } + return bed_level_virt_cmr(row, 1, tx); + } + static void bed_level_virt_interpolate() { + for (uint8_t y = 0; y < ABL_GRID_POINTS_Y; y++) + for (uint8_t x = 0; x < ABL_GRID_POINTS_X; x++) + for (uint8_t ty = 0; ty < BILINEAR_SUBDIVISIONS; ty++) + for (uint8_t tx = 0; tx < BILINEAR_SUBDIVISIONS; tx++) { + if ((ty && y == ABL_GRID_POINTS_Y - 1) || (tx && x == ABL_GRID_POINTS_X - 1)) + continue; + bed_level_grid_virt[x * (BILINEAR_SUBDIVISIONS) + tx][y * (BILINEAR_SUBDIVISIONS) + ty] = + bed_level_virt_2cmr( + x + 1, + y + 1, + (float)tx / (BILINEAR_SUBDIVISIONS), + (float)ty / (BILINEAR_SUBDIVISIONS) + ); + } + } + #endif // ABL_BILINEAR_SUBDIVISION #endif // AUTO_BED_LEVELING_BILINEAR @@ -3922,6 +4018,10 @@ inline void gcode_G28() { || front_probe_bed_position != bilinear_start[Y_AXIS] ) { reset_bed_level(); + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS); + bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS); + #endif bilinear_grid_spacing[X_AXIS] = xGridSpacing; bilinear_grid_spacing[Y_AXIS] = yGridSpacing; bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position); @@ -4092,6 +4192,12 @@ inline void gcode_G28() { if (!dryrun) extrapolate_unprobed_bed_level(); print_bed_level(); + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + bed_level_virt_prepare(); + bed_level_virt_interpolate(); + bed_level_virt_print(); + #endif + #elif ENABLED(AUTO_BED_LEVELING_LINEAR) // For LINEAR leveling calculate matrix, print reports, correct the position @@ -8631,6 +8737,18 @@ void ok_to_send() { #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + #define ABL_BG_SPACING(A) bilinear_grid_spacing_virt[A] + #define ABL_BG_POINTS_X ABL_GRID_POINTS_VIRT_X + #define ABL_BG_POINTS_Y ABL_GRID_POINTS_VIRT_Y + #define ABL_BG_GRID(X,Y) bed_level_grid_virt[X][Y] + #else + #define ABL_BG_SPACING(A) bilinear_grid_spacing[A] + #define ABL_BG_POINTS_X ABL_GRID_POINTS_X + #define ABL_BG_POINTS_Y ABL_GRID_POINTS_Y + #define ABL_BG_GRID(X,Y) bed_level_grid[X][Y] + #endif + // Get the Z adjustment for non-linear bed leveling float bilinear_z_offset(float cartesian[XYZ]) { @@ -8639,14 +8757,14 @@ void ok_to_send() { y = RAW_Y_POSITION(cartesian[Y_AXIS]) - bilinear_start[Y_AXIS]; // Convert to grid box units - float ratio_x = x / bilinear_grid_spacing[X_AXIS], - ratio_y = y / bilinear_grid_spacing[Y_AXIS]; + float ratio_x = x / ABL_BG_SPACING(X_AXIS), + ratio_y = y / ABL_BG_SPACING(Y_AXIS); // Whole units for the grid line indices. Constrained within bounds. - const int gridx = constrain(floor(ratio_x), 0, ABL_GRID_POINTS_X - 1), - gridy = constrain(floor(ratio_y), 0, ABL_GRID_POINTS_Y - 1), - nextx = min(gridx + 1, ABL_GRID_POINTS_X - 1), - nexty = min(gridy + 1, ABL_GRID_POINTS_Y - 1); + const int gridx = constrain(floor(ratio_x), 0, ABL_BG_POINTS_X - 1), + gridy = constrain(floor(ratio_y), 0, ABL_BG_POINTS_Y - 1), + nextx = min(gridx + 1, ABL_BG_POINTS_X - 1), + nexty = min(gridy + 1, ABL_BG_POINTS_Y - 1); // Subtract whole to get the ratio within the grid box ratio_x -= gridx; ratio_y -= gridy; @@ -8655,10 +8773,10 @@ void ok_to_send() { NOLESS(ratio_x, 0); NOLESS(ratio_y, 0); // Z at the box corners - const float z1 = bed_level_grid[gridx][gridy], // left-front - z2 = bed_level_grid[gridx][nexty], // left-back - z3 = bed_level_grid[nextx][gridy], // right-front - z4 = bed_level_grid[nextx][nexty], // right-back + const float z1 = ABL_BG_GRID(gridx, gridy), // left-front + z2 = ABL_BG_GRID(gridx, nexty), // left-back + z3 = ABL_BG_GRID(nextx, gridy), // right-front + z4 = ABL_BG_GRID(nextx, nexty), // right-back // Bilinear interpolate L = z1 + (z2 - z1) * ratio_y, // Linear interp. LF -> LB @@ -9006,7 +9124,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) && !IS_KINEMATIC - #define CELL_INDEX(A,V) ((RAW_##A##_POSITION(V) - bilinear_start[A##_AXIS]) / bilinear_grid_spacing[A##_AXIS]) + #define CELL_INDEX(A,V) ((RAW_##A##_POSITION(V) - bilinear_start[A##_AXIS]) / ABL_BG_SPACING(A##_AXIS)) /** * Prepare a bilinear-leveled linear move on Cartesian, @@ -9017,10 +9135,10 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { cy1 = CELL_INDEX(Y, current_position[Y_AXIS]), cx2 = CELL_INDEX(X, destination[X_AXIS]), cy2 = CELL_INDEX(Y, destination[Y_AXIS]); - cx1 = constrain(cx1, 0, ABL_GRID_POINTS_X - 2); - cy1 = constrain(cy1, 0, ABL_GRID_POINTS_Y - 2); - cx2 = constrain(cx2, 0, ABL_GRID_POINTS_X - 2); - cy2 = constrain(cy2, 0, ABL_GRID_POINTS_Y - 2); + cx1 = constrain(cx1, 0, ABL_BG_POINTS_X - 2); + cy1 = constrain(cy1, 0, ABL_BG_POINTS_Y - 2); + cx2 = constrain(cx2, 0, ABL_BG_POINTS_X - 2); + cy2 = constrain(cy2, 0, ABL_BG_POINTS_Y - 2); if (cx1 == cx2 && cy1 == cy2) { // Start and end on same mesh square @@ -9037,14 +9155,14 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { int8_t gcx = max(cx1, cx2), gcy = max(cy1, cy2); if (cx2 != cx1 && TEST(x_splits, gcx)) { memcpy(end, destination, sizeof(end)); - destination[X_AXIS] = LOGICAL_X_POSITION(bilinear_start[X_AXIS] + bilinear_grid_spacing[X_AXIS] * gcx); + destination[X_AXIS] = LOGICAL_X_POSITION(bilinear_start[X_AXIS] + ABL_BG_SPACING(X_AXIS) * gcx); normalized_dist = (destination[X_AXIS] - current_position[X_AXIS]) / (end[X_AXIS] - current_position[X_AXIS]); destination[Y_AXIS] = LINE_SEGMENT_END(Y); CBI(x_splits, gcx); } else if (cy2 != cy1 && TEST(y_splits, gcy)) { memcpy(end, destination, sizeof(end)); - destination[Y_AXIS] = LOGICAL_Y_POSITION(bilinear_start[Y_AXIS] + bilinear_grid_spacing[Y_AXIS] * gcy); + destination[Y_AXIS] = LOGICAL_Y_POSITION(bilinear_start[Y_AXIS] + ABL_BG_SPACING(Y_AXIS) * gcy); normalized_dist = (destination[Y_AXIS] - current_position[Y_AXIS]) / (end[Y_AXIS] - current_position[Y_AXIS]); destination[X_AXIS] = LINE_SEGMENT_END(X); CBI(y_splits, gcy); diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 64b7199e45..8fb5ee8d04 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -820,10 +820,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 75f7a24a98..9345e63d05 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -803,10 +803,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index ebfaff5c4c..61ab691b29 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -803,10 +803,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 6d36ab0579..fb7edb6a13 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -812,10 +812,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 9b506b60f1..96a6a8b58e 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -814,10 +814,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 60b70eb341..4be8696755 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -849,10 +849,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 079b49e406..70a7a25c94 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -820,10 +820,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index 1390337023..6bdbf7967a 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -820,10 +820,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 5ffb1848af..3d7ef9a38c 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -820,10 +820,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 4371793223..3668cfe504 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -819,10 +819,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 596add3735..a87eb95b45 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -835,10 +835,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index fb8ffc8d46..2128f39628 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -841,10 +841,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index b09f8a7752..5d3012c573 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -812,10 +812,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index d6fe48735a..31d8e8b790 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -820,10 +820,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index a078b82a4c..0cd7ef30ab 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -917,10 +917,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 583f18cdfd..dcc89553d6 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -911,10 +911,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 266c202a05..0ae6155f68 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -914,10 +914,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index f223c8f8bd..1687cc514b 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -913,10 +913,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 699740cdcb..44f70fd26f 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -917,10 +917,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index f568733026..5a410d0b8d 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -823,10 +823,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index efa64e7625..2c6aae0d93 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -816,10 +816,22 @@ //#define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + #endif #elif ENABLED(AUTO_BED_LEVELING_3POINT) From c48901f355b8749155ed0f14312ed7007399fb82 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 5 Dec 2016 19:52:37 -0600 Subject: [PATCH 3/4] Remove mystery-board 99 --- Marlin/boards.h | 2 -- Marlin/pins.h | 2 -- Marlin/pins_99.h | 71 ------------------------------------------------ 3 files changed, 75 deletions(-) delete mode 100644 Marlin/pins_99.h diff --git a/Marlin/boards.h b/Marlin/boards.h index e8ac50a4d6..f129fcc9bf 100644 --- a/Marlin/boards.h +++ b/Marlin/boards.h @@ -95,8 +95,6 @@ #define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers #define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D -#define BOARD_99 99 // This is in pins.h but...? - #define MB(board) (MOTHERBOARD==BOARD_##board) #endif //__BOARDS_H diff --git a/Marlin/pins.h b/Marlin/pins.h index 68aaf656fc..272519ba9f 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -166,8 +166,6 @@ #include "pins_MEGACONTROLLER.h" #elif MB(BQ_ZUM_MEGA_3D) #include "pins_BQ_ZUM_MEGA_3D.h" -#elif MB(99) - #include "pins_99.h" #elif MB(AJ4P) #include "pins_AJ4P.h" #elif MB(MKS_13) diff --git a/Marlin/pins_99.h b/Marlin/pins_99.h deleted file mode 100644 index ba86bf58b6..0000000000 --- a/Marlin/pins_99.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Board 99 pin assignments - */ - -#define BOARD_NAME "99 Unknown" - -// -// Limit Switches -// -#define X_STOP_PIN 16 -#define Y_STOP_PIN 67 -#define Z_STOP_PIN 59 - -// -// Steppers -// -#define X_STEP_PIN 2 -#define X_DIR_PIN 3 -#define X_ENABLE_PIN -1 - -#define Y_STEP_PIN 5 -#define Y_DIR_PIN 6 -#define Y_ENABLE_PIN -1 - -#define Z_STEP_PIN 62 -#define Z_DIR_PIN 63 -#define Z_ENABLE_PIN -1 - -#define E0_STEP_PIN 65 -#define E0_DIR_PIN 66 -#define E0_ENABLE_PIN -1 - -// -// Temperature Sensors -// -#define TEMP_0_PIN 6 // Analog Input -#define TEMP_BED_PIN 10 // Analog Input - -// -// Heaters / Fans -// -#define HEATER_0_PIN 13 -#define HEATER_BED_PIN 4 - -// -// Misc. Functions -// -#define SDSS 53 -#define PS_ON_PIN 9 From 46b65773ea9d7ec46f41ce5d83ab090e5aafc948 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 6 Dec 2016 03:10:37 -0600 Subject: [PATCH 4/4] Fix Croatian spacing, extra #endif --- Marlin/language_hr.h | 85 +++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/Marlin/language_hr.h b/Marlin/language_hr.h index 3bf88de10f..4d3c287882 100644 --- a/Marlin/language_hr.h +++ b/Marlin/language_hr.h @@ -185,51 +185,54 @@ #define MSG_INFO_PROTOCOL "Protokol" #define MSG_LIGHTS_ON "Upali osvjetljenje" #define MSG_LIGHTS_OFF "Ugasi osvjetljenje" + #if LCD_WIDTH >= 20 - #define MSG_INFO_PRINT_COUNT "Broj printova" - #define MSG_INFO_COMPLETED_PRINTS "Završeni" - #define MSG_INFO_PRINT_TIME "Ukupno vrijeme printanja" - #define MSG_INFO_PRINT_LONGEST "Trajanje najdužeg printa" - #define MSG_INFO_PRINT_FILAMENT "Extrudirano ukupno" + #define MSG_INFO_PRINT_COUNT "Broj printova" + #define MSG_INFO_COMPLETED_PRINTS "Završeni" + #define MSG_INFO_PRINT_TIME "Ukupno vrijeme printanja" + #define MSG_INFO_PRINT_LONGEST "Trajanje najdužeg printa" + #define MSG_INFO_PRINT_FILAMENT "Extrudirano ukupno" #else - #define MSG_INFO_PRINT_COUNT "Printovi" - #define MSG_INFO_COMPLETED_PRINTS "Završeni" - #define MSG_INFO_PRINT_TIME "Ukupno" - #define MSG_INFO_PRINT_LONGEST "Najduži" - #define MSG_INFO_PRINT_FILAMENT "Extrudirano" + #define MSG_INFO_PRINT_COUNT "Printovi" + #define MSG_INFO_COMPLETED_PRINTS "Završeni" + #define MSG_INFO_PRINT_TIME "Ukupno" + #define MSG_INFO_PRINT_LONGEST "Najduži" + #define MSG_INFO_PRINT_FILAMENT "Extrudirano" #endif - #define MSG_INFO_MIN_TEMP "Min Temp" - #define MSG_INFO_MAX_TEMP "Max Temp" - #define MSG_INFO_PSU "Napajanje" - #define MSG_DRIVE_STRENGTH "Drive Strength" - #define MSG_DAC_PERCENT "Driver %" - #define MSG_DAC_EEPROM_WRITE "DAC EEPROM Write" - #define MSG_FILAMENT_CHANGE_HEADER "CHANGE FILAMENT" - #define MSG_FILAMENT_CHANGE_OPTION_HEADER "CHANGE OPTIONS:" - #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "Extrudiraj više" - #define MSG_FILAMENT_CHANGE_OPTION_RESUME "Nastavi print" + +#define MSG_INFO_MIN_TEMP "Min Temp" +#define MSG_INFO_MAX_TEMP "Max Temp" +#define MSG_INFO_PSU "Napajanje" +#define MSG_DRIVE_STRENGTH "Drive Strength" +#define MSG_DAC_PERCENT "Driver %" +#define MSG_DAC_EEPROM_WRITE "DAC EEPROM Write" +#define MSG_FILAMENT_CHANGE_HEADER "CHANGE FILAMENT" +#define MSG_FILAMENT_CHANGE_OPTION_HEADER "CHANGE OPTIONS:" +#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "Extrudiraj više" +#define MSG_FILAMENT_CHANGE_OPTION_RESUME "Nastavi print" + #if LCD_HEIGHT >= 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Čekaj početak" - #define MSG_FILAMENT_CHANGE_INIT_2 "filamenta" - #define MSG_FILAMENT_CHANGE_INIT_3 "promijeni" - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Čekaj" - #define MSG_FILAMENT_CHANGE_UNLOAD_2 "filament unload" - #define MSG_FILAMENT_CHANGE_INSERT_1 "Umetni filament" - #define MSG_FILAMENT_CHANGE_INSERT_2 "i pritisni tipku" - #define MSG_FILAMENT_CHANGE_INSERT_3 "za nastavak..." - #define MSG_FILAMENT_CHANGE_LOAD_1 "Pričekaj" - #define MSG_FILAMENT_CHANGE_LOAD_2 "filament load" - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Pričekaj" - #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "filament extrude" - #define MSG_FILAMENT_CHANGE_RESUME_1 "Wait for print" - #define MSG_FILAMENT_CHANGE_RESUME_2 "to resume" + #define MSG_FILAMENT_CHANGE_INIT_1 "Čekaj početak" + #define MSG_FILAMENT_CHANGE_INIT_2 "filamenta" + #define MSG_FILAMENT_CHANGE_INIT_3 "promijeni" + #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Čekaj" + #define MSG_FILAMENT_CHANGE_UNLOAD_2 "filament unload" + #define MSG_FILAMENT_CHANGE_INSERT_1 "Umetni filament" + #define MSG_FILAMENT_CHANGE_INSERT_2 "i pritisni tipku" + #define MSG_FILAMENT_CHANGE_INSERT_3 "za nastavak..." + #define MSG_FILAMENT_CHANGE_LOAD_1 "Pričekaj" + #define MSG_FILAMENT_CHANGE_LOAD_2 "filament load" + #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Pričekaj" + #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "filament extrude" + #define MSG_FILAMENT_CHANGE_RESUME_1 "Wait for print" + #define MSG_FILAMENT_CHANGE_RESUME_2 "to resume" #else // LCD_HEIGHT < 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Pričekaj..." - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Ejecting..." - #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert and Click" - #define MSG_FILAMENT_CHANGE_LOAD_1 "Loading..." - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Extrudiranje..." - #define MSG_FILAMENT_CHANGE_RESUME_1 "Nastavljam..." - #endif + #define MSG_FILAMENT_CHANGE_INIT_1 "Pričekaj..." + #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Ejecting..." + #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert and Click" + #define MSG_FILAMENT_CHANGE_LOAD_1 "Loading..." + #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Extrudiranje..." + #define MSG_FILAMENT_CHANGE_RESUME_1 "Nastavljam..." #endif // LCD_HEIGHT < 4 + #endif // LANGUAGE_HR_H