Bladeren bron

Fix MBL "Click to continue" on Color UI touchscreen (#19514)

Victor Oliveira 3 jaren geleden
bovenliggende
commit
a7f5d38da7
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 10 en 1 verwijderingen
  1. 10
    1
      Marlin/src/lcd/menu/menu_bed_leveling.cpp

+ 10
- 1
Marlin/src/lcd/menu/menu_bed_leveling.cpp Bestand weergeven

36
   #include "../../module/probe.h"
36
   #include "../../module/probe.h"
37
 #endif
37
 #endif
38
 
38
 
39
+#if HAS_GRAPHICAL_TFT
40
+  #include "../tft/touch.h"
41
+  #include "../tft/tft.h"
42
+#endif
43
+
39
 #if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING)
44
 #if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING)
40
 
45
 
41
   #include "../../module/motion.h"
46
   #include "../../module/motion.h"
159
   //         Move to the first probe position
164
   //         Move to the first probe position
160
   //
165
   //
161
   void _lcd_level_bed_homing_done() {
166
   void _lcd_level_bed_homing_done() {
162
-    if (ui.should_draw()) MenuItem_static::draw(1, GET_TEXT(MSG_LEVEL_BED_WAITING));
167
+    if (ui.should_draw()) {
168
+      MenuItem_static::draw(1, GET_TEXT(MSG_LEVEL_BED_WAITING));
169
+      // Color UI needs a control to detect a touch
170
+      TERN_(HAS_GRAPHICAL_TFT, touch.add_control(CLICK, 0, 0, TFT_WIDTH, TFT_HEIGHT));
171
+    }
163
     if (ui.use_click()) {
172
     if (ui.use_click()) {
164
       manual_probe_index = 0;
173
       manual_probe_index = 0;
165
       _lcd_level_goto_next_point();
174
       _lcd_level_goto_next_point();

Laden…
Annuleren
Opslaan