Browse Source

Touch UI additions, bug fixes (#17379)

Marcio T 5 years ago
parent
commit
be0e313c07
No account linked to committer's email address

+ 4
- 0
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -776,12 +776,16 @@
776 776
           : find_closest_mesh_point_of_type(INVALID, near, true);
777 777
 
778 778
         if (best.pos.x >= 0) {    // mesh point found and is reachable by probe
779
+          #if ENABLED(EXTENSIBLE_UI)
780
+            ExtUI::onMeshUpdate(best.pos, ExtUI::PROBE_START);
781
+          #endif
779 782
           const float measured_z = probe.probe_at_point(
780 783
                         best.meshpos(),
781 784
                         stow_probe ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level
782 785
                       );
783 786
           z_values[best.pos.x][best.pos.y] = measured_z;
784 787
           #if ENABLED(EXTENSIBLE_UI)
788
+            ExtUI::onMeshUpdate(best.pos, ExtUI::PROBE_FINISH);
785 789
             ExtUI::onMeshUpdate(best.pos, measured_z);
786 790
           #endif
787 791
         }

+ 6
- 6
Marlin/src/feature/pause.cpp View File

@@ -499,10 +499,10 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
499 499
   // Wait for filament insert by user and press button
500 500
   KEEPALIVE_STATE(PAUSED_FOR_USER);
501 501
   #if ENABLED(HOST_PROMPT_SUPPORT)
502
-    host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Nozzle Parked"), CONTINUE_STR);
502
+    host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_NOZZLE_PARKED), CONTINUE_STR);
503 503
   #endif
504 504
   #if ENABLED(EXTENSIBLE_UI)
505
-    ExtUI::onUserConfirmRequired_P(PSTR("Nozzle Parked"));
505
+    ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_NOZZLE_PARKED));
506 506
   #endif
507 507
   wait_for_user = true;    // LCD click or M108 will clear this
508 508
   while (wait_for_user) {
@@ -523,20 +523,20 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
523 523
       SERIAL_ECHO_MSG(_PMSG(STR_FILAMENT_CHANGE_HEAT));
524 524
 
525 525
       #if ENABLED(HOST_PROMPT_SUPPORT)
526
-        host_prompt_do(PROMPT_USER_CONTINUE, PSTR("HeaterTimeout"), PSTR("Reheat"));
526
+        host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_HEATER_TIMEOUT), GET_TEXT(MSG_REHEAT));
527 527
       #endif
528 528
 
529 529
       #if ENABLED(EXTENSIBLE_UI)
530
-        ExtUI::onUserConfirmRequired_P(PSTR("HeaterTimeout"));
530
+        ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_HEATER_TIMEOUT));
531 531
       #endif
532 532
 
533 533
       wait_for_user_response(0, true); // Wait for LCD click or M108
534 534
 
535 535
       #if ENABLED(HOST_PROMPT_SUPPORT)
536
-        host_prompt_do(PROMPT_INFO, PSTR("Reheating"));
536
+        host_prompt_do(PROMPT_INFO, GET_TEXT(MSG_REHEATING));
537 537
       #endif
538 538
       #if ENABLED(EXTENSIBLE_UI)
539
-        ExtUI::onStatusChanged(PSTR("Reheating..."));
539
+        ExtUI::onStatusChanged(GET_TEXT(MSG_REHEATING));
540 540
       #endif
541 541
 
542 542
       // Re-enable the heaters if they timed out

+ 6
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp View File

@@ -127,7 +127,12 @@ namespace ExtUI {
127 127
   }
128 128
 
129 129
   #if HAS_LEVELING && HAS_MESH
130
-    void onMeshUpdate(const int8_t, const int8_t, const float) {
130
+    void onMeshUpdate(const int8_t x, const int8_t y, const float val) {
131
+      BedMeshScreen::onMeshUpdate(x, y, val);
132
+    }
133
+
134
+    void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) {
135
+      BedMeshScreen::onMeshUpdate(x, y, state);
131 136
     }
132 137
   #endif
133 138
 

+ 268
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp View File

@@ -0,0 +1,268 @@
1
+/***********************
2
+ * bed_mesh_screen.cpp *
3
+ ***********************/
4
+
5
+/****************************************************************************
6
+ *   Written By Marcio Teixeira 2020                                        *
7
+ *                                                                          *
8
+ *   This program is free software: you can redistribute it and/or modify   *
9
+ *   it under the terms of the GNU General Public License as published by   *
10
+ *   the Free Software Foundation, either version 3 of the License, or      *
11
+ *   (at your option) any later version.                                    *
12
+ *                                                                          *
13
+ *   This program is distributed in the hope that it will be useful,        *
14
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
15
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
16
+ *   GNU General Public License for more details.                           *
17
+ *                                                                          *
18
+ *   To view a copy of the GNU General Public License, go to the following  *
19
+ *   location: <http://www.gnu.org/licenses/>.                              *
20
+ ****************************************************************************/
21
+
22
+#include "../config.h"
23
+
24
+#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_MESH
25
+
26
+#include "screens.h"
27
+#include "screen_data.h"
28
+
29
+using namespace FTDI;
30
+using namespace Theme;
31
+using namespace ExtUI;
32
+
33
+#ifdef TOUCH_UI_PORTRAIT
34
+  #define GRID_COLS 2
35
+  #define GRID_ROWS 10
36
+
37
+  #define MESH_POS    BTN_POS(1, 2), BTN_SIZE(2,5)
38
+  #define Z_LABEL_POS BTN_POS(1, 8), BTN_SIZE(1,1)
39
+  #define Z_VALUE_POS BTN_POS(2, 8), BTN_SIZE(1,1)
40
+  #define WAIT_POS    BTN_POS(1, 8), BTN_SIZE(2,1)
41
+  #define BACK_POS    BTN_POS(1,10), BTN_SIZE(2,1)
42
+#else
43
+  #define GRID_COLS 5
44
+  #define GRID_ROWS 5
45
+
46
+  #define MESH_POS       BTN_POS(2,1), BTN_SIZE(4,5)
47
+  #define Z_LABEL_POS    BTN_POS(1,3), BTN_SIZE(1,1)
48
+  #define Z_VALUE_POS    BTN_POS(1,4), BTN_SIZE(2,1)
49
+  #define WAIT_POS       BTN_POS(1,3), BTN_SIZE(2,2)
50
+  #define BACK_POS       BTN_POS(1,5), BTN_SIZE(2,1)
51
+#endif
52
+
53
+void BedMeshScreen::drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI::bed_mesh_t data, uint8_t opts) {
54
+  CommandProcessor cmd;
55
+
56
+  #define TRANSFORM_2(X,Y,Z)  (X), (Y)                                                             // No transform
57
+  #define TRANSFORM_1(X,Y,Z)  TRANSFORM_2((X) + (Y) * slant, (Y) - (Z), 0)                         // Perspective
58
+  #define TRANSFORM(X,Y,Z)    TRANSFORM_1(float(X)/(cols-1) - 0.5, float(Y)/(rows-1)  - 0.5, (Z))  // Normalize
59
+
60
+  constexpr uint8_t rows   = GRID_MAX_POINTS_Y;
61
+  constexpr uint8_t cols   = GRID_MAX_POINTS_X;
62
+  const float slant        = 0.5;
63
+  const float bounds_min[] = {TRANSFORM(0   ,0   ,0)};
64
+  const float bounds_max[] = {TRANSFORM(cols,rows,0)};
65
+  const float scale_x      = float(w)/(bounds_max[0] - bounds_min[0]);
66
+  const float scale_y      = float(h)/(bounds_max[1] - bounds_min[1]);
67
+  const float center_x     = x + w/2;
68
+  const float center_y     = y + h/2;
69
+
70
+  float   val_mean = 0;
71
+  float   val_max  = -INFINITY;
72
+  float   val_min  =  INFINITY;
73
+  uint8_t val_cnt  = 0;
74
+
75
+  if (opts & USE_AUTOSCALE) {
76
+    // Compute the mean
77
+    for (uint8_t y = 0; y < rows; y++) {
78
+      for (uint8_t x = 0; x < cols; x++) {
79
+        const float val = data[x][y];
80
+        if (!isnan(val)) {
81
+          val_mean += val;
82
+          val_max   = max(val_max, val);
83
+          val_min   = min(val_min, val);
84
+          val_cnt++;
85
+        }
86
+      }
87
+    }
88
+    if (val_cnt) {
89
+      val_mean /= val_cnt;
90
+      val_min  -= val_mean;
91
+      val_max  -= val_mean;
92
+    } else {
93
+      val_mean = 0;
94
+      val_min  = 0;
95
+      val_max  = 0;
96
+    }
97
+  }
98
+
99
+  const float scale_z = ((val_max == val_min) ? 1 : 1/(val_max - val_min)) * 0.1;
100
+
101
+  #undef  TRANSFORM_2
102
+  #define TRANSFORM_2(X,Y,Z)  center_x + (X) * scale_x, center_y + (Y) * scale_y      // Scale and position
103
+  #define VALUE(X,Y)         ((data && ISVAL(X,Y)) ? data[X][Y] : 0)
104
+  #define ISVAL(X,Y)         (data ? !isnan(data[X][Y]) : true)
105
+  #define HEIGHT(X,Y)        (VALUE(X,Y) * scale_z)
106
+
107
+  uint16_t basePointSize = min(scale_x,scale_y) / max(cols,rows);
108
+
109
+  cmd.cmd(SAVE_CONTEXT())
110
+     .cmd(VERTEX_FORMAT(0))
111
+     .cmd(TAG_MASK(false))
112
+     .cmd(SAVE_CONTEXT());
113
+
114
+  for (uint8_t y = 0; y < rows; y++) {
115
+    for (uint8_t x = 0; x < cols; x++) {
116
+      if (ISVAL(x,y)) {
117
+       const bool hasLeftSegment  = x < cols - 1 && ISVAL(x+1,y);
118
+       const bool hasRightSegment = y < rows - 1 && ISVAL(x,y+1);
119
+       if (hasLeftSegment || hasRightSegment) {
120
+         cmd.cmd(BEGIN(LINE_STRIP));
121
+         if (hasLeftSegment)  cmd.cmd(VERTEX2F(TRANSFORM(x + 1, y    , HEIGHT(x + 1, y    ))));
122
+         cmd.cmd(                     VERTEX2F(TRANSFORM(x    , y    , HEIGHT(x    , y    ))));
123
+         if (hasRightSegment) cmd.cmd(VERTEX2F(TRANSFORM(x    , y + 1, HEIGHT(x    , y + 1))));
124
+       }
125
+      }
126
+    }
127
+
128
+    if (opts & USE_POINTS) {
129
+      cmd.cmd(POINT_SIZE(basePointSize * 2));
130
+      cmd.cmd(BEGIN(POINTS));
131
+      for (uint8_t x = 0; x < cols; x++) {
132
+        if (ISVAL(x,y)) {
133
+          if (opts & USE_COLORS) {
134
+            const float   val_dev  = VALUE(x, y) - val_mean;
135
+            const uint8_t neg_byte = sq(val_dev) / sq(val_dev < 0 ? val_min : val_max) * 0xFF;
136
+            const uint8_t pos_byte = 255 - neg_byte;
137
+            cmd.cmd(COLOR_RGB(pos_byte, pos_byte, 0xFF));
138
+          }
139
+          cmd.cmd(VERTEX2F(TRANSFORM(x, y, HEIGHT(x, y))));
140
+        }
141
+      }
142
+      if (opts & USE_COLORS) {
143
+        cmd.cmd(RESTORE_CONTEXT())
144
+           .cmd(SAVE_CONTEXT());
145
+      }
146
+    }
147
+  }
148
+  cmd.cmd(RESTORE_CONTEXT())
149
+     .cmd(TAG_MASK(true));
150
+
151
+  if (opts & USE_TAGS) {
152
+    cmd.cmd(COLOR_MASK(false, false, false, false))
153
+       .cmd(POINT_SIZE(basePointSize * 10))
154
+       .cmd(BEGIN(POINTS));
155
+    for (uint8_t y = 0; y < rows; y++) {
156
+      for (uint8_t x = 0; x < cols; x++) {
157
+        const uint8_t tag = pointToTag(x, y);
158
+        cmd.tag(tag).cmd(VERTEX2F(TRANSFORM(x, y, HEIGHT(x, y))));
159
+      }
160
+    }
161
+    cmd.cmd(COLOR_MASK(true, true, true, true));
162
+  }
163
+
164
+  if (opts & USE_HIGHLIGHT) {
165
+    const uint8_t tag = screen_data.BedMeshScreen.highlightedTag;
166
+    uint8_t x, y;
167
+    tagToPoint(tag, x, y);
168
+    cmd.cmd(COLOR_A(128))
169
+       .cmd(POINT_SIZE(basePointSize * 6))
170
+       .cmd(BEGIN(POINTS))
171
+       .tag(tag).cmd(VERTEX2F(TRANSFORM(x, y, HEIGHT(x, y))));
172
+  }
173
+  cmd.cmd(END());
174
+  cmd.cmd(RESTORE_CONTEXT());
175
+}
176
+
177
+uint8_t BedMeshScreen::pointToTag(uint8_t x, uint8_t y) {
178
+  return y * (GRID_MAX_POINTS_X) + x + 10;
179
+}
180
+
181
+void BedMeshScreen::tagToPoint(uint8_t tag, uint8_t &x, uint8_t &y) {
182
+  x = (tag - 10) % (GRID_MAX_POINTS_X);
183
+  y = (tag - 10) / (GRID_MAX_POINTS_X);
184
+}
185
+
186
+void BedMeshScreen::onEntry() {
187
+  screen_data.BedMeshScreen.highlightedTag = 0;
188
+  screen_data.BedMeshScreen.count = 0;
189
+  BaseScreen::onEntry();
190
+}
191
+
192
+float BedMeshScreen::getHightlightedValue() {
193
+  if (screen_data.BedMeshScreen.highlightedTag) {
194
+    xy_uint8_t pt;
195
+    tagToPoint(screen_data.BedMeshScreen.highlightedTag, pt.x, pt.y);
196
+    return ExtUI::getMeshPoint(pt);
197
+  }
198
+  return NAN;
199
+}
200
+
201
+void BedMeshScreen::drawHighlightedPointValue() {
202
+  char str[16];
203
+  const float val = getHightlightedValue();
204
+  const bool isGood = !isnan(val);
205
+  if (isGood)
206
+    dtostrf(val, 5, 3, str);
207
+  else
208
+    strcpy_P(str, PSTR("-"));
209
+
210
+  CommandProcessor cmd;
211
+  cmd.font(Theme::font_medium)
212
+     .text(Z_LABEL_POS, GET_TEXT_F(MSG_MESH_EDIT_Z))
213
+     .text(Z_VALUE_POS, str)
214
+     .colors(action_btn)
215
+     .tag(1).button( BACK_POS, GET_TEXT_F(MSG_BACK))
216
+     .tag(0);
217
+}
218
+
219
+void BedMeshScreen::onRedraw(draw_mode_t what) {
220
+  if (what & BACKGROUND) {
221
+    CommandProcessor cmd;
222
+    cmd.cmd(CLEAR_COLOR_RGB(bg_color))
223
+       .cmd(CLEAR(true,true,true));
224
+
225
+    // Draw the shadow and tags
226
+    cmd.cmd(COLOR_RGB(0x444444));
227
+    BedMeshScreen::drawMesh(MESH_POS, nullptr, USE_POINTS | USE_TAGS);
228
+    cmd.cmd(COLOR_RGB(bg_text_enabled));
229
+  }
230
+
231
+  if (what & FOREGROUND) {
232
+    const bool levelingFinished = screen_data.BedMeshScreen.count >= GRID_MAX_POINTS;
233
+    if (levelingFinished) drawHighlightedPointValue();
234
+
235
+    BedMeshScreen::drawMesh(MESH_POS, ExtUI::getMeshArray(),
236
+      USE_POINTS | USE_HIGHLIGHT | USE_AUTOSCALE | (levelingFinished ? USE_COLORS : 0));
237
+  }
238
+}
239
+
240
+bool BedMeshScreen::onTouchStart(uint8_t tag) {
241
+  screen_data.BedMeshScreen.highlightedTag = tag;
242
+  return true;
243
+}
244
+
245
+bool BedMeshScreen::onTouchEnd(uint8_t tag) {
246
+  switch(tag) {
247
+    case 1:
248
+      GOTO_PREVIOUS();
249
+      return true;
250
+    default:
251
+      return false;
252
+  }
253
+}
254
+
255
+void BedMeshScreen::onMeshUpdate(const int8_t, const int8_t, const float) {
256
+  if (AT_SCREEN(BedMeshScreen))
257
+    onRefresh();
258
+}
259
+
260
+void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) {
261
+  if (state == ExtUI::PROBE_FINISH) {
262
+    screen_data.BedMeshScreen.highlightedTag = pointToTag(x, y);
263
+    screen_data.BedMeshScreen.count++;
264
+  }
265
+  BedMeshScreen::onMeshUpdate(x, y, 0);
266
+}
267
+
268
+#endif // TOUCH_UI_FTDI_EVE

+ 12
- 8
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp View File

@@ -146,14 +146,18 @@ bool MainMenu::onTouchEnd(uint8_t tag) {
146 146
     #ifdef AXIS_LEVELING_COMMANDS
147 147
     case 9: SpinnerDialogBox::enqueueAndWait_P(F(AXIS_LEVELING_COMMANDS)); break;
148 148
     #endif
149
-    #ifdef HAS_LEVELING
150
-    case 10:  SpinnerDialogBox::enqueueAndWait_P(F(
151
-      #ifdef BED_LEVELING_COMMANDS
152
-        BED_LEVELING_COMMANDS
153
-      #else
154
-        "G29"
155
-      #endif
156
-    ));            break;
149
+    #if HAS_LEVELING
150
+      case 10:
151
+        #ifndef BED_LEVELING_COMMANDS
152
+          #define BED_LEVELING_COMMANDS "G29"
153
+        #endif
154
+        #if HAS_MESH
155
+          GOTO_SCREEN(BedMeshScreen);
156
+          injectCommands_P(PSTR(BED_LEVELING_COMMANDS));
157
+        #else
158
+          SpinnerDialogBox::enqueueAndWait_P(F(BED_LEVELING_COMMANDS));
159
+        #endif
160
+        break;
157 161
     #endif
158 162
     case 11: GOTO_SCREEN(AboutScreen);                                break;
159 163
     default:

+ 6
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screen_data.h View File

@@ -60,6 +60,12 @@ union screen_data_t {
60 60
     struct base_numeric_adjustment_t placeholder;
61 61
     float e_rel[ExtUI::extruderCount];
62 62
   } MoveAxisScreen;
63
+#if HAS_MESH
64
+  struct {
65
+    uint8_t count;
66
+    uint8_t highlightedTag;
67
+  } BedMeshScreen;
68
+#endif
63 69
 #if ENABLED(TOUCH_UI_DEVELOPER_MENU)
64 70
   struct {
65 71
     uint32_t next_watchdog_trigger;

+ 3
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp View File

@@ -56,6 +56,9 @@ SCREEN_TABLE {
56 56
 #if ENABLED(BABYSTEPPING)
57 57
   DECL_SCREEN(NudgeNozzleScreen),
58 58
 #endif
59
+#if HAS_MESH
60
+  DECL_SCREEN(BedMeshScreen),
61
+#endif
59 62
   DECL_SCREEN(MoveAxisScreen),
60 63
   DECL_SCREEN(StepsScreen),
61 64
 #if HAS_TRINAMIC_CONFIG

+ 30
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h View File

@@ -55,6 +55,9 @@ enum {
55 55
   MAX_VELOCITY_SCREEN_CACHE,
56 56
   MAX_ACCELERATION_SCREEN_CACHE,
57 57
   DEFAULT_ACCELERATION_SCREEN_CACHE,
58
+#if HAS_MESH
59
+  BED_MESH_SCREEN_CACHE,
60
+#endif
58 61
 #if DISABLED(CLASSIC_JERK)
59 62
   JUNC_DEV_SCREEN_CACHE,
60 63
 #else
@@ -130,6 +133,33 @@ class AboutScreen : public BaseScreen, public UncachedScreen {
130 133
     static bool onTouchEnd(uint8_t tag);
131 134
 };
132 135
 
136
+#if HAS_MESH
137
+class BedMeshScreen : public BaseScreen, public CachedScreen<BED_MESH_SCREEN_CACHE> {
138
+  private:
139
+    enum MeshOpts {
140
+      USE_POINTS    = 0x01,
141
+      USE_COLORS    = 0x02,
142
+      USE_TAGS      = 0x04,
143
+      USE_HIGHLIGHT = 0x08,
144
+      USE_AUTOSCALE = 0x10
145
+    };
146
+
147
+    static uint8_t pointToTag(uint8_t x, uint8_t y);
148
+    static void tagToPoint(uint8_t tag, uint8_t &x, uint8_t &y);
149
+    static float getHightlightedValue();
150
+    static void drawHighlightedPointValue();
151
+    static void drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI::bed_mesh_t data, uint8_t opts);
152
+
153
+  public:
154
+    static void onMeshUpdate(const int8_t x, const int8_t y, const float val);
155
+    static void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t);
156
+    static void onEntry();
157
+    static void onRedraw(draw_mode_t);
158
+    static bool onTouchStart(uint8_t tag);
159
+    static bool onTouchEnd(uint8_t tag);
160
+};
161
+#endif
162
+
133 163
 #if ENABLED(PRINTCOUNTER)
134 164
   class StatisticsScreen : public BaseScreen, public UncachedScreen {
135 165
     public:

+ 12
- 2
Marlin/src/lcd/extui/ui_api.cpp View File

@@ -112,6 +112,9 @@ namespace ExtUI {
112 112
     #if ENABLED(JOYSTICK)
113 113
       uint8_t jogging : 1;
114 114
     #endif
115
+    #if ENABLED(SDSUPPORT)
116
+      uint8_t was_sd_printing : 1;
117
+    #endif
115 118
   } flags;
116 119
 
117 120
   #ifdef __SAM3X8E__
@@ -1032,11 +1035,18 @@ namespace ExtUI {
1032 1035
   }
1033 1036
 
1034 1037
   bool isPrintingFromMedia() {
1035
-    return IFSD(card.isFileOpen(), false);
1038
+    #if ENABLED(SDSUPPORT)
1039
+      // Account for when IS_SD_PRINTING() reports the end of the
1040
+      // print when there is still SD card data in the planner.
1041
+      flags.was_sd_printing = card.isFileOpen() || (flags.was_sd_printing && commandsInQueue());
1042
+      return flags.was_sd_printing;
1043
+    #else
1044
+      return false;
1045
+    #endif
1036 1046
   }
1037 1047
 
1038 1048
   bool isPrinting() {
1039
-    return (planner.movesplanned() || isPrintingFromMedia() || IFSD(IS_SD_PRINTING(), false));
1049
+    return (commandsInQueue() || isPrintingFromMedia() || IFSD(IS_SD_PRINTING(), false));
1040 1050
   }
1041 1051
 
1042 1052
   bool isMediaInserted() {

+ 4
- 0
Marlin/src/lcd/extui/ui_api.h View File

@@ -141,6 +141,10 @@ namespace ExtUI {
141 141
       void setMeshPoint(const xy_uint8_t &pos, const float zval);
142 142
       void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval);
143 143
       inline void onMeshUpdate(const xy_int8_t &pos, const float zval) { onMeshUpdate(pos.x, pos.y, zval); }
144
+      
145
+      typedef enum : unsigned char { PROBE_START, PROBE_FINISH } probe_state_t;
146
+      void onMeshUpdate(const int8_t xpos, const int8_t ypos, probe_state_t state);
147
+      inline void onMeshUpdate(const xy_int8_t &pos, probe_state_t state) { onMeshUpdate(pos.x, pos.y, state); }
144 148
     #endif
145 149
   #endif
146 150
 

+ 4
- 0
Marlin/src/lcd/extui_dgus_lcd.cpp View File

@@ -122,6 +122,10 @@ namespace ExtUI {
122 122
     // Called when any mesh points are updated
123 123
   }
124 124
 
125
+  void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {
126
+    // Called to indicate a special condition
127
+  }
128
+
125 129
   #if ENABLED(POWER_LOSS_RECOVERY)
126 130
     void onPowerLossResume() {
127 131
       // Called on resume from power-loss

+ 4
- 0
Marlin/src/lcd/extui_example.cpp View File

@@ -93,6 +93,10 @@ namespace ExtUI {
93 93
     // Called when any mesh points are updated
94 94
   }
95 95
 
96
+  void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {
97
+    // Called to indicate a special condition
98
+  }
99
+
96 100
   #if ENABLED(POWER_LOSS_RECOVERY)
97 101
     void onPowerLossResume() {
98 102
       // Called on resume from power-loss

+ 5
- 1
Marlin/src/lcd/language/language_en.h View File

@@ -240,6 +240,8 @@ namespace Language_en {
240 240
   PROGMEM Language_Str MSG_BED_Z                           = _UxGT("Bed Z");
241 241
   PROGMEM Language_Str MSG_NOZZLE                          = _UxGT("Nozzle");
242 242
   PROGMEM Language_Str MSG_NOZZLE_N                        = _UxGT("Nozzle ~");
243
+  PROGMEM Language_Str MSG_NOZZLE_PARKED                   = _UxGT("Nozzle Parked");
244
+  PROGMEM Language_Str MSG_NOZZLE_STANDBY                  = _UxGT("Nozzle Standby");
243 245
   PROGMEM Language_Str MSG_BED                             = _UxGT("Bed");
244 246
   PROGMEM Language_Str MSG_CHAMBER                         = _UxGT("Enclosure");
245 247
   PROGMEM Language_Str MSG_FAN_SPEED                       = _UxGT("Fan Speed");
@@ -371,7 +373,6 @@ namespace Language_en {
371 373
   PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT               = _UxGT("Z Raise");
372 374
   PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPD          = _UxGT("Prime Speed");
373 375
   PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPD        = _UxGT("Retract Speed");
374
-  PROGMEM Language_Str MSG_NOZZLE_STANDBY                  = _UxGT("Nozzle Standby");
375 376
   PROGMEM Language_Str MSG_FILAMENTCHANGE                  = _UxGT("Change Filament");
376 377
   PROGMEM Language_Str MSG_FILAMENTCHANGE_E                = _UxGT("Change Filament *");
377 378
   PROGMEM Language_Str MSG_FILAMENTLOAD                    = _UxGT("Load Filament");
@@ -605,6 +606,9 @@ namespace Language_en {
605 606
   
606 607
   PROGMEM Language_Str MSG_LEVEL_X_AXIS                    = _UxGT("Level X Axis");
607 608
   PROGMEM Language_Str MSG_AUTO_CALIBRATE                  = _UxGT("Auto Calibrate");
609
+  PROGMEM Language_Str MSG_HEATER_TIMEOUT                  = _UxGT("Heater Timeout");
610
+  PROGMEM Language_Str MSG_REHEAT                          = _UxGT("Reheat");
611
+  PROGMEM Language_Str MSG_REHEATING                       = _UxGT("Reheating...");
608 612
 }
609 613
 
610 614
 #if FAN_COUNT == 1

Loading…
Cancel
Save