Browse Source

LULZBOT_TOUCH_UI fixes. Fix some warnings. (#15276)

Marcio Teixeira 5 years ago
parent
commit
7a569ad4d0

+ 1
- 1
Marlin/src/core/macros.h View File

63
 // Macros for bit masks
63
 // Macros for bit masks
64
 #undef _BV
64
 #undef _BV
65
 #define _BV(n) (1<<(n))
65
 #define _BV(n) (1<<(n))
66
-#define TEST(n,b) !!((n)&_BV(b))
66
+#define TEST(n,b) (!!((n)&_BV(b)))
67
 #define SET_BIT_TO(N,B,TF) do{ if (TF) SBI(N,B); else CBI(N,B); }while(0)
67
 #define SET_BIT_TO(N,B,TF) do{ if (TF) SBI(N,B); else CBI(N,B); }while(0)
68
 
68
 
69
 #ifndef SBI
69
 #ifndef SBI

+ 2
- 0
Marlin/src/feature/pause.cpp View File

500
 
500
 
501
   #if HAS_BUZZER
501
   #if HAS_BUZZER
502
     filament_change_beep(max_beep_count, true);
502
     filament_change_beep(max_beep_count, true);
503
+  #else
504
+    UNUSED(max_beep_count);
503
   #endif
505
   #endif
504
 
506
 
505
   // Start the heater idle timers
507
   // Start the heater idle timers

+ 2
- 0
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp View File

612
     begin_data();
612
     begin_data();
613
     write_number(percentage, 3);
613
     write_number(percentage, 3);
614
     write_byte('%');
614
     write_byte('%');
615
+  #else
616
+    UNUSED(percentage);
615
   #endif
617
   #endif
616
 }
618
 }
617
 
619
 

+ 28
- 4
Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.h View File

28
   uint32_t rgb;
28
   uint32_t rgb;
29
 } btn_colors;
29
 } btn_colors;
30
 
30
 
31
+// Disable TOUCH_UI_FIT_TEXT on a case-by-case basis
32
+namespace FTDI {
33
+  constexpr uint16_t OPT_NOFIT = OPT_NOTICKS;
34
+}
35
+
31
 /**************************** Enhanced Command Processor **************************/
36
 /**************************** Enhanced Command Processor **************************/
32
 
37
 
33
 /* The CommandProcessor class wraps the CommandFifo with several features to make
38
 /* The CommandProcessor class wraps the CommandFifo with several features to make
305
     int8_t apply_fit_text(int16_t w, int16_t h, T text) {
310
     int8_t apply_fit_text(int16_t w, int16_t h, T text) {
306
       using namespace FTDI;
311
       using namespace FTDI;
307
       int8_t font = _font;
312
       int8_t font = _font;
308
-      for (;;) {
313
+      for (;font >= 26;) {
309
         #ifdef TOUCH_UI_USE_UTF8
314
         #ifdef TOUCH_UI_USE_UTF8
310
           const int16_t width  = get_utf8_text_width(text, font_size_t::from_romfont(font));
315
           const int16_t width  = get_utf8_text_width(text, font_size_t::from_romfont(font));
311
           const int16_t height = font_size_t::from_romfont(font).get_height();
316
           const int16_t height = font_size_t::from_romfont(font).get_height();
314
           const int16_t width  = fm.get_text_width(text);
319
           const int16_t width  = fm.get_text_width(text);
315
           const int16_t height = fm.height;
320
           const int16_t height = fm.height;
316
         #endif
321
         #endif
317
-        if ((width < w && height < h) || font == 26) break;
322
+        if (width < w && height < h) break;
318
         font--;
323
         font--;
319
       }
324
       }
320
       return font;
325
       return font;
328
     }
333
     }
329
 
334
 
330
     template<typename T>
335
     template<typename T>
336
+    uint16_t text_width(T text) {
337
+      using namespace FTDI;
338
+      #ifdef TOUCH_UI_USE_UTF8
339
+        return get_utf8_text_width(text, font_size_t::from_romfont(_font));
340
+      #else
341
+        CLCD::FontMetrics fm(_font);
342
+        return fm.get_text_width(text);
343
+      #endif
344
+    }
345
+
346
+    template<typename T>
331
     CommandProcessor& text(int16_t x, int16_t y, int16_t w, int16_t h, T text, uint16_t options = FTDI::OPT_CENTER) {
347
     CommandProcessor& text(int16_t x, int16_t y, int16_t w, int16_t h, T text, uint16_t options = FTDI::OPT_CENTER) {
332
       using namespace FTDI;
348
       using namespace FTDI;
333
       apply_text_alignment(x, y, w, h, options);
349
       apply_text_alignment(x, y, w, h, options);
334
       #ifdef TOUCH_UI_FIT_TEXT
350
       #ifdef TOUCH_UI_FIT_TEXT
335
-        const int8_t font = apply_fit_text(w, h, text);
351
+        const int8_t font = (options & OPT_NOFIT) ? _font : apply_fit_text(w, h, text);
336
       #else
352
       #else
337
         const int8_t font = _font;
353
         const int8_t font = _font;
338
       #endif
354
       #endif
367
       bool styleModified = false;
383
       bool styleModified = false;
368
       if (_btn_style_callback) styleModified = _btn_style_callback(*this, _tag, _style, options, false);
384
       if (_btn_style_callback) styleModified = _btn_style_callback(*this, _tag, _style, options, false);
369
       #ifdef TOUCH_UI_FIT_TEXT
385
       #ifdef TOUCH_UI_FIT_TEXT
370
-        const int8_t font = apply_fit_text(w, h, text);
386
+        const int8_t font = (options & OPT_NOFIT) ? _font : apply_fit_text(w, h, text);
371
       #else
387
       #else
372
         const int8_t font = _font;
388
         const int8_t font = _font;
373
       #endif
389
       #endif
375
       #ifdef TOUCH_UI_USE_UTF8
391
       #ifdef TOUCH_UI_USE_UTF8
376
         apply_text_alignment(x, y, w, h, OPT_CENTER);
392
         apply_text_alignment(x, y, w, h, OPT_CENTER);
377
         CLCD::CommandFifo::str(F(""));
393
         CLCD::CommandFifo::str(F(""));
394
+        if (!(options & FTDI::OPT_FLAT)) {
395
+          // Reproduce the black "shadow" the FTDI adds to the button label
396
+          CLCD::CommandFifo::cmd(SAVE_CONTEXT());
397
+          CLCD::CommandFifo::cmd(COLOR_RGB(0x00000));
398
+          draw_utf8_text(*this, x-1, y-1, text, font_size_t::from_romfont(font), OPT_CENTER);
399
+          CLCD::CommandFifo::cmd(RESTORE_CONTEXT());
400
+        }
401
+        // Draw the button label
378
         draw_utf8_text(*this, x, y, text, font_size_t::from_romfont(font), OPT_CENTER);
402
         draw_utf8_text(*this, x, y, text, font_size_t::from_romfont(font), OPT_CENTER);
379
       #else
403
       #else
380
         CLCD::CommandFifo::str(text);
404
         CLCD::CommandFifo::str(text);

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/unicode.cpp View File

142
   uint16_t FTDI::get_utf8_text_width(progmem_str pstr, font_size_t fs) {
142
   uint16_t FTDI::get_utf8_text_width(progmem_str pstr, font_size_t fs) {
143
     char str[strlen_P((const char*)pstr) + 1];
143
     char str[strlen_P((const char*)pstr) + 1];
144
     strcpy_P(str, (const char*)pstr);
144
     strcpy_P(str, (const char*)pstr);
145
-    return get_utf8_text_width((const char*) pstr, fs);
145
+    return get_utf8_text_width(str, fs);
146
   }
146
   }
147
 
147
 
148
    /**
148
    /**

+ 5
- 2
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_screen.cpp View File

32
 void BaseScreen::onEntry() {
32
 void BaseScreen::onEntry() {
33
   CommandProcessor cmd;
33
   CommandProcessor cmd;
34
   cmd.set_button_style_callback(buttonStyleCallback);
34
   cmd.set_button_style_callback(buttonStyleCallback);
35
+  reset_menu_timeout();
35
   UIScreen::onEntry();
36
   UIScreen::onEntry();
36
 }
37
 }
37
 
38
 
62
 
63
 
63
 void BaseScreen::onIdle() {
64
 void BaseScreen::onIdle() {
64
   #ifdef LCD_TIMEOUT_TO_STATUS
65
   #ifdef LCD_TIMEOUT_TO_STATUS
65
-    const uint32_t elapsed = millis() - last_interaction;
66
-    if (elapsed > uint32_t(LCD_TIMEOUT_TO_STATUS)) {
66
+    if ((millis() - last_interaction) > LCD_TIMEOUT_TO_STATUS) {
67
       reset_menu_timeout();
67
       reset_menu_timeout();
68
+      #ifdef UI_FRAMEWORK_DEBUG
69
+        SERIAL_ECHO_MSG("Returning to status due to menu timeout");
70
+      #endif
68
       GOTO_SCREEN(StatusScreen);
71
       GOTO_SCREEN(StatusScreen);
69
     }
72
     }
70
   #endif
73
   #endif

+ 6
- 6
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_advanced_settings.cpp View File

55
       #else
55
       #else
56
        .enabled(0)
56
        .enabled(0)
57
       #endif
57
       #endif
58
-      .tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXTF(BUMP_SENSE))
58
+      .tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXTF(HOME_SENSE))
59
       .tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(ENDSTOPS))
59
       .tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(ENDSTOPS))
60
       #if HOTENDS > 1
60
       #if HOTENDS > 1
61
       .enabled(1)
61
       .enabled(1)
62
       #else
62
       #else
63
       .enabled(0)
63
       .enabled(0)
64
       #endif
64
       #endif
65
-      .tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXTF(NOZZLE_OFFSETS))
65
+      .tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXTF(TOOL_OFFSETS))
66
 
66
 
67
 
67
 
68
       .tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(STEPS_PER_MM))
68
       .tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(STEPS_PER_MM))
69
-      .tag(8) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(MAX_VELOCITY))
70
-      .tag(9) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXTF(MAX_ACCELERATION))
69
+      .tag(8) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(VELOCITY))
70
+      .tag(9) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXTF(ACCELERATION))
71
       #if ENABLED(JUNCTION_DEVIATION)
71
       #if ENABLED(JUNCTION_DEVIATION)
72
         .tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JUNCTION_DEVIATION))
72
         .tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JUNCTION_DEVIATION))
73
       #else
73
       #else
74
-        .tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(MAX_JERK))
74
+        .tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JERK))
75
       #endif
75
       #endif
76
       #if ENABLED(BACKLASH_GCODE)
76
       #if ENABLED(BACKLASH_GCODE)
77
       .enabled(1)
77
       .enabled(1)
86
       #endif
86
       #endif
87
       .tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(LINEAR_ADVANCE))
87
       .tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(LINEAR_ADVANCE))
88
       .tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(INTERFACE_SETTINGS))
88
       .tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(INTERFACE_SETTINGS))
89
-      .tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(RESTORE_FAILSAFE))
89
+      .tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(RESTORE_DEFAULTS))
90
       .colors(action_btn)
90
       .colors(action_btn)
91
       .tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXTF(BACK));
91
       .tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXTF(BACK));
92
     #undef GRID_COLS
92
     #undef GRID_COLS

+ 2
- 2
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printing_dialog_box.cpp View File

113
 }
113
 }
114
 
114
 
115
 void BioPrintingDialogBox::setStatusMessage(progmem_str message) {
115
 void BioPrintingDialogBox::setStatusMessage(progmem_str message) {
116
-  char buff[strlen_P((const char * const)message)+1];
117
-  strcpy_P(buff, (const char * const) message);
116
+  char buff[strlen_P((const char*)message)+1];
117
+  strcpy_P(buff, (const char*) message);
118
   setStatusMessage(buff);
118
   setStatusMessage(buff);
119
 }
119
 }
120
 
120
 

+ 18
- 17
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_status_screen.cpp View File

82
        .icon (x + 2, y + 2, h, v, Bed_Heat_Icon_Info, icon_scale * 2)
82
        .icon (x + 2, y + 2, h, v, Bed_Heat_Icon_Info, icon_scale * 2)
83
        .cmd(COLOR_RGB(bg_text_enabled))
83
        .cmd(COLOR_RGB(bg_text_enabled))
84
        .icon (x, y, h, v, Bed_Heat_Icon_Info, icon_scale * 2);
84
        .icon (x, y, h, v, Bed_Heat_Icon_Info, icon_scale * 2);
85
+
86
+    #ifdef TOUCH_UI_USE_UTF8
87
+      load_utf8_bitmaps(cmd); // Restore font bitmap handles
88
+    #endif
85
   }
89
   }
86
 
90
 
87
   if (what & FOREGROUND) {
91
   if (what & FOREGROUND) {
91
        .cmd(COLOR_RGB(bg_text_enabled));
95
        .cmd(COLOR_RGB(bg_text_enabled));
92
 
96
 
93
     if (!isHeaterIdle(BED) && getTargetTemp_celsius(BED) > 0) {
97
     if (!isHeaterIdle(BED) && getTargetTemp_celsius(BED) > 0) {
94
-      sprintf_P(bed_str, F("%3d%S"), ROUND(getTargetTemp_celsius(BED), GET_TEXT(UNITS_C)));
98
+      sprintf_P(bed_str, PSTR("%3d%S"), ROUND(getTargetTemp_celsius(BED)), GET_TEXT(UNITS_C));
95
       ui.bounds(POLY(target_temp), x, y, h, v);
99
       ui.bounds(POLY(target_temp), x, y, h, v);
96
       cmd.text(x, y, h, v, bed_str);
100
       cmd.text(x, y, h, v, bed_str);
97
     }
101
     }
98
 
102
 
99
-    sprintf_P(bed_str, F("%3d%S"), ROUND(getActualTemp_celsius(BED)), GET_TEXT(UNITS_C));
103
+    sprintf_P(bed_str, PSTR("%3d%S"), ROUND(getActualTemp_celsius(BED)), GET_TEXT(UNITS_C));
100
     ui.bounds(POLY(actual_temp), x, y, h, v);
104
     ui.bounds(POLY(actual_temp), x, y, h, v);
101
     cmd.text(x, y, h, v, bed_str);
105
     cmd.text(x, y, h, v, bed_str);
102
   }
106
   }
197
     ui.button_stroke(stroke_rgb, 28);
201
     ui.button_stroke(stroke_rgb, 28);
198
     ui.button_shadow(shadow_rgb, shadow_depth);
202
     ui.button_shadow(shadow_rgb, shadow_depth);
199
 
203
 
200
-    if (!jog_xy) {
201
-      ui.button(12, POLY(padlock));
202
-    }
203
-
204
-    if (!e_homed) {
205
-      ui.button(13, POLY(home_e));
206
-    }
207
-
208
-    if (!z_homed) {
209
-      ui.button(14, POLY(home_z));
210
-    }
204
+    if (!jog_xy)  ui.button(12, POLY(padlock));
205
+    if (!e_homed) ui.button(13, POLY(home_e));
206
+    if (!z_homed) ui.button(14, POLY(home_z));
211
   }
207
   }
212
 }
208
 }
213
 
209
 
228
         isPrintingFromMedia() ?
224
         isPrintingFromMedia() ?
229
           GET_TEXTF(PRINTING) :
225
           GET_TEXTF(PRINTING) :
230
         #ifdef LULZBOT_MANUAL_USB_STARTUP
226
         #ifdef LULZBOT_MANUAL_USB_STARTUP
231
-        (Sd2Card::ready() ? GET_TEXTF(MEDIA) : GET_TEXTF(ENABLE_MEDIA))
227
+          (Sd2Card::ready() ? GET_TEXTF(MEDIA) : GET_TEXTF(ENABLE_MEDIA))
232
         #else
228
         #else
233
-        GET_TEXTF(MEDIA)
229
+          GET_TEXTF(MEDIA)
234
         #endif
230
         #endif
235
       );
231
       );
236
 
232
 
237
-  cmd.colors(!has_media ? action_btn : normal_btn).tag(10).button(BTN_POS(2,9), BTN_SIZE(1,1), F("Menu"));
233
+  cmd.colors(!has_media ? action_btn : normal_btn).tag(10).button(BTN_POS(2,9), BTN_SIZE(1,1), GET_TEXTF(MENU));
238
 }
234
 }
239
 
235
 
240
-void StatusScreen::onStartup() {
236
+void StatusScreen::loadBitmaps() {
241
   // Load the bitmaps for the status screen
237
   // Load the bitmaps for the status screen
242
   constexpr uint32_t base = ftdi_memory_map::RAM_G;
238
   constexpr uint32_t base = ftdi_memory_map::RAM_G;
243
   CLCD::mem_write_pgm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon));
239
   CLCD::mem_write_pgm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon));
240
+
241
+  // Load fonts for internationalization
242
+  #ifdef TOUCH_UI_USE_UTF8
243
+    load_utf8_data(base + UTF8_FONT_OFFSET);
244
+  #endif
244
 }
245
 }
245
 
246
 
246
 void StatusScreen::onRedraw(draw_mode_t what) {
247
 void StatusScreen::onRedraw(draw_mode_t what) {

+ 4
- 0
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/dialog_box_base_class.cpp View File

80
   }
80
   }
81
 }
81
 }
82
 
82
 
83
+void DialogBoxBaseClass::onIdle() {
84
+  reset_menu_timeout();
85
+}
86
+
83
 #endif // LULZBOT_TOUCH_UI
87
 #endif // LULZBOT_TOUCH_UI

+ 2
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/endstop_state_screen.cpp View File

108
   #if HAS_SOFTWARE_ENDSTOPS
108
   #if HAS_SOFTWARE_ENDSTOPS
109
     #undef EDGE_R
109
     #undef EDGE_R
110
     #define EDGE_R 30
110
     #define EDGE_R 30
111
-    cmd.font(font_small)
111
+    cmd.cmd(COLOR_RGB(bg_text_enabled))
112
+       .font(font_small)
112
        .text         (BTN_POS(1,5), BTN_SIZE(3,1), GET_TEXTF(SOFT_ENDSTOPS), OPT_RIGHTX | OPT_CENTERY)
113
        .text         (BTN_POS(1,5), BTN_SIZE(3,1), GET_TEXTF(SOFT_ENDSTOPS), OPT_RIGHTX | OPT_CENTERY)
113
        .colors(ui_toggle)
114
        .colors(ui_toggle)
114
        .tag(2).toggle2(BTN_POS(4,5), BTN_SIZE(3,1), GET_TEXTF(NO), GET_TEXTF(YES), getSoftEndstopState());
115
        .tag(2).toggle2(BTN_POS(4,5), BTN_SIZE(3,1), GET_TEXTF(NO), GET_TEXTF(YES), getSoftEndstopState());

+ 7
- 3
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/files_screen.cpp View File

91
       cmd.cmd(MACRO(0));
91
       cmd.cmd(MACRO(0));
92
     }
92
     }
93
   #endif
93
   #endif
94
-  cmd.text  (BTN_POS(1,header_h+line), BTN_SIZE(6,1), filename, OPT_CENTERY);
94
+  cmd.text  (BTN_POS(1,header_h+line), BTN_SIZE(6,1), filename, OPT_CENTERY
95
+    #if ENABLED(SCROLL_LONG_FILENAMES)
96
+      | OPT_NOFIT
97
+    #endif
98
+  );
95
   if (is_dir) {
99
   if (is_dir) {
96
     cmd.text(BTN_POS(1,header_h+line), BTN_SIZE(6,1), F("> "),  OPT_CENTERY | OPT_RIGHTX);
100
     cmd.text(BTN_POS(1,header_h+line), BTN_SIZE(6,1), F("> "),  OPT_CENTERY | OPT_RIGHTX);
97
   }
101
   }
234
           if (FTDI::ftdi_chip >= 810) {
238
           if (FTDI::ftdi_chip >= 810) {
235
             const char *longFilename = getSelectedLongFilename();
239
             const char *longFilename = getSelectedLongFilename();
236
             if (longFilename[0]) {
240
             if (longFilename[0]) {
237
-              CLCD::FontMetrics fm(font_medium);
238
-              uint16_t text_width = fm.get_text_width(longFilename);
241
+              CommandProcessor cmd;
242
+              uint16_t text_width = cmd.font(font_medium).text_width(longFilename);
239
               screen_data.FilesScreen.scroll_pos = 0;
243
               screen_data.FilesScreen.scroll_pos = 0;
240
               if (text_width > display_width)
244
               if (text_width > display_width)
241
                 screen_data.FilesScreen.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R;
245
                 screen_data.FilesScreen.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R;

+ 2
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h View File

148
     static void onRedraw(draw_mode_t) {};
148
     static void onRedraw(draw_mode_t) {};
149
   public:
149
   public:
150
     static bool onTouchEnd(uint8_t tag);
150
     static bool onTouchEnd(uint8_t tag);
151
+    static void onIdle();
151
 };
152
 };
152
 
153
 
153
 class AlertDialogBox : public DialogBoxBaseClass, public CachedScreen<ALERT_BOX_CACHE,ALERT_BOX_DL_SIZE> {
154
 class AlertDialogBox : public DialogBoxBaseClass, public CachedScreen<ALERT_BOX_CACHE,ALERT_BOX_DL_SIZE> {
243
       static void draw_fine_motion(draw_mode_t what);
244
       static void draw_fine_motion(draw_mode_t what);
244
       static void draw_buttons(draw_mode_t what);
245
       static void draw_buttons(draw_mode_t what);
245
     public:
246
     public:
247
+      static void loadBitmaps();
246
       static void unlockMotors();
248
       static void unlockMotors();
247
 
249
 
248
       static void setStatusMessage(const char *);
250
       static void setStatusMessage(const char *);
249
       static void setStatusMessage(progmem_str);
251
       static void setStatusMessage(progmem_str);
250
 
252
 
251
-      static void onStartup();
252
       static void onRedraw(draw_mode_t);
253
       static void onRedraw(draw_mode_t);
253
 
254
 
254
       static bool onTouchStart(uint8_t tag);
255
       static bool onTouchStart(uint8_t tag);

+ 1
- 0
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/spinner_dialog_box.cpp View File

57
 }
57
 }
58
 
58
 
59
 void SpinnerDialogBox::onIdle() {
59
 void SpinnerDialogBox::onIdle() {
60
+  reset_menu_timeout();
60
   if (screen_data.SpinnerDialogBox.auto_hide && !commandsInQueue()) {
61
   if (screen_data.SpinnerDialogBox.auto_hide && !commandsInQueue()) {
61
     screen_data.SpinnerDialogBox.auto_hide = false;
62
     screen_data.SpinnerDialogBox.auto_hide = false;
62
     hide();
63
     hide();

+ 4
- 3
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/status_screen.cpp View File

181
        .cmd(BITMAP_LAYOUT(Fan_Icon_Info))
181
        .cmd(BITMAP_LAYOUT(Fan_Icon_Info))
182
        .cmd(BITMAP_SIZE  (Fan_Icon_Info))
182
        .cmd(BITMAP_SIZE  (Fan_Icon_Info))
183
        .icon  (BTN_POS(5,2), BTN_SIZE(1,1), Fan_Icon_Info, icon_scale);
183
        .icon  (BTN_POS(5,2), BTN_SIZE(1,1), Fan_Icon_Info, icon_scale);
184
+
185
+    #ifdef TOUCH_UI_USE_UTF8
186
+      load_utf8_bitmaps(cmd); // Restore font bitmap handles
187
+    #endif
184
   }
188
   }
185
 
189
 
186
   if (what & FOREGROUND) {
190
   if (what & FOREGROUND) {
342
      .cmd(CLEAR(true,true,true));
346
      .cmd(CLEAR(true,true,true));
343
 
347
 
344
   draw_temperature(BACKGROUND);
348
   draw_temperature(BACKGROUND);
345
-  #ifdef TOUCH_UI_USE_UTF8
346
-    load_utf8_bitmaps(cmd);
347
-  #endif
348
   draw_progress(BACKGROUND);
349
   draw_progress(BACKGROUND);
349
   draw_axis_position(BACKGROUND);
350
   draw_axis_position(BACKGROUND);
350
   draw_status_message(BACKGROUND, message);
351
   draw_status_message(BACKGROUND, message);

+ 7
- 0
Marlin/src/lcd/extensible_ui/ui_api.cpp View File

170
   void enableHeater(const extruder_t extruder) {
170
   void enableHeater(const extruder_t extruder) {
171
     #if HOTENDS && HEATER_IDLE_HANDLER
171
     #if HOTENDS && HEATER_IDLE_HANDLER
172
       thermalManager.reset_heater_idle_timer(extruder - E0);
172
       thermalManager.reset_heater_idle_timer(extruder - E0);
173
+    #else
174
+      UNUSED(extruder);
173
     #endif
175
     #endif
174
   }
176
   }
175
 
177
 
190
           #endif
192
           #endif
191
           break;
193
           break;
192
       }
194
       }
195
+    #else
196
+      UNUSED(heater);
193
     #endif
197
     #endif
194
   }
198
   }
195
 
199
 
197
     return false
201
     return false
198
       #if HOTENDS && HEATER_IDLE_HANDLER
202
       #if HOTENDS && HEATER_IDLE_HANDLER
199
         || thermalManager.hotend_idle[extruder - E0].timed_out
203
         || thermalManager.hotend_idle[extruder - E0].timed_out
204
+      #else
205
+        ; UNUSED(extruder)
200
       #endif
206
       #endif
201
     ;
207
     ;
202
   }
208
   }
218
           #endif
224
           #endif
219
       }
225
       }
220
     #else
226
     #else
227
+      UNUSED(heater);
221
       return false;
228
       return false;
222
     #endif
229
     #endif
223
   }
230
   }

Loading…
Cancel
Save