@ -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()