Quellcode durchsuchen

ExtUI Mesh Leveling Extensions (#13363)

InsanityAutomation vor 5 Jahren
Ursprung
Commit
c03df89921

+ 3
- 0
Marlin/src/feature/bedlevel/abl/abl.cpp Datei anzeigen

76
 
76
 
77
   // Take the average instead of the median
77
   // Take the average instead of the median
78
   z_values[x][y] = (a + b + c) / 3.0;
78
   z_values[x][y] = (a + b + c) / 3.0;
79
+  #if ENABLED(EXTENSIBLE_UI)
80
+    ExtUI::onMeshUpdate(x, y, z_values[x][y]);
81
+  #endif
79
 
82
 
80
   // Median is robust (ignores outliers).
83
   // Median is robust (ignores outliers).
81
   // z_values[x][y] = (a < b) ? ((b < c) ? b : (c < a) ? a : c)
84
   // z_values[x][y] = (a < b) ? ((b < c) ? b : (c < a) ? a : c)

+ 5
- 1
Marlin/src/feature/bedlevel/bedlevel.cpp Datei anzeigen

134
     bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
134
     bilinear_start[X_AXIS] = bilinear_start[Y_AXIS] =
135
     bilinear_grid_spacing[X_AXIS] = bilinear_grid_spacing[Y_AXIS] = 0;
135
     bilinear_grid_spacing[X_AXIS] = bilinear_grid_spacing[Y_AXIS] = 0;
136
     for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
136
     for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
137
-      for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
137
+      for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
138
         z_values[x][y] = NAN;
138
         z_values[x][y] = NAN;
139
+        #if ENABLED(EXTENSIBLE_UI)
140
+          ExtUI::onMeshUpdate(x, y, 0);
141
+        #endif
142
+      }
139
   #elif ABL_PLANAR
143
   #elif ABL_PLANAR
140
     planner.bed_level_matrix.set_to_identity();
144
     planner.bed_level_matrix.set_to_identity();
141
   #endif
145
   #endif

+ 5
- 0
Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp Datei anzeigen

47
   void mesh_bed_leveling::reset() {
47
   void mesh_bed_leveling::reset() {
48
     z_offset = 0;
48
     z_offset = 0;
49
     ZERO(z_values);
49
     ZERO(z_values);
50
+    #if ENABLED(EXTENSIBLE_UI)
51
+      for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
52
+        for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) 
53
+            ExtUI::onMeshUpdate(x, y, 0);
54
+    #endif
50
   }
55
   }
51
 
56
 
52
   #if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES)
57
   #if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES)

+ 8
- 0
Marlin/src/feature/bedlevel/ubl/ubl.cpp Datei anzeigen

129
       planner.set_z_fade_height(10.0);
129
       planner.set_z_fade_height(10.0);
130
     #endif
130
     #endif
131
     ZERO(z_values);
131
     ZERO(z_values);
132
+    #if ENABLED(EXTENSIBLE_UI)
133
+      for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
134
+        for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) 
135
+            ExtUI::onMeshUpdate(x, y, 0);
136
+    #endif
132
     if (was_enabled) report_current_position();
137
     if (was_enabled) report_current_position();
133
   }
138
   }
134
 
139
 
141
     for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {
146
     for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {
142
       for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
147
       for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
143
         z_values[x][y] = value;
148
         z_values[x][y] = value;
149
+        #if ENABLED(EXTENSIBLE_UI)
150
+          ExtUI::onMeshUpdate(x, y, value);
151
+        #endif
144
       }
152
       }
145
     }
153
     }
146
   }
154
   }

+ 54
- 3
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Datei anzeigen

335
             break;            // No more invalid Mesh Points to populate
335
             break;            // No more invalid Mesh Points to populate
336
           }
336
           }
337
           z_values[location.x_index][location.y_index] = NAN;
337
           z_values[location.x_index][location.y_index] = NAN;
338
+          #if ENABLED(EXTENSIBLE_UI)
339
+            ExtUI::onMeshUpdate(location.x_index, location.y_index, 0);
340
+          #endif
338
           cnt++;
341
           cnt++;
339
         }
342
         }
340
       }
343
       }
362
               const float p1 = 0.5f * (GRID_MAX_POINTS_X) - x,
365
               const float p1 = 0.5f * (GRID_MAX_POINTS_X) - x,
363
                           p2 = 0.5f * (GRID_MAX_POINTS_Y) - y;
366
                           p2 = 0.5f * (GRID_MAX_POINTS_Y) - y;
364
               z_values[x][y] += 2.0f * HYPOT(p1, p2);
367
               z_values[x][y] += 2.0f * HYPOT(p1, p2);
368
+              #if ENABLED(EXTENSIBLE_UI)
369
+                ExtUI::onMeshUpdate(x, y, z_values[x][y]);
370
+              #endif
365
             }
371
             }
366
           }
372
           }
367
           break;
373
           break;
370
           for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {  // Create a diagonal line several Mesh cells thick that is raised
376
           for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {  // Create a diagonal line several Mesh cells thick that is raised
371
             z_values[x][x] += 9.999f;
377
             z_values[x][x] += 9.999f;
372
             z_values[x][x + (x < GRID_MAX_POINTS_Y - 1) ? 1 : -1] += 9.999f; // We want the altered line several mesh points thick
378
             z_values[x][x + (x < GRID_MAX_POINTS_Y - 1) ? 1 : -1] += 9.999f; // We want the altered line several mesh points thick
379
+            #if ENABLED(EXTENSIBLE_UI)
380
+              ExtUI::onMeshUpdate(x, x, z_values[x][x]);
381
+              ExtUI::onMeshUpdate(x, (x + (x < GRID_MAX_POINTS_Y - 1) ? 1 : -1), z_values[x][x + (x < GRID_MAX_POINTS_Y - 1) ? 1 : -1]);
382
+            #endif
383
+
373
           }
384
           }
374
           break;
385
           break;
375
 
386
 
378
           for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++)   // Create a rectangular raised area in
389
           for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++)   // Create a rectangular raised area in
379
             for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) // the center of the bed
390
             for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) // the center of the bed
380
               z_values[x][y] += parser.seen('C') ? g29_constant : 9.99f;
391
               z_values[x][y] += parser.seen('C') ? g29_constant : 9.99f;
392
+              #if ENABLED(EXTENSIBLE_UI)
393
+                ExtUI::onMeshUpdate(x, y, z_values[x][y]);
394
+              #endif
381
           break;
395
           break;
382
       }
396
       }
383
     }
397
     }
519
                   break; // No more invalid Mesh Points to populate
533
                   break; // No more invalid Mesh Points to populate
520
                 }
534
                 }
521
                 z_values[location.x_index][location.y_index] = g29_constant;
535
                 z_values[location.x_index][location.y_index] = g29_constant;
536
+                #if ENABLED(EXTENSIBLE_UI)
537
+                  ExtUI::onMeshUpdate(location.x_index, location.y_index, z_values[location.x_index][location.y_index]);
538
+                #endif
522
               }
539
               }
523
             }
540
             }
524
           }
541
           }
681
     if (cflag)
698
     if (cflag)
682
       for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
699
       for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
683
         for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
700
         for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
684
-          if (!isnan(z_values[x][y]))
701
+          if (!isnan(z_values[x][y])) {
685
             z_values[x][y] -= mean + value;
702
             z_values[x][y] -= mean + value;
703
+            #if ENABLED(EXTENSIBLE_UI)
704
+              ExtUI::onMeshUpdate(x, y, z_values[x][y]);
705
+            #endif
706
+          }
686
   }
707
   }
687
 
708
 
688
   void unified_bed_leveling::shift_mesh_height() {
709
   void unified_bed_leveling::shift_mesh_height() {
689
     for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
710
     for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
690
       for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
711
       for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
691
-        if (!isnan(z_values[x][y]))
712
+        if (!isnan(z_values[x][y])) {
692
           z_values[x][y] += g29_constant;
713
           z_values[x][y] += g29_constant;
714
+          #if ENABLED(EXTENSIBLE_UI)
715
+            ExtUI::onMeshUpdate(x, y, z_values[x][y]);
716
+          #endif
717
+        }
693
   }
718
   }
694
 
719
 
695
   #if HAS_BED_PROBE
720
   #if HAS_BED_PROBE
736
 
761
 
737
           const float measured_z = probe_pt(rawx, rawy, stow_probe ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level); // TODO: Needs error handling
762
           const float measured_z = probe_pt(rawx, rawy, stow_probe ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level); // TODO: Needs error handling
738
           z_values[location.x_index][location.y_index] = measured_z;
763
           z_values[location.x_index][location.y_index] = measured_z;
764
+          #if ENABLED(EXTENSIBLE_UI)
765
+            ExtUI::onMeshUpdate(location.x_index, location.y_index, measured_z);
766
+          #endif
767
+          
739
         }
768
         }
740
         SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
769
         SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
741
       } while (location.x_index >= 0 && --count);
770
       } while (location.x_index >= 0 && --count);
894
         }
923
         }
895
 
924
 
896
         z_values[location.x_index][location.y_index] = current_position[Z_AXIS] - thick;
925
         z_values[location.x_index][location.y_index] = current_position[Z_AXIS] - thick;
926
+        #if ENABLED(EXTENSIBLE_UI)
927
+          ExtUI::onMeshUpdate(location.x_index, location.y_index, z_values[location.x_index][location.y_index]);
928
+        #endif
929
+
897
         if (g29_verbose_level > 2)
930
         if (g29_verbose_level > 2)
898
           SERIAL_ECHOLNPAIR_F("Mesh Point Measured at: ", z_values[location.x_index][location.y_index], 6);
931
           SERIAL_ECHOLNPAIR_F("Mesh Point Measured at: ", z_values[location.x_index][location.y_index], 6);
899
         SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
932
         SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
994
         if (click_and_hold(abort_fine_tune)) goto FINE_TUNE_EXIT;   // If the click is held down, abort editing
1027
         if (click_and_hold(abort_fine_tune)) goto FINE_TUNE_EXIT;   // If the click is held down, abort editing
995
 
1028
 
996
         z_values[location.x_index][location.y_index] = new_z;       // Save the updated Z value
1029
         z_values[location.x_index][location.y_index] = new_z;       // Save the updated Z value
1030
+        #if ENABLED(EXTENSIBLE_UI)
1031
+          ExtUI::onMeshUpdate(location.x_index, location.y_index, new_z);
1032
+        #endif
997
 
1033
 
998
         serial_delay(20);                                           // No switch noise
1034
         serial_delay(20);                                           // No switch noise
999
         ui.refresh();
1035
         ui.refresh();
1298
         z_values[x][y] = z_values[x1][y1];                      // Use nearest (maybe a little too high.)
1334
         z_values[x][y] = z_values[x1][y1];                      // Use nearest (maybe a little too high.)
1299
       else
1335
       else
1300
         z_values[x][y] = 2.0f * z_values[x1][y1] - z_values[x2][y2];   // Angled upward...
1336
         z_values[x][y] = 2.0f * z_values[x1][y1] - z_values[x2][y2];   // Angled upward...
1337
+
1338
+      #if ENABLED(EXTENSIBLE_UI)
1339
+        ExtUI::onMeshUpdate(x, y, z_values[x][y]);
1340
+      #endif
1341
+
1301
       return true;
1342
       return true;
1302
     }
1343
     }
1303
     return false;
1344
     return false;
1510
           #endif
1551
           #endif
1511
 
1552
 
1512
           z_values[i][j] = z_tmp - lsf_results.D;
1553
           z_values[i][j] = z_tmp - lsf_results.D;
1554
+          #if ENABLED(EXTENSIBLE_UI)
1555
+            ExtUI::onMeshUpdate(i, j, z_values[i][j]);
1556
+          #endif
1513
         }
1557
         }
1514
       }
1558
       }
1515
 
1559
 
1619
             }
1663
             }
1620
             const float ez = -lsf_results.D - lsf_results.A * px - lsf_results.B * py;
1664
             const float ez = -lsf_results.D - lsf_results.A * px - lsf_results.B * py;
1621
             z_values[ix][iy] = ez;
1665
             z_values[ix][iy] = ez;
1666
+            #if ENABLED(EXTENSIBLE_UI)
1667
+              ExtUI::onMeshUpdate(ix, iy, z_values[ix][iy]);
1668
+            #endif
1622
             idle();   // housekeeping
1669
             idle();   // housekeeping
1623
           }
1670
           }
1624
         }
1671
         }
1757
       SERIAL_ECHOLNPAIR("Subtracting mesh in slot ", g29_storage_slot, " from current mesh.");
1804
       SERIAL_ECHOLNPAIR("Subtracting mesh in slot ", g29_storage_slot, " from current mesh.");
1758
 
1805
 
1759
       for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
1806
       for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
1760
-        for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
1807
+        for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
1761
           z_values[x][y] -= tmp_z_values[x][y];
1808
           z_values[x][y] -= tmp_z_values[x][y];
1809
+          #if ENABLED(EXTENSIBLE_UI)
1810
+            ExtUI::onMeshUpdate(x, y, z_values[x][y]);
1811
+          #endif
1812
+        }
1762
     }
1813
     }
1763
 
1814
 
1764
   #endif // UBL_DEVEL_DEBUGGING
1815
   #endif // UBL_DEVEL_DEBUGGING

+ 8
- 1
Marlin/src/gcode/bedlevel/M420.cpp Datei anzeigen

66
         bilinear_grid_spacing[Y_AXIS] = (MAX_PROBE_Y - (MIN_PROBE_Y)) / (GRID_MAX_POINTS_Y - 1);
66
         bilinear_grid_spacing[Y_AXIS] = (MAX_PROBE_Y - (MIN_PROBE_Y)) / (GRID_MAX_POINTS_Y - 1);
67
       #endif
67
       #endif
68
       for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
68
       for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
69
-        for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
69
+        for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
70
           Z_VALUES(x, y) = 0.001 * random(-200, 200);
70
           Z_VALUES(x, y) = 0.001 * random(-200, 200);
71
+          #if ENABLED(EXTENSIBLE_UI)
72
+            ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y));
73
+          #endif
74
+        }
71
       SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_X) " mesh ");
75
       SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_X) " mesh ");
72
       SERIAL_ECHOPAIR(" (", MIN_PROBE_X);
76
       SERIAL_ECHOPAIR(" (", MIN_PROBE_X);
73
       SERIAL_CHAR(','); SERIAL_ECHO(MIN_PROBE_Y);
77
       SERIAL_CHAR(','); SERIAL_ECHO(MIN_PROBE_Y);
176
             #if ENABLED(ABL_BILINEAR_SUBDIVISION)
180
             #if ENABLED(ABL_BILINEAR_SUBDIVISION)
177
               bed_level_virt_interpolate();
181
               bed_level_virt_interpolate();
178
             #endif
182
             #endif
183
+            #if ENABLED(EXTENSIBLE_UI)
184
+              ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y));
185
+            #endif
179
           }
186
           }
180
 
187
 
181
         #endif
188
         #endif

+ 9
- 0
Marlin/src/gcode/bedlevel/abl/G29.cpp Datei anzeigen

321
           #if ENABLED(ABL_BILINEAR_SUBDIVISION)
321
           #if ENABLED(ABL_BILINEAR_SUBDIVISION)
322
             bed_level_virt_interpolate();
322
             bed_level_virt_interpolate();
323
           #endif
323
           #endif
324
+          #if ENABLED(EXTENSIBLE_UI)
325
+            ExtUI::onMeshUpdate(i, j, rz);
326
+          #endif
324
           set_bed_leveling_enabled(abl_should_enable);
327
           set_bed_leveling_enabled(abl_should_enable);
325
           if (abl_should_enable) report_current_position();
328
           if (abl_should_enable) report_current_position();
326
         }
329
         }
548
       #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
551
       #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
549
 
552
 
550
         z_values[xCount][yCount] = measured_z + zoffset;
553
         z_values[xCount][yCount] = measured_z + zoffset;
554
+        #if ENABLED(EXTENSIBLE_UI)
555
+          ExtUI::onMeshUpdate(xCount, yCount, z_values[xCount][yCount]);
556
+        #endif
551
 
557
 
552
         #if ENABLED(DEBUG_LEVELING_FEATURE)
558
         #if ENABLED(DEBUG_LEVELING_FEATURE)
553
           if (DEBUGGING(LEVELING)) {
559
           if (DEBUGGING(LEVELING)) {
723
           #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
729
           #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
724
 
730
 
725
             z_values[xCount][yCount] = measured_z + zoffset;
731
             z_values[xCount][yCount] = measured_z + zoffset;
732
+            #if ENABLED(EXTENSIBLE_UI)
733
+              ExtUI::onMeshUpdate(xCount, yCount, z_values[xCount][yCount]);
734
+            #endif
726
 
735
 
727
           #endif
736
           #endif
728
 
737
 

+ 3
- 0
Marlin/src/gcode/bedlevel/abl/M421.cpp Datei anzeigen

54
     #if ENABLED(ABL_BILINEAR_SUBDIVISION)
54
     #if ENABLED(ABL_BILINEAR_SUBDIVISION)
55
       bed_level_virt_interpolate();
55
       bed_level_virt_interpolate();
56
     #endif
56
     #endif
57
+    #if ENABLED(EXTENSIBLE_UI)
58
+      ExtUI::onMeshUpdate(ix, iy, z_values[ix][iy]);
59
+    #endif
57
   }
60
   }
58
 }
61
 }
59
 
62
 

+ 5
- 1
Marlin/src/gcode/bedlevel/mbl/G29.cpp Datei anzeigen

173
       else
173
       else
174
         return echo_not_entered('J');
174
         return echo_not_entered('J');
175
 
175
 
176
-      if (parser.seenval('Z'))
176
+      if (parser.seenval('Z')) {
177
         mbl.z_values[ix][iy] = parser.value_linear_units();
177
         mbl.z_values[ix][iy] = parser.value_linear_units();
178
+        #if ENABLED(EXTENSIBLE_UI)
179
+          ExtUI::onMeshUpdate(ix, iy, mbl.z_values[ix][iy]);
180
+        #endif
181
+      }
178
       else
182
       else
179
         return echo_not_entered('Z');
183
         return echo_not_entered('Z');
180
       break;
184
       break;

+ 5
- 1
Marlin/src/gcode/bedlevel/ubl/M421.cpp Datei anzeigen

60
     SERIAL_ERROR_MSG(MSG_ERR_M421_PARAMETERS);
60
     SERIAL_ERROR_MSG(MSG_ERR_M421_PARAMETERS);
61
   else if (!WITHIN(ix, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))
61
   else if (!WITHIN(ix, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))
62
     SERIAL_ERROR_MSG(MSG_ERR_MESH_XY);
62
     SERIAL_ERROR_MSG(MSG_ERR_MESH_XY);
63
-  else
63
+  else {
64
     ubl.z_values[ix][iy] = hasN ? NAN : parser.value_linear_units() + (hasQ ? ubl.z_values[ix][iy] : 0);
64
     ubl.z_values[ix][iy] = hasN ? NAN : parser.value_linear_units() + (hasQ ? ubl.z_values[ix][iy] : 0);
65
+    #if ENABLED(EXTENSIBLE_UI)
66
+      ExtUI::onMeshUpdate(ix, iy, ubl.z_values[ix][iy]);
67
+    #endif
68
+  }
65
 }
69
 }
66
 
70
 
67
 #endif // AUTO_BED_LEVELING_UBL
71
 #endif // AUTO_BED_LEVELING_UBL

+ 21
- 0
Marlin/src/lcd/extensible_ui/ui_api.cpp Datei anzeigen

577
     return elapsed.value;
577
     return elapsed.value;
578
   }
578
   }
579
 
579
 
580
+  #if HAS_LEVELING
581
+    bool getLevelingActive() { return planner.leveling_active; }
582
+    void setLevelingActive(const bool state) { set_bed_leveling_enabled(state) }
583
+    #if HAS_MESH
584
+      bool getMeshValid() { return leveling_is_valid(); }
585
+      bed_mesh_t getMeshArray() { return Z_VALUES; }
586
+      void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zoff) {
587
+        if (WITHIN(xpos, 0, GRID_MAX_POINTS_X) && WITHIN(ypos, 0, GRID_MAX_POINTS_Y)) {
588
+          Z_VALUES(xpos, ypos) = zoff;
589
+          #if ENABLED(ABL_BILINEAR_SUBDIVISION)
590
+            bed_level_virt_interpolate();
591
+          #endif
592
+        }
593
+      }
594
+    #endif
595
+  #endif
596
+
597
+  #if ENABLED(HOST_PROMPT_SUPPORT)
598
+    void setHostResponse(const uint8_t response) { host_response_handler(response); }
599
+  #endif
600
+
580
   #if ENABLED(PRINTCOUNTER)
601
   #if ENABLED(PRINTCOUNTER)
581
     char* getTotalPrints_str(char buffer[21])    { strcpy(buffer,i16tostr3left(print_job_timer.getStats().totalPrints));    return buffer; }
602
     char* getTotalPrints_str(char buffer[21])    { strcpy(buffer,i16tostr3left(print_job_timer.getStats().totalPrints));    return buffer; }
582
     char* getFinishedPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().finishedPrints)); return buffer; }
603
     char* getFinishedPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().finishedPrints)); return buffer; }

+ 16
- 0
Marlin/src/lcd/extensible_ui/ui_api.h Datei anzeigen

90
   float getFeedrate_percent();
90
   float getFeedrate_percent();
91
   uint8_t getProgress_percent();
91
   uint8_t getProgress_percent();
92
   uint32_t getProgress_seconds_elapsed();
92
   uint32_t getProgress_seconds_elapsed();
93
+  
94
+  #if HAS_LEVELING
95
+    bool getLevelingActive();
96
+    void setLevelingActive(const bool);
97
+    #if HAS_MESH
98
+      typedef float (&bed_mesh_t)[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
99
+      bool getMeshValid();
100
+      bed_mesh_t getMeshArray();
101
+      void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zval);
102
+      void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval);
103
+    #endif
104
+  #endif
105
+
106
+  #if ENABLED(HOST_PROMPT_SUPPORT)
107
+    void setHostResponse(const uint8_t);
108
+  #endif
93
 
109
 
94
   #if ENABLED(PRINTCOUNTER)
110
   #if ENABLED(PRINTCOUNTER)
95
     char* getTotalPrints_str(char buffer[21]);
111
     char* getTotalPrints_str(char buffer[21]);

+ 1
- 1
buildroot/share/tests/megaatmega2560-tests Datei anzeigen

42
            MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING BACKLASH_COMPENSATION BACKLASH_GCODE
42
            MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING BACKLASH_COMPENSATION BACKLASH_GCODE
43
 opt_enable SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER
43
 opt_enable SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER
44
 opt_set TEMP_SENSOR_CHAMBER 3
44
 opt_set TEMP_SENSOR_CHAMBER 3
45
-opt_add CHAMBER_HEATER_PIN 45
45
+opt_set CHAMBER_HEATER_PIN 45
46
 exec_test $1 $2 "RAMPS with 2 extruders, RRDFGSC, Linear ABL, LEDs, and many options"
46
 exec_test $1 $2 "RAMPS with 2 extruders, RRDFGSC, Linear ABL, LEDs, and many options"
47
 
47
 
48
 #
48
 #

Laden…
Abbrechen
Speichern