@ -1492,9 +1492,9 @@
}
}
if ( ( x_max - x_min + 1 ) < ( grid_size_G ) | | ( y_max - y_min + 1 ) < ( grid_size_G ) ) {
if ( ( x_max - x_min + 1 ) < ( grid_size_G ) | | ( y_max - y_min + 1 ) < ( grid_size_G ) ) {
SERIAL_PROTOCOL PAIR ( " ERROR - probeable UBL MESH smaller than grid - X points: " , x_max - x_min + 1 ) ;
SERIAL_ECHO PAIR ( " ERROR - probeable UBL MESH smaller than grid - X points: " , x_max - x_min + 1 ) ;
SERIAL_PROTOCOL PAIR ( " Y points: " , y_max - y_min + 1 ) ;
SERIAL_ECHO PAIR ( " Y points: " , y_max - y_min + 1 ) ;
SERIAL_PROTOCOL LNPAIR ( " grid: " , grid_size_G ) ;
SERIAL_ECHO LNPAIR ( " grid: " , grid_size_G ) ;
return ;
return ;
}
}
@ -1540,7 +1540,7 @@
int8_t inStart , inStop , inInc ;
int8_t inStart , inStop , inInc ;
SERIAL_PROTOCOL PAIR ( " \n PR_OUTER_VAR: " , PR_OUTER_VAR ) ;
SERIAL_ECHO PAIR ( " \n PR_OUTER_VAR: " , PR_OUTER_VAR ) ;
if ( zig ) { // away from origin
if ( zig ) { // away from origin
inStart = 0 ;
inStart = 0 ;
@ -1557,40 +1557,40 @@ SERIAL_PROTOCOLPAIR("\nPR_OUTER_VAR: ", PR_OUTER_VAR);
// Inner loop is Y with PROBE_Y_FIRST enabled
// Inner loop is Y with PROBE_Y_FIRST enabled
for ( PR_INNER_VAR = inStart ; PR_INNER_VAR ! = inStop ; PR_INNER_VAR + = inInc ) {
for ( PR_INNER_VAR = inStart ; PR_INNER_VAR ! = inStop ; PR_INNER_VAR + = inInc ) {
SERIAL_PROTOCOL PAIR ( " \n PR_INNER_VAR: " , PR_INNER_VAR ) ;
SERIAL_ECHO PAIR ( " \n PR_INNER_VAR: " , PR_INNER_VAR ) ;
SERIAL_PROTOCOL PAIR ( " \n Checkpoint: " , 1 ) ;
SERIAL_ECHO PAIR ( " \n Checkpoint: " , 1 ) ;
// end of G29 AUTO_BED_LEVELING_BILINEAR method/code
// end of G29 AUTO_BED_LEVELING_BILINEAR method/code
if ( ubl_lcd_clicked ( ) ) {
if ( ubl_lcd_clicked ( ) ) {
SERIAL_PROTOCOL PAIR ( " \n Checkpoint: " , 2 ) ;
SERIAL_ECHO PAIR ( " \n Checkpoint: " , 2 ) ;
SERIAL_PROTOCOL LNPGM ( " \n Grid only partially populated. \n " ) ;
SERIAL_ECHO LNPGM ( " \n Grid only partially populated. \n " ) ;
lcd_quick_feedback ( ) ;
lcd_quick_feedback ( ) ;
STOW_PROBE ( ) ;
STOW_PROBE ( ) ;
SERIAL_PROTOCOL PAIR ( " \n Checkpoint: " , 3 ) ;
SERIAL_ECHO PAIR ( " \n Checkpoint: " , 3 ) ;
while ( ubl_lcd_clicked ( ) ) idle ( ) ;
while ( ubl_lcd_clicked ( ) ) idle ( ) ;
SERIAL_PROTOCOL PAIR ( " \n Checkpoint: " , 4 ) ;
SERIAL_ECHO PAIR ( " \n Checkpoint: " , 4 ) ;
ubl . has_control_of_lcd_panel = false ;
ubl . has_control_of_lcd_panel = false ;
restore_ubl_active_state_and_leave ( ) ;
restore_ubl_active_state_and_leave ( ) ;
safe_delay ( 50 ) ; // Debounce the Encoder wheel
safe_delay ( 50 ) ; // Debounce the Encoder wheel
return ;
return ;
}
}
SERIAL_PROTOCOL PAIR ( " \n Checkpoint: " , 5 ) ;
SERIAL_ECHO PAIR ( " \n Checkpoint: " , 5 ) ;
const float probeX = ubl . mesh_index_to_xpos [ grid_G_index_to_xpos [ xCount ] ] , //where we want the probe to be
const float probeX = ubl . mesh_index_to_xpos [ grid_G_index_to_xpos [ xCount ] ] , //where we want the probe to be
probeY = ubl . mesh_index_to_ypos [ grid_G_index_to_ypos [ yCount ] ] ;
probeY = ubl . mesh_index_to_ypos [ grid_G_index_to_ypos [ yCount ] ] ;
SERIAL_PROTOCOL PAIR ( " \n Checkpoint: " , 6 ) ;
SERIAL_ECHO PAIR ( " \n Checkpoint: " , 6 ) ;
const float measured_z = probe_pt ( LOGICAL_X_POSITION ( probeX ) , LOGICAL_Y_POSITION ( probeY ) , code_seen ( ' E ' ) , ( code_seen ( ' V ' ) & & code_has_value ( ) ) ? code_value_int ( ) : 0 ) ; // takes into account the offsets
const float measured_z = probe_pt ( LOGICAL_X_POSITION ( probeX ) , LOGICAL_Y_POSITION ( probeY ) , code_seen ( ' E ' ) , ( code_seen ( ' V ' ) & & code_has_value ( ) ) ? code_value_int ( ) : 0 ) ; // takes into account the offsets
SERIAL_PROTOCOL PAIR ( " \n measured_z: " , measured_z ) ;
SERIAL_ECHO PAIR ( " \n measured_z: " , measured_z ) ;
z_values_G [ xCount ] [ yCount ] = measured_z ;
z_values_G [ xCount ] [ yCount ] = measured_z ;
//SERIAL_PROTOCOL LNPGM("\nFine Tuning of Mesh Stopped.");
//SERIAL_LNPGM("\nFine Tuning of Mesh Stopped.");
}
}
}
}
SERIAL_PROTOCOL ( " \n Done probing... \n " ) ;
SERIAL_ECHO ( " \n Done probing... \n " ) ;
STOW_PROBE ( ) ;
STOW_PROBE ( ) ;
restore_ubl_active_state_and_leave ( ) ;
restore_ubl_active_state_and_leave ( ) ;
@ -1615,22 +1615,22 @@ double zzz[] = { 0.05, 0.05, 0.15, 0.15 };
int three_size = sizeof ( xxx ) / sizeof ( double ) ;
int three_size = sizeof ( xxx ) / sizeof ( double ) ;
results = lsf_linear_fit ( xxx9 , yyy9 , zzz9 , nine_size ) ;
results = lsf_linear_fit ( xxx9 , yyy9 , zzz9 , nine_size ) ;
SERIAL_PROTOCOL PAIR ( " \n xxx9->A = " , results - > A ) ;
SERIAL_ECHO PAIR ( " \n xxx9->A = " , results - > A ) ;
SERIAL_PROTOCOL PAIR ( " \n xxx9->B = " , results - > B ) ;
SERIAL_ECHO PAIR ( " \n xxx9->B = " , results - > B ) ;
SERIAL_PROTOCOL PAIR ( " \n xxx9->D = " , results - > D ) ;
SERIAL_ECHO PAIR ( " \n xxx9->D = " , results - > D ) ;
SERIAL_PROTOCOL ( " \n " ) ;
SERIAL_ECHO ( " \n " ) ;
results = lsf_linear_fit ( xxx0 , yyy0 , zzz0 , zero_size ) ;
results = lsf_linear_fit ( xxx0 , yyy0 , zzz0 , zero_size ) ;
SERIAL_PROTOCOL PAIR ( " \n xxx0->A = " , results - > A ) ;
SERIAL_ECHO PAIR ( " \n xxx0->A = " , results - > A ) ;
SERIAL_PROTOCOL PAIR ( " \n xxx0->B = " , results - > B ) ;
SERIAL_ECHO PAIR ( " \n xxx0->B = " , results - > B ) ;
SERIAL_PROTOCOL PAIR ( " \n xxx0->D = " , results - > D ) ;
SERIAL_ECHO PAIR ( " \n xxx0->D = " , results - > D ) ;
SERIAL_PROTOCOL ( " \n " ) ;
SERIAL_ECHO ( " \n " ) ;
results = lsf_linear_fit ( xxx , yyy , zzz , three_size ) ;
results = lsf_linear_fit ( xxx , yyy , zzz , three_size ) ;
SERIAL_PROTOCOL PAIR ( " \n xxx->A = " , results - > A ) ;
SERIAL_ECHO PAIR ( " \n xxx->A = " , results - > A ) ;
SERIAL_PROTOCOL PAIR ( " \n xxx->B = " , results - > B ) ;
SERIAL_ECHO PAIR ( " \n xxx->B = " , results - > B ) ;
SERIAL_PROTOCOL PAIR ( " \n xxx->D = " , results - > D ) ;
SERIAL_ECHO PAIR ( " \n xxx->D = " , results - > D ) ;
SERIAL_PROTOCOL ( " \n " ) ;
SERIAL_ECHO ( " \n " ) ;
return ;
return ;
} // end of tilt_mesh_based_on_probed_grid()
} // end of tilt_mesh_based_on_probed_grid()