|
@@ -36,6 +36,7 @@
|
36
|
36
|
#include "../../../module/planner.h"
|
37
|
37
|
#include "../../../module/probe.h"
|
38
|
38
|
#include "../../../gcode/gcode.h"
|
|
39
|
+ #include "../../../core/serial.h"
|
39
|
40
|
#include "../../../gcode/parser.h"
|
40
|
41
|
#include "../../../feature/bedlevel/bedlevel.h"
|
41
|
42
|
#include "../../../libs/least_squares_fit.h"
|
|
@@ -59,8 +60,6 @@
|
59
|
60
|
|
60
|
61
|
extern float meshedit_done;
|
61
|
62
|
extern long babysteps_done;
|
62
|
|
- //extern bool set_probe_deployed(bool);
|
63
|
|
- //extern void set_bed_leveling_enabled(bool);
|
64
|
63
|
|
65
|
64
|
#define SIZE_OF_LITTLE_RAISE 1
|
66
|
65
|
#define BIG_RAISE_NOT_NEEDED 0
|
|
@@ -720,7 +719,7 @@
|
720
|
719
|
}
|
721
|
720
|
}
|
722
|
721
|
}
|
723
|
|
- safe_delay(5);
|
|
722
|
+ safe_delay(15);
|
724
|
723
|
return false;
|
725
|
724
|
}
|
726
|
725
|
|
|
@@ -754,6 +753,7 @@
|
754
|
753
|
while (is_lcd_clicked()) idle();
|
755
|
754
|
lcd_external_control = false;
|
756
|
755
|
restore_ubl_active_state_and_leave();
|
|
756
|
+ lcd_quick_feedback(true);
|
757
|
757
|
safe_delay(50); // Debounce the Encoder wheel
|
758
|
758
|
return;
|
759
|
759
|
}
|
|
@@ -771,6 +771,9 @@
|
771
|
771
|
const float measured_z = probe_pt(rawx, rawy, stow_probe, g29_verbose_level); // TODO: Needs error handling
|
772
|
772
|
z_values[location.x_index][location.y_index] = measured_z;
|
773
|
773
|
}
|
|
774
|
+ MYSERIAL0.flush(); // G29 P2's take a long time to complete. PronterFace can
|
|
775
|
+ // over run the serial character buffer with M105's without
|
|
776
|
+ // this fix
|
774
|
777
|
|
775
|
778
|
} while (location.x_index >= 0 && --max_iterations);
|
776
|
779
|
|
|
@@ -853,6 +856,7 @@
|
853
|
856
|
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
|
854
|
857
|
lcd_external_control = false;
|
855
|
858
|
KEEPALIVE_STATE(IN_HANDLER);
|
|
859
|
+ lcd_quick_feedback(true);
|
856
|
860
|
ubl.restore_ubl_active_state_and_leave();
|
857
|
861
|
}
|
858
|
862
|
|
|
@@ -908,9 +912,12 @@
|
908
|
912
|
SERIAL_PROTOCOL_F(z_values[location.x_index][location.y_index], 6);
|
909
|
913
|
SERIAL_EOL();
|
910
|
914
|
}
|
|
915
|
+ MYSERIAL0.flush(); // G29 P2's take a long time to complete. PronterFace can
|
|
916
|
+ // over run the serial character buffer with M105's without
|
|
917
|
+ // this fix
|
911
|
918
|
} while (location.x_index >= 0 && location.y_index >= 0);
|
912
|
919
|
|
913
|
|
- if (do_ubl_mesh_map) display_map(g29_map_type);
|
|
920
|
+ if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing
|
914
|
921
|
|
915
|
922
|
restore_ubl_active_state_and_leave();
|
916
|
923
|
KEEPALIVE_STATE(IN_HANDLER);
|
|
@@ -1035,12 +1042,12 @@
|
1035
|
1042
|
|
1036
|
1043
|
static uint8_t ubl_state_at_invocation = 0;
|
1037
|
1044
|
|
1038
|
|
- #ifdef UBL_DEVEL_DEBUGGING
|
|
1045
|
+ #if ENABLED(UBL_DEVEL_DEBUGGING)
|
1039
|
1046
|
static uint8_t ubl_state_recursion_chk = 0;
|
1040
|
1047
|
#endif
|
1041
|
1048
|
|
1042
|
1049
|
void unified_bed_leveling::save_ubl_active_state_and_disable() {
|
1043
|
|
- #ifdef UBL_DEVEL_DEBUGGING
|
|
1050
|
+ #if ENABLED(UBL_DEVEL_DEBUGGING)
|
1044
|
1051
|
ubl_state_recursion_chk++;
|
1045
|
1052
|
if (ubl_state_recursion_chk != 1) {
|
1046
|
1053
|
SERIAL_ECHOLNPGM("save_ubl_active_state_and_disabled() called multiple times in a row.");
|
|
@@ -1056,7 +1063,7 @@
|
1056
|
1063
|
}
|
1057
|
1064
|
|
1058
|
1065
|
void unified_bed_leveling::restore_ubl_active_state_and_leave() {
|
1059
|
|
- #ifdef UBL_DEVEL_DEBUGGING
|
|
1066
|
+ #if ENABLED(UBL_DEVEL_DEBUGGING)
|
1060
|
1067
|
if (--ubl_state_recursion_chk) {
|
1061
|
1068
|
SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times.");
|
1062
|
1069
|
#if ENABLED(NEWPANEL)
|
|
@@ -1110,11 +1117,12 @@
|
1110
|
1117
|
SERIAL_ECHOLNPAIR("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y);
|
1111
|
1118
|
safe_delay(50);
|
1112
|
1119
|
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X);
|
|
1120
|
+ safe_delay(50);
|
1113
|
1121
|
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y);
|
1114
|
|
- safe_delay(25);
|
|
1122
|
+ safe_delay(50);
|
1115
|
1123
|
SERIAL_ECHOLNPAIR("MESH_X_DIST ", MESH_X_DIST);
|
1116
|
1124
|
SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST);
|
1117
|
|
- safe_delay(25);
|
|
1125
|
+ safe_delay(50);
|
1118
|
1126
|
|
1119
|
1127
|
SERIAL_PROTOCOLPGM("X-Axis Mesh Points at: ");
|
1120
|
1128
|
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
|
|
@@ -1139,7 +1147,7 @@
|
1139
|
1147
|
SERIAL_EOL();
|
1140
|
1148
|
safe_delay(50);
|
1141
|
1149
|
|
1142
|
|
- #ifdef UBL_DEVEL_DEBUGGING
|
|
1150
|
+ #if ENABLED(UBL_DEVEL_DEBUGGING)
|
1143
|
1151
|
SERIAL_PROTOCOLLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation);
|
1144
|
1152
|
SERIAL_EOL();
|
1145
|
1153
|
SERIAL_PROTOCOLLNPAIR("ubl_state_recursion_chk :", ubl_state_recursion_chk);
|
|
@@ -1352,6 +1360,7 @@
|
1352
|
1360
|
lcd_return_to_status();
|
1353
|
1361
|
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
|
1354
|
1362
|
LCD_MESSAGEPGM(MSG_EDITING_STOPPED);
|
|
1363
|
+ lcd_quick_feedback(true);
|
1355
|
1364
|
}
|
1356
|
1365
|
|
1357
|
1366
|
void unified_bed_leveling::fine_tune_mesh(const float &rx, const float &ry, const bool do_ubl_mesh_map) {
|
|
@@ -1417,6 +1426,9 @@
|
1417
|
1426
|
do_blocking_move_to_z(h_offset + new_z); // Move the nozzle as the point is edited
|
1418
|
1427
|
#endif
|
1419
|
1428
|
idle();
|
|
1429
|
+ MYSERIAL0.flush(); // G29 P2's take a long time to complete. PronterFace can
|
|
1430
|
+ // over run the serial character buffer with M105's without
|
|
1431
|
+ // this fix
|
1420
|
1432
|
} while (!is_lcd_clicked());
|
1421
|
1433
|
|
1422
|
1434
|
if (!lcd_map_control) lcd_return_to_status();
|
|
@@ -1426,9 +1438,6 @@
|
1426
|
1438
|
// Let's work on specifying a proper API for the LCD ASAP, OK?
|
1427
|
1439
|
lcd_external_control = true;
|
1428
|
1440
|
|
1429
|
|
- // this sequence to detect an is_lcd_clicked() debounce it and leave if it is
|
1430
|
|
- // a Press and Hold is repeated in a lot of places (including G26_Mesh_Validation.cpp). This
|
1431
|
|
- // should be redone and compressed.
|
1432
|
1441
|
if (click_and_hold(abort_fine_tune))
|
1433
|
1442
|
goto FINE_TUNE_EXIT;
|
1434
|
1443
|
|