Browse Source

Add EXTRAPOLATE_BEYOND_GRID option to bilinear leveling

pull/1/head
Scott Lahteine 8 years ago
parent
commit
da08e11acd
  1. 4
      Marlin/Configuration.h
  2. 24
      Marlin/Marlin_main.cpp
  3. 4
      Marlin/example_configurations/Cartesio/Configuration.h
  4. 4
      Marlin/example_configurations/Felix/Configuration.h
  5. 4
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  6. 4
      Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h
  7. 4
      Marlin/example_configurations/Hephestos/Configuration.h
  8. 4
      Marlin/example_configurations/Hephestos_2/Configuration.h
  9. 4
      Marlin/example_configurations/K8200/Configuration.h
  10. 4
      Marlin/example_configurations/K8400/Configuration.h
  11. 4
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  12. 4
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  13. 4
      Marlin/example_configurations/RigidBot/Configuration.h
  14. 4
      Marlin/example_configurations/SCARA/Configuration.h
  15. 4
      Marlin/example_configurations/TAZ4/Configuration.h
  16. 4
      Marlin/example_configurations/TinyBoy2/Configuration.h
  17. 4
      Marlin/example_configurations/WITBOX/Configuration.h
  18. 4
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  19. 4
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
  20. 4
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  21. 4
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  22. 4
      Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h
  23. 4
      Marlin/example_configurations/makibox/Configuration.h
  24. 4
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  25. 4
      Marlin/example_configurations/wt150/Configuration.h

4
Marlin/Configuration.h

@ -825,6 +825,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

24
Marlin/Marlin_main.cpp

@ -10592,12 +10592,25 @@ void ok_to_send() {
const float x = RAW_X_POSITION(logical[X_AXIS]) - bilinear_start[X_AXIS],
y = RAW_Y_POSITION(logical[Y_AXIS]) - bilinear_start[Y_AXIS];
#if ENABLED(EXTRAPOLATE_BEYOND_GRID)
// Keep using the last grid box
#define FAR_EDGE_OR_BOX 2
#else
// Just use the grid far edge
#define FAR_EDGE_OR_BOX 1
#endif
if (last_x != x) {
last_x = x;
ratio_x = x * ABL_BG_FACTOR(X_AXIS);
const float gx = constrain(floor(ratio_x), 0, ABL_BG_POINTS_X - 1);
const float gx = constrain(floor(ratio_x), 0, ABL_BG_POINTS_X - FAR_EDGE_OR_BOX);
ratio_x -= gx; // Subtract whole to get the ratio within the grid box
#if DISABLED(EXTRAPOLATE_BEYOND_GRID)
// Beyond the grid maintain height at grid edges
NOLESS(ratio_x, 0); // Never < 0.0. (> 1.0 is ok when nextx==gridx.)
#endif
gridx = gx;
nextx = min(gridx + 1, ABL_BG_POINTS_X - 1);
}
@ -10607,9 +10620,14 @@ void ok_to_send() {
if (last_y != y) {
last_y = y;
ratio_y = y * ABL_BG_FACTOR(Y_AXIS);
const float gy = constrain(floor(ratio_y), 0, ABL_BG_POINTS_Y - 1);
const float gy = constrain(floor(ratio_y), 0, ABL_BG_POINTS_Y - FAR_EDGE_OR_BOX);
ratio_y -= gy;
NOLESS(ratio_y, 0);
#if DISABLED(EXTRAPOLATE_BEYOND_GRID)
// Beyond the grid maintain height at grid edges
NOLESS(ratio_y, 0); // Never < 0.0. (> 1.0 is ok when nexty==gridy.)
#endif
gridy = gy;
nexty = min(gridy + 1, ABL_BG_POINTS_Y - 1);
}

4
Marlin/example_configurations/Cartesio/Configuration.h

@ -823,6 +823,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/Felix/Configuration.h

@ -807,6 +807,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/Felix/DUAL/Configuration.h

@ -807,6 +807,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h

@ -827,6 +827,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/Hephestos/Configuration.h

@ -815,6 +815,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/Hephestos_2/Configuration.h

@ -818,6 +818,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/K8200/Configuration.h

@ -853,6 +853,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/K8400/Configuration.h

@ -824,6 +824,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/K8400/Dual-head/Configuration.h

@ -824,6 +824,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h

@ -824,6 +824,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/RigidBot/Configuration.h

@ -823,6 +823,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/SCARA/Configuration.h

@ -839,6 +839,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/TAZ4/Configuration.h

@ -844,6 +844,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/TinyBoy2/Configuration.h

@ -880,6 +880,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/WITBOX/Configuration.h

@ -815,6 +815,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/adafruit/ST7565/Configuration.h

@ -824,6 +824,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h

@ -943,6 +943,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/delta/kossel_mini/Configuration.h

@ -935,6 +935,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/delta/kossel_pro/Configuration.h

@ -941,6 +941,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h

@ -809,6 +809,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/makibox/Configuration.h

@ -827,6 +827,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/tvrrug/Round2/Configuration.h

@ -820,6 +820,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

4
Marlin/example_configurations/wt150/Configuration.h

@ -829,6 +829,10 @@
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.

Loading…
Cancel
Save