|
@@ -21,7 +21,7 @@
|
21
|
21
|
|
22
|
22
|
#include "../config.h"
|
23
|
23
|
|
24
|
|
-#if BOTH(TOUCH_UI_FTDI_EVE, AUTO_BED_LEVELING_UBL)
|
|
24
|
+#if BOTH(TOUCH_UI_FTDI_EVE, HAS_MESH)
|
25
|
25
|
|
26
|
26
|
#include "screens.h"
|
27
|
27
|
#include "screen_data.h"
|
|
@@ -309,17 +309,6 @@ void BedMeshScreen::onMeshUpdate(const int8_t, const int8_t, const float) {
|
309
|
309
|
onRefresh();
|
310
|
310
|
}
|
311
|
311
|
|
312
|
|
-bool BedMeshScreen::isMeshComplete(ExtUI::bed_mesh_t data) {
|
313
|
|
- for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
|
314
|
|
- for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {
|
315
|
|
- if (isnan(data[x][y])) {
|
316
|
|
- return false;
|
317
|
|
- }
|
318
|
|
- }
|
319
|
|
- }
|
320
|
|
- return true;
|
321
|
|
-}
|
322
|
|
-
|
323
|
312
|
void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) {
|
324
|
313
|
switch (state) {
|
325
|
314
|
case ExtUI::MESH_START:
|
|
@@ -327,7 +316,7 @@ void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::pr
|
327
|
316
|
screen_data.BedMesh.message = screen_data.BedMesh.MSG_NONE;
|
328
|
317
|
break;
|
329
|
318
|
case ExtUI::MESH_FINISH:
|
330
|
|
- if (screen_data.BedMesh.count == GRID_MAX_POINTS && isMeshComplete(ExtUI::getMeshArray()))
|
|
319
|
+ if (screen_data.BedMesh.count == GRID_MAX_POINTS && ExtUI::getMeshValid())
|
331
|
320
|
screen_data.BedMesh.message = screen_data.BedMesh.MSG_MESH_COMPLETE;
|
332
|
321
|
else
|
333
|
322
|
screen_data.BedMesh.message = screen_data.BedMesh.MSG_MESH_INCOMPLETE;
|