Quantcast
Channel: Reprap Forum - Delta Machines
Viewing all articles
Browse latest Browse all 20289

Re: Can't Disable Auto Bed Leveling

$
0
0
In your Marlin_main.cpp look for this line, I found mine around line number 3294.

Quote

void adjust_delta(float cartesian[3])

Add this line to the line above the one you just searched for.
#ifdef NONLINEAR_BED_LEVELING

And this one right below it's closing brace "}".
#endif

My source now looks like this.

Quote

#ifdef NONLINEAR_BED_LEVELING
void adjust_delta(float cartesian[3])
{
int half = (ACCURATE_BED_LEVELING_POINTS - 1) / 2;
float grid_x = max(0.001-half, min(half-0.001, cartesian[X_AXIS] / ACCURATE_BED_LEVELING_GRID_X));
float grid_y = max(0.001-half, min(half-0.001, cartesian[Y_AXIS] / ACCURATE_BED_LEVELING_GRID_Y));
int floor_x = floor(grid_x);
int floor_y = floor(grid_y);
float ratio_x = grid_x - floor_x;
float ratio_y = grid_y - floor_y;
float z1 = bed_level[floor_x+half][floor_y+half];
float z2 = bed_level[floor_x+half][floor_y+half+1];
float z3 = bed_level[floor_x+half+1][floor_y+half];
float z4 = bed_level[floor_x+half+1][floor_y+half+1];
float left = (1-ratio_y)*z1 + ratio_y*z2;
float right = (1-ratio_y)*z3 + ratio_y*z4;
float offset = (1-ratio_x)*left + ratio_x*right;

delta[X_AXIS] += offset;
delta[Y_AXIS] += offset;
delta[Z_AXIS] += offset;

/*
SERIAL_ECHOPGM("grid_x="); SERIAL_ECHO(grid_x);
SERIAL_ECHOPGM(" grid_y="); SERIAL_ECHO(grid_y);
SERIAL_ECHOPGM(" floor_x="); SERIAL_ECHO(floor_x);
SERIAL_ECHOPGM(" floor_y="); SERIAL_ECHO(floor_y);
SERIAL_ECHOPGM(" ratio_x="); SERIAL_ECHO(ratio_x);
SERIAL_ECHOPGM(" ratio_y="); SERIAL_ECHO(ratio_y);
SERIAL_ECHOPGM(" z1="); SERIAL_ECHO(z1);
SERIAL_ECHOPGM(" z2="); SERIAL_ECHO(z2);
SERIAL_ECHOPGM(" z3="); SERIAL_ECHO(z3);
SERIAL_ECHOPGM(" z4="); SERIAL_ECHO(z4);
SERIAL_ECHOPGM(" left="); SERIAL_ECHO(left);
SERIAL_ECHOPGM(" right="); SERIAL_ECHO(right);
SERIAL_ECHOPGM(" offset="); SERIAL_ECHOLN(offset);
*/
}
#endif


I'd submit a pull request to get this fixed in the repository but my code is currently in a transient state getting calibrations done.

Viewing all articles
Browse latest Browse all 20289

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>