|
@@ -2098,14 +2098,16 @@ void MarlinSettings::reset(
|
2098
|
2098
|
|
2099
|
2099
|
#if ENABLED(MESH_BED_LEVELING)
|
2100
|
2100
|
|
2101
|
|
- for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
|
2102
|
|
- for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
|
2103
|
|
- CONFIG_ECHO_START;
|
2104
|
|
- SERIAL_ECHOPAIR_P(port, " G29 S3 X", (int)px + 1);
|
2105
|
|
- SERIAL_ECHOPAIR_P(port, " Y", (int)py + 1);
|
2106
|
|
- SERIAL_ECHOPGM_P(port, " Z");
|
2107
|
|
- SERIAL_PROTOCOL_F_P(port, LINEAR_UNIT(mbl.z_values[px][py]), 5);
|
2108
|
|
- SERIAL_EOL_P(port);
|
|
2101
|
+ if (leveling_is_valid()) {
|
|
2102
|
+ for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
|
|
2103
|
+ for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
|
|
2104
|
+ CONFIG_ECHO_START;
|
|
2105
|
+ SERIAL_ECHOPAIR_P(port, " G29 S3 X", (int)px + 1);
|
|
2106
|
+ SERIAL_ECHOPAIR_P(port, " Y", (int)py + 1);
|
|
2107
|
+ SERIAL_ECHOPGM_P(port, " Z");
|
|
2108
|
+ SERIAL_PROTOCOL_F_P(port, LINEAR_UNIT(mbl.z_values[px][py]), 5);
|
|
2109
|
+ SERIAL_EOL_P(port);
|
|
2110
|
+ }
|
2109
|
2111
|
}
|
2110
|
2112
|
}
|
2111
|
2113
|
|
|
@@ -2119,6 +2121,27 @@ void MarlinSettings::reset(
|
2119
|
2121
|
SERIAL_ECHOLNPGM_P(port, " meshes.\n");
|
2120
|
2122
|
}
|
2121
|
2123
|
|
|
2124
|
+ ubl.report_current_mesh(
|
|
2125
|
+ #if ADD_PORT_ARG
|
|
2126
|
+ port
|
|
2127
|
+ #endif
|
|
2128
|
+ );
|
|
2129
|
+
|
|
2130
|
+ #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
|
2131
|
+
|
|
2132
|
+ if (leveling_is_valid()) {
|
|
2133
|
+ for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
|
|
2134
|
+ for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
|
|
2135
|
+ CONFIG_ECHO_START;
|
|
2136
|
+ SERIAL_ECHOPAIR_P(port, " G29 W I", (int)px + 1);
|
|
2137
|
+ SERIAL_ECHOPAIR_P(port, " J", (int)py + 1);
|
|
2138
|
+ SERIAL_ECHOPGM_P(port, " Z");
|
|
2139
|
+ SERIAL_PROTOCOL_F_P(port, LINEAR_UNIT(z_values[px][py]), 5);
|
|
2140
|
+ SERIAL_EOL_P(port);
|
|
2141
|
+ }
|
|
2142
|
+ }
|
|
2143
|
+ }
|
|
2144
|
+
|
2122
|
2145
|
#endif
|
2123
|
2146
|
|
2124
|
2147
|
#endif // HAS_LEVELING
|