Mesh by 3d-gussner, fixed difference between mbl points coordinates and coordinates used in planner for corrections, mbl settings menu update

This commit is contained in:
PavelSindler 2019-03-14 01:52:44 +01:00
parent 72f51989fa
commit 9e0e4198c5
10 changed files with 35 additions and 35 deletions

View File

@ -4496,7 +4496,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
current_position[X_AXIS] = BED_X(ix, nMeasPoints);
current_position[Y_AXIS] = BED_Y(iy, nMeasPoints);
//printf_P(PSTR("[%f;%f]\n"), current_position[X_AXIS], current_position[Y_AXIS]);
world2machine_clamp(current_position[X_AXIS], current_position[Y_AXIS]);
#ifdef SUPPORT_VERBOSITY

View File

@ -978,7 +978,7 @@ inline bool find_bed_induction_sensor_point_z(float minimum_z, uint8_t n_iter, i
update_current_position_z();
//printf_P(PSTR("Zs: %f, Z: %f, delta Z: %f"), z_bckp, current_position[Z_AXIS], (z_bckp - current_position[Z_AXIS]));
if (abs(current_position[Z_AXIS] - z_bckp) < 0.025) {
printf_P(PSTR("PINDA triggered immediately, move Z higher and repeat measurement\n"));
//printf_P(PSTR("PINDA triggered immediately, move Z higher and repeat measurement\n"));
current_position[Z_AXIS] += 0.5;
go_to_current(homing_feedrate[Z_AXIS]/60);
current_position[Z_AXIS] = minimum_z;
@ -999,7 +999,7 @@ inline bool find_bed_induction_sensor_point_z(float minimum_z, uint8_t n_iter, i
// SERIAL_ECHOLNPGM("");
float dz = i?abs(current_position[Z_AXIS] - (z / i)):0;
z += current_position[Z_AXIS];
printf_P(PSTR("Z[%d] = %d, dz=%d\n"), i, (int)(current_position[Z_AXIS] * 1000), (int)(dz * 1000));
//printf_P(PSTR("Z[%d] = %d, dz=%d\n"), i, (int)(current_position[Z_AXIS] * 1000), (int)(dz * 1000));
if (dz > 0.05) goto error;//deviation > 50um
}
current_position[Z_AXIS] = z;
@ -3107,13 +3107,13 @@ bool mbl_point_measurement_valid(uint8_t ix, uint8_t iy, uint8_t meas_points, bo
uint8_t valid_points_mask[7] = {
//[X_MAX,Y_MAX]
0b1111101,
0b1110111,
0b1111111,
0b0111011,
0b1110111,
0b1111111,
0b1110111,
0b1111011,
0b1110111,
0b1111111,
0b1111111,
//[0,0]
};
if (meas_points == 3) {
@ -3130,7 +3130,7 @@ bool mbl_point_measurement_valid(uint8_t ix, uint8_t iy, uint8_t meas_points, bo
}
void mbl_single_point_interpolation(uint8_t x, uint8_t y, uint8_t meas_points) {
printf_P(PSTR("x = %d; y = %d \n"), x, y);
//printf_P(PSTR("x = %d; y = %d \n"), x, y);
uint8_t count = 0;
float z = 0;
if (mbl_point_measurement_valid(x, y + 1, meas_points, false)) { z += mbl.z_values[y + 1][x]; /*printf_P(PSTR("x; y+1: Z = %f \n"), mbl.z_values[y + 1][x]);*/ count++; }

View File

@ -6,10 +6,10 @@
#ifdef HEATBED_V2
#define BED_X0 (3.f - BED_ZERO_REF_X)
#define BED_Y0 (10.4f - BED_ZERO_REF_Y)
#define BED_Xn (206.f - BED_ZERO_REF_X)
#define BED_Yn (202.4f - BED_ZERO_REF_Y)
#define BED_X0 (2.f - BED_ZERO_REF_X) //1
#define BED_Y0 (9.4f - BED_ZERO_REF_Y) //1
#define BED_Xn (206.f - BED_ZERO_REF_X) //205
#define BED_Yn (213.4f - BED_ZERO_REF_Y) //205
#else

View File

@ -6691,7 +6691,7 @@ static void lcd_mesh_bed_leveling_settings()
else MENU_ITEM_FUNCTION_P(_i("Mesh [7x7]"), mbl_mesh_set);
MENU_ITEM_EDIT_int3_P(_i("Z-probe nr."), &mbl_z_probe_nr, 1, 5);
if (points_nr == 7) {
if (magnet_elimination) MENU_ITEM_FUNCTION_P(_i("Magnets eli [On]"), mbl_magnets_elimination_set);
if (magnet_elimination) MENU_ITEM_FUNCTION_P(_i("Magnets comp. [On]"), mbl_magnets_elimination_set);
else MENU_ITEM_FUNCTION_P(_i("Magnets comp.[Off]"), mbl_magnets_elimination_set);
}
else menu_item_text_P(_i("Magnets comp.[N/A]"));

View File

@ -290,10 +290,10 @@
#define MBL_Z_STEP 0.01
// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_X 24
#define MESH_MAX_X 228
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202
#define MESH_MAX_Y 210
// Mesh upsample definition
#define MESH_NUM_X_POINTS 7

View File

@ -291,10 +291,10 @@
#define MBL_Z_STEP 0.01
// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_X 24
#define MESH_MAX_X 228
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202
#define MESH_MAX_Y 210
// Mesh upsample definition
#define MESH_NUM_X_POINTS 7

View File

@ -290,10 +290,10 @@
#define MBL_Z_STEP 0.01
// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_X 24
#define MESH_MAX_X 228
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202
#define MESH_MAX_Y 210
// Mesh upsample definition
#define MESH_NUM_X_POINTS 7

View File

@ -291,10 +291,10 @@
#define MBL_Z_STEP 0.01
// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_X 24
#define MESH_MAX_X 228
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202
#define MESH_MAX_Y 210
// Mesh upsample definition
#define MESH_NUM_X_POINTS 7

View File

@ -400,10 +400,10 @@
#define MBL_Z_STEP 0.01
// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_X 24
#define MESH_MAX_X 228
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202
#define MESH_MAX_Y 210
// Mesh upsample definition
#define MESH_NUM_X_POINTS 7

View File

@ -400,10 +400,10 @@
#define MBL_Z_STEP 0.01
// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_X 24
#define MESH_MAX_X 228
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202
#define MESH_MAX_Y 210
// Mesh upsample definition
#define MESH_NUM_X_POINTS 7