|
@ -497,8 +497,7 @@ |
|
|
SERIAL_ECHOLNPGM("Checking G29 has control of LCD Panel:"); |
|
|
SERIAL_ECHOLNPGM("Checking G29 has control of LCD Panel:"); |
|
|
wait_for_user = true; |
|
|
wait_for_user = true; |
|
|
while (wait_for_user) { |
|
|
while (wait_for_user) { |
|
|
idle(); |
|
|
safe_delay(250); |
|
|
delay(250); |
|
|
|
|
|
SERIAL_ECHO((int)ubl_encoderDiff); |
|
|
SERIAL_ECHO((int)ubl_encoderDiff); |
|
|
ubl_encoderDiff = 0; |
|
|
ubl_encoderDiff = 0; |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
@ -644,7 +643,7 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
ubl_has_control_of_lcd_panel = false; |
|
|
ubl_has_control_of_lcd_panel = false; |
|
|
delay(20); // We don't want any switch noise.
|
|
|
safe_delay(20); // We don't want any switch noise.
|
|
|
|
|
|
|
|
|
ubl.state.z_offset = measured_z; |
|
|
ubl.state.z_offset = measured_z; |
|
|
|
|
|
|
|
@ -734,7 +733,7 @@ |
|
|
} |
|
|
} |
|
|
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(); |
|
|
delay(50); // Debounce the Encoder wheel
|
|
|
safe_delay(50); // Debounce the Encoder wheel
|
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1113,7 +1112,7 @@ |
|
|
else |
|
|
else |
|
|
SERIAL_PROTOCOLPGM("In"); |
|
|
SERIAL_PROTOCOLPGM("In"); |
|
|
SERIAL_PROTOCOLLNPGM("ctive.\n"); |
|
|
SERIAL_PROTOCOLLNPGM("ctive.\n"); |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
|
|
|
|
|
|
if (ubl.state.eeprom_storage_slot == -1) |
|
|
if (ubl.state.eeprom_storage_slot == -1) |
|
|
SERIAL_PROTOCOLPGM("No Mesh Loaded."); |
|
|
SERIAL_PROTOCOLPGM("No Mesh Loaded."); |
|
@ -1123,7 +1122,7 @@ |
|
|
SERIAL_PROTOCOLPGM(" Loaded."); |
|
|
SERIAL_PROTOCOLPGM(" Loaded."); |
|
|
} |
|
|
} |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
|
|
|
|
|
|
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) |
|
|
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) |
|
|
SERIAL_PROTOCOLPAIR("g29_correction_fade_height : ", ubl.state.g29_correction_fade_height); |
|
|
SERIAL_PROTOCOLPAIR("g29_correction_fade_height : ", ubl.state.g29_correction_fade_height); |
|
@ -1133,13 +1132,13 @@ |
|
|
SERIAL_PROTOCOLPGM("z_offset: "); |
|
|
SERIAL_PROTOCOLPGM("z_offset: "); |
|
|
SERIAL_PROTOCOL_F(ubl.state.z_offset, 6); |
|
|
SERIAL_PROTOCOL_F(ubl.state.z_offset, 6); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("X-Axis Mesh Points at: "); |
|
|
SERIAL_PROTOCOLPGM("X-Axis Mesh Points at: "); |
|
|
for (uint8_t i = 0; i < UBL_MESH_NUM_X_POINTS; i++) { |
|
|
for (uint8_t i = 0; i < UBL_MESH_NUM_X_POINTS; i++) { |
|
|
SERIAL_PROTOCOL_F( ubl.map_x_index_to_bed_location(i), 1); |
|
|
SERIAL_PROTOCOL_F( ubl.map_x_index_to_bed_location(i), 1); |
|
|
SERIAL_PROTOCOLPGM(" "); |
|
|
SERIAL_PROTOCOLPGM(" "); |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
} |
|
|
} |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
|
|
|
|
|
@ -1147,7 +1146,7 @@ |
|
|
for (uint8_t i = 0; i < UBL_MESH_NUM_Y_POINTS; i++) { |
|
|
for (uint8_t i = 0; i < UBL_MESH_NUM_Y_POINTS; i++) { |
|
|
SERIAL_PROTOCOL_F( ubl.map_y_index_to_bed_location(i), 1); |
|
|
SERIAL_PROTOCOL_F( ubl.map_y_index_to_bed_location(i), 1); |
|
|
SERIAL_PROTOCOLPGM(" "); |
|
|
SERIAL_PROTOCOLPGM(" "); |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
} |
|
|
} |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
|
|
|
|
|
@ -1156,13 +1155,13 @@ |
|
|
SERIAL_PROTOCOLLNPAIR(" state:", READ(KILL_PIN)); |
|
|
SERIAL_PROTOCOLLNPAIR(" state:", READ(KILL_PIN)); |
|
|
#endif |
|
|
#endif |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation); |
|
|
SERIAL_PROTOCOLLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
SERIAL_PROTOCOLLNPAIR("ubl_state_recursion_chk :", ubl_state_recursion_chk); |
|
|
SERIAL_PROTOCOLLNPAIR("ubl_state_recursion_chk :", ubl_state_recursion_chk); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
SERIAL_PROTOCOLPGM("Free EEPROM space starts at: 0x"); |
|
|
SERIAL_PROTOCOLPGM("Free EEPROM space starts at: 0x"); |
|
|
prt_hex_word(ubl_eeprom_start); |
|
|
prt_hex_word(ubl_eeprom_start); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
@ -1170,42 +1169,42 @@ |
|
|
SERIAL_PROTOCOLPGM("end of EEPROM : "); |
|
|
SERIAL_PROTOCOLPGM("end of EEPROM : "); |
|
|
prt_hex_word(E2END); |
|
|
prt_hex_word(E2END); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLLNPAIR("sizeof(ubl) : ", (int)sizeof(ubl)); |
|
|
SERIAL_PROTOCOLLNPAIR("sizeof(ubl) : ", (int)sizeof(ubl)); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
SERIAL_PROTOCOLLNPAIR("z_value[][] size: ", (int)sizeof(z_values)); |
|
|
SERIAL_PROTOCOLLNPAIR("z_value[][] size: ", (int)sizeof(z_values)); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("EEPROM free for UBL: 0x"); |
|
|
SERIAL_PROTOCOLPGM("EEPROM free for UBL: 0x"); |
|
|
prt_hex_word(k); |
|
|
prt_hex_word(k); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("EEPROM can hold 0x"); |
|
|
SERIAL_PROTOCOLPGM("EEPROM can hold 0x"); |
|
|
prt_hex_word(k / sizeof(z_values)); |
|
|
prt_hex_word(k / sizeof(z_values)); |
|
|
SERIAL_PROTOCOLLNPGM(" meshes.\n"); |
|
|
SERIAL_PROTOCOLLNPGM(" meshes.\n"); |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("sizeof(ubl.state) :"); |
|
|
SERIAL_PROTOCOLPGM("sizeof(ubl.state) :"); |
|
|
prt_hex_word(sizeof(ubl.state)); |
|
|
prt_hex_word(sizeof(ubl.state)); |
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_NUM_X_POINTS ", UBL_MESH_NUM_X_POINTS); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_NUM_X_POINTS ", UBL_MESH_NUM_X_POINTS); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_NUM_Y_POINTS ", UBL_MESH_NUM_Y_POINTS); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_NUM_Y_POINTS ", UBL_MESH_NUM_Y_POINTS); |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_X ", UBL_MESH_MIN_X); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_X ", UBL_MESH_MIN_X); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_Y ", UBL_MESH_MIN_Y); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_Y ", UBL_MESH_MIN_Y); |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MAX_X ", UBL_MESH_MAX_X); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MAX_X ", UBL_MESH_MAX_X); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MAX_Y ", UBL_MESH_MAX_Y); |
|
|
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MAX_Y ", UBL_MESH_MAX_Y); |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
SERIAL_PROTOCOLPGM("\nMESH_X_DIST "); |
|
|
SERIAL_PROTOCOLPGM("\nMESH_X_DIST "); |
|
|
SERIAL_PROTOCOL_F(MESH_X_DIST, 6); |
|
|
SERIAL_PROTOCOL_F(MESH_X_DIST, 6); |
|
|
SERIAL_PROTOCOLPGM("\nMESH_Y_DIST "); |
|
|
SERIAL_PROTOCOLPGM("\nMESH_Y_DIST "); |
|
|
SERIAL_PROTOCOL_F(MESH_Y_DIST, 6); |
|
|
SERIAL_PROTOCOL_F(MESH_Y_DIST, 6); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
delay(50); |
|
|
safe_delay(50); |
|
|
|
|
|
|
|
|
if (!ubl.sanity_check()) |
|
|
if (!ubl.sanity_check()) |
|
|
SERIAL_PROTOCOLLNPGM("Unified Bed Leveling sanity checks passed."); |
|
|
SERIAL_PROTOCOLLNPGM("Unified Bed Leveling sanity checks passed."); |
|
@ -1408,7 +1407,7 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
delay(20); // We don't want any switch noise.
|
|
|
safe_delay(20); // We don't want any switch noise.
|
|
|
|
|
|
|
|
|
z_values[location.x_index][location.y_index] = new_z; |
|
|
z_values[location.x_index][location.y_index] = new_z; |
|
|
|
|
|
|
|
|