Selaa lähdekoodia

Followup to Menu Refactor (#12275)

Scott Lahteine 6 vuotta sitten
vanhempi
commit
3583e2b449
No account linked to committer's email address
45 muutettua tiedostoa jossa 245 lisäystä ja 274 poistoa
  1. 3
    3
      Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp
  2. 2
    2
      Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp
  3. 1
    1
      Marlin/src/HAL/HAL_LPC1768/spi_pins.h
  4. 2
    2
      Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp
  5. 2
    2
      Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp
  6. 2
    2
      Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction
  7. 2
    2
      Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp
  8. 2
    2
      Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
  9. 2
    2
      Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp
  10. 0
    1
      Marlin/src/HAL/HAL_STM32F7/HAL.cpp
  11. 1
    1
      Marlin/src/Marlin.cpp
  12. 1
    1
      Marlin/src/feature/bedlevel/ubl/ubl.cpp
  13. 1
    1
      Marlin/src/feature/bedlevel/ubl/ubl.h
  14. 1
    1
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  15. 19
    19
      Marlin/src/feature/pause.cpp
  16. 13
    13
      Marlin/src/gcode/bedlevel/G26.cpp
  17. 2
    2
      Marlin/src/gcode/calibrate/G33.cpp
  18. 1
    1
      Marlin/src/gcode/control/M17_M18_M84.cpp
  19. 3
    3
      Marlin/src/gcode/control/M80_M81.cpp
  20. 2
    2
      Marlin/src/gcode/feature/pause/M600.cpp
  21. 5
    5
      Marlin/src/gcode/feature/pause/M701_M702.cpp
  22. 1
    1
      Marlin/src/gcode/gcode.cpp
  23. 1
    1
      Marlin/src/gcode/gcode.h
  24. 3
    3
      Marlin/src/gcode/lcd/M0_M1.cpp
  25. 2
    2
      Marlin/src/gcode/lcd/M145.cpp
  26. 2
    2
      Marlin/src/gcode/parser.h
  27. 1
    1
      Marlin/src/gcode/queue.cpp
  28. 1
    1
      Marlin/src/gcode/queue.h
  29. 1
    1
      Marlin/src/inc/Conditionals_post.h
  30. 1
    1
      Marlin/src/inc/SanityCheck.h
  31. 4
    5
      Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp
  32. 19
    29
      Marlin/src/lcd/HD44780/ultralcd_common_HD44780.h
  33. 17
    27
      Marlin/src/lcd/HD44780/ultralcd_impl_HD44780.cpp
  34. 2
    2
      Marlin/src/lcd/dogm/lcdprint_u8g.cpp
  35. 2
    2
      Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp
  36. 2
    2
      Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp
  37. 2
    2
      Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp
  38. 33
    34
      Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp
  39. 2
    2
      Marlin/src/lcd/dogm/u8g_fontutf8.cpp
  40. 2
    2
      Marlin/src/lcd/dogm/ultralcd_impl_DOGM.cpp
  41. 10
    22
      Marlin/src/lcd/menu/menu.cpp
  42. 2
    2
      Marlin/src/lcd/menu/menu_configuration.cpp
  43. 40
    45
      Marlin/src/lcd/ultralcd.cpp
  44. 26
    15
      Marlin/src/lcd/ultralcd.h
  45. 2
    2
      Marlin/src/module/tool_change.cpp

+ 3
- 3
Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp Näytä tiedosto

60
 
60
 
61
 #include "../../inc/MarlinConfigPre.h"
61
 #include "../../inc/MarlinConfigPre.h"
62
 
62
 
63
-#if ENABLED(DOGLCD)
63
+#if HAS_GRAPHICAL_LCD
64
 
64
 
65
 #include <U8glib.h>
65
 #include <U8glib.h>
66
 
66
 
156
   return 1;
156
   return 1;
157
 }
157
 }
158
 
158
 
159
-#endif  // DOGLCD
159
+#endif // HAS_GRAPHICAL_LCD
160
 
160
 
161
-#endif  //__SAM3X8E__
161
+#endif //__SAM3X8E__

+ 2
- 2
Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp Näytä tiedosto

57
 
57
 
58
 #include "../../inc/MarlinConfigPre.h"
58
 #include "../../inc/MarlinConfigPre.h"
59
 
59
 
60
-#if ENABLED(DOGLCD)
60
+#if HAS_GRAPHICAL_LCD
61
 
61
 
62
 #include <U8glib.h>
62
 #include <U8glib.h>
63
 #include <Arduino.h>
63
 #include <Arduino.h>
180
   return 1;
180
   return 1;
181
 }
181
 }
182
 
182
 
183
-#endif // DOGLCD
183
+#endif // HAS_GRAPHICAL_LCD
184
 
184
 
185
 #endif // ARDUINO_ARCH_SAM
185
 #endif // ARDUINO_ARCH_SAM

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/spi_pins.h Näytä tiedosto

25
 
25
 
26
 #include "src/core/macros.h"
26
 #include "src/core/macros.h"
27
 
27
 
28
-#if ENABLED(SDSUPPORT) && ENABLED(DOGLCD) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
28
+#if ENABLED(SDSUPPORT) && HAS_GRAPHICAL_LCD && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
29
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
29
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
30
                             // needed due to the speed and mode requred for communicating with each device being different.
30
                             // needed due to the speed and mode requred for communicating with each device being different.
31
                             // This requirement can be removed if the SPI access to these devices is updated to use
31
                             // This requirement can be removed if the SPI access to these devices is updated to use

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp Näytä tiedosto

57
 
57
 
58
 #include "../../../inc/MarlinConfigPre.h"
58
 #include "../../../inc/MarlinConfigPre.h"
59
 
59
 
60
-#if ENABLED(DOGLCD)
60
+#if HAS_GRAPHICAL_LCD
61
 
61
 
62
 //#include <inttypes.h>
62
 //#include <inttypes.h>
63
 #include <U8glib.h>
63
 #include <U8glib.h>
132
   return 1;
132
   return 1;
133
 }
133
 }
134
 
134
 
135
-#endif // DOGLCD
135
+#endif // HAS_GRAPHICAL_LCD
136
 
136
 
137
 #endif // TARGET_LPC1768
137
 #endif // TARGET_LPC1768

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp Näytä tiedosto

79
 
79
 
80
 #include "../../../inc/MarlinConfigPre.h"
80
 #include "../../../inc/MarlinConfigPre.h"
81
 
81
 
82
-#if ENABLED(DOGLCD)
82
+#if HAS_GRAPHICAL_LCD
83
 
83
 
84
 #include <U8glib.h>
84
 #include <U8glib.h>
85
 
85
 
198
   return 1;
198
   return 1;
199
 }
199
 }
200
 
200
 
201
-#endif // DOGLCD
201
+#endif // HAS_GRAPHICAL_LCD
202
 
202
 
203
 #endif // TARGET_LPC1768
203
 #endif // TARGET_LPC1768

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction Näytä tiedosto

63
 
63
 
64
 #include "../../inc/MarlinConfigPre.h"
64
 #include "../../inc/MarlinConfigPre.h"
65
 
65
 
66
-#if ENABLED(DOGLCD)
66
+#if HAS_GRAPHICAL_LCD
67
 
67
 
68
 #include <U8glib.h>
68
 #include <U8glib.h>
69
 
69
 
249
   return 1;
249
   return 1;
250
 }
250
 }
251
 
251
 
252
-#endif // DOGLCD
252
+#endif // HAS_GRAPHICAL_LCD
253
 
253
 
254
 #endif // TARGET_LPC1768
254
 #endif // TARGET_LPC1768

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp Näytä tiedosto

57
 
57
 
58
 #include "../../../inc/MarlinConfigPre.h"
58
 #include "../../../inc/MarlinConfigPre.h"
59
 
59
 
60
-#if ENABLED(DOGLCD)
60
+#if HAS_GRAPHICAL_LCD
61
 
61
 
62
 //#include <inttypes.h>
62
 //#include <inttypes.h>
63
 #include <U8glib.h>
63
 #include <U8glib.h>
148
   return 1;
148
   return 1;
149
 }
149
 }
150
 
150
 
151
-#endif // DOGLCD
151
+#endif // HAS_GRAPHICAL_LCD
152
 
152
 
153
 #endif // TARGET_LPC1768
153
 #endif // TARGET_LPC1768

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp Näytä tiedosto

57
 
57
 
58
 #include "../../../inc/MarlinConfigPre.h"
58
 #include "../../../inc/MarlinConfigPre.h"
59
 
59
 
60
-#if ENABLED(DOGLCD)
60
+#if HAS_GRAPHICAL_LCD
61
 
61
 
62
 #include <U8glib.h>
62
 #include <U8glib.h>
63
 #include "SoftwareSPI.h"
63
 #include "SoftwareSPI.h"
151
   return 1;
151
   return 1;
152
 }
152
 }
153
 
153
 
154
-#endif // DOGLCD
154
+#endif // HAS_GRAPHICAL_LCD
155
 
155
 
156
 #endif // TARGET_LPC1768
156
 #endif // TARGET_LPC1768

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp Näytä tiedosto

57
 
57
 
58
 #include "../../../inc/MarlinConfigPre.h"
58
 #include "../../../inc/MarlinConfigPre.h"
59
 
59
 
60
-#if ENABLED(DOGLCD)
60
+#if HAS_GRAPHICAL_LCD
61
 
61
 
62
 #include <U8glib.h>
62
 #include <U8glib.h>
63
 #include "SoftwareSPI.h"
63
 #include "SoftwareSPI.h"
125
   return 1;
125
   return 1;
126
 }
126
 }
127
 
127
 
128
-#endif // DOGLCD
128
+#endif // HAS_GRAPHICAL_LCD
129
 
129
 
130
 #endif // TARGET_LPC1768
130
 #endif // TARGET_LPC1768

+ 0
- 1
Marlin/src/HAL/HAL_STM32F7/HAL.cpp Näytä tiedosto

21
  *
21
  *
22
  */
22
  */
23
 
23
 
24
-
25
 #ifdef STM32F7
24
 #ifdef STM32F7
26
 
25
 
27
 // --------------------------------------------------------------------------
26
 // --------------------------------------------------------------------------

+ 1
- 1
Marlin/src/Marlin.cpp Näytä tiedosto

379
       #if ENABLED(DISABLE_INACTIVE_E)
379
       #if ENABLED(DISABLE_INACTIVE_E)
380
         disable_e_steppers();
380
         disable_e_steppers();
381
       #endif
381
       #endif
382
-      #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL)  // Only needed with an LCD
382
+      #if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
383
         if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false;
383
         if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false;
384
       #endif
384
       #endif
385
     }
385
     }

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl.cpp Näytä tiedosto

143
   constexpr float unified_bed_leveling::_mesh_index_to_xpos[16],
143
   constexpr float unified_bed_leveling::_mesh_index_to_xpos[16],
144
                   unified_bed_leveling::_mesh_index_to_ypos[16];
144
                   unified_bed_leveling::_mesh_index_to_ypos[16];
145
 
145
 
146
-  #if ENABLED(ULTIPANEL)
146
+  #if HAS_LCD_MENU
147
     bool unified_bed_leveling::lcd_map_control = false;
147
     bool unified_bed_leveling::lcd_map_control = false;
148
   #endif
148
   #endif
149
 
149
 

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl.h Näytä tiedosto

157
                               MESH_MIN_Y + 14 * (MESH_Y_DIST), MESH_MIN_Y + 15 * (MESH_Y_DIST)
157
                               MESH_MIN_Y + 14 * (MESH_Y_DIST), MESH_MIN_Y + 15 * (MESH_Y_DIST)
158
                             };
158
                             };
159
 
159
 
160
-    #if ENABLED(ULTIPANEL)
160
+    #if HAS_LCD_MENU
161
       static bool lcd_map_control;
161
       static bool lcd_map_control;
162
     #endif
162
     #endif
163
 
163
 

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Näytä tiedosto

628
 
628
 
629
     LEAVE:
629
     LEAVE:
630
 
630
 
631
-    #if ENABLED(ULTIPANEL)
631
+    #if HAS_LCD_MENU
632
       lcd_reset_alert_level();
632
       lcd_reset_alert_level();
633
       lcd_quick_feedback(true);
633
       lcd_quick_feedback(true);
634
       lcd_reset_status();
634
       lcd_reset_status();

+ 19
- 19
Marlin/src/feature/pause.cpp Näytä tiedosto

45
   #include "../feature/runout.h"
45
   #include "../feature/runout.h"
46
 #endif
46
 #endif
47
 
47
 
48
-#if ENABLED(ULTIPANEL)
48
+#if HAS_LCD_MENU
49
   #include "../lcd/ultralcd.h"
49
   #include "../lcd/ultralcd.h"
50
 #endif
50
 #endif
51
 
51
 
102
     }
102
     }
103
   #endif
103
   #endif
104
 
104
 
105
-  #if ENABLED(ULTIPANEL)
105
+  #if HAS_LCD_MENU
106
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT, mode);
106
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT, mode);
107
   #else
107
   #else
108
     UNUSED(mode);
108
     UNUSED(mode);
139
   #endif
139
   #endif
140
 
140
 
141
   if (!ensure_safe_temperature(mode)) {
141
   if (!ensure_safe_temperature(mode)) {
142
-    #if ENABLED(ULTIPANEL)
142
+    #if HAS_LCD_MENU
143
       if (show_lcd) // Show status screen
143
       if (show_lcd) // Show status screen
144
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
144
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
145
     #endif
145
     #endif
148
   }
148
   }
149
 
149
 
150
   if (pause_for_user) {
150
   if (pause_for_user) {
151
-    #if ENABLED(ULTIPANEL)
151
+    #if HAS_LCD_MENU
152
       if (show_lcd) // Show "insert filament"
152
       if (show_lcd) // Show "insert filament"
153
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT, mode);
153
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT, mode);
154
     #endif
154
     #endif
172
     KEEPALIVE_STATE(IN_HANDLER);
172
     KEEPALIVE_STATE(IN_HANDLER);
173
   }
173
   }
174
 
174
 
175
-  #if ENABLED(ULTIPANEL)
175
+  #if HAS_LCD_MENU
176
     if (show_lcd) // Show "wait for load" message
176
     if (show_lcd) // Show "wait for load" message
177
       lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
177
       lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
178
   #endif
178
   #endif
209
 
209
 
210
   #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
210
   #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
211
 
211
 
212
-    #if ENABLED(ULTIPANEL)
212
+    #if HAS_LCD_MENU
213
       if (show_lcd)
213
       if (show_lcd)
214
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE);
214
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE);
215
     #endif
215
     #endif
224
     do {
224
     do {
225
       if (purge_length > 0) {
225
       if (purge_length > 0) {
226
         // "Wait for filament purge"
226
         // "Wait for filament purge"
227
-        #if ENABLED(ULTIPANEL)
227
+        #if HAS_LCD_MENU
228
           if (show_lcd)
228
           if (show_lcd)
229
             lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_PURGE, mode);
229
             lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_PURGE, mode);
230
         #endif
230
         #endif
234
       }
234
       }
235
 
235
 
236
       // Show "Purge More" / "Resume" menu and wait for reply
236
       // Show "Purge More" / "Resume" menu and wait for reply
237
-      #if ENABLED(ULTIPANEL)
237
+      #if HAS_LCD_MENU
238
         if (show_lcd) {
238
         if (show_lcd) {
239
           KEEPALIVE_STATE(PAUSED_FOR_USER);
239
           KEEPALIVE_STATE(PAUSED_FOR_USER);
240
           wait_for_user = false;
240
           wait_for_user = false;
246
 
246
 
247
       // Keep looping if "Purge More" was selected
247
       // Keep looping if "Purge More" was selected
248
     } while (
248
     } while (
249
-      #if ENABLED(ULTIPANEL)
249
+      #if HAS_LCD_MENU
250
         show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE
250
         show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE
251
       #else
251
       #else
252
         0
252
         0
272
                      const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
272
                      const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
273
 ) {
273
 ) {
274
   if (!ensure_safe_temperature(mode)) {
274
   if (!ensure_safe_temperature(mode)) {
275
-    #if ENABLED(ULTIPANEL)
275
+    #if HAS_LCD_MENU
276
       if (show_lcd) // Show status screen
276
       if (show_lcd) // Show status screen
277
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
277
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
278
     #endif
278
     #endif
342
     SERIAL_ECHOLNPGM("//action:" ACTION_ON_PAUSE);
342
     SERIAL_ECHOLNPGM("//action:" ACTION_ON_PAUSE);
343
   #endif
343
   #endif
344
 
344
 
345
-  #if ENABLED(ULTIPANEL)
345
+  #if HAS_LCD_MENU
346
     if (show_lcd) // Show initial message
346
     if (show_lcd) // Show initial message
347
       lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT);
347
       lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT);
348
   #endif
348
   #endif
351
     SERIAL_ERROR_START();
351
     SERIAL_ERROR_START();
352
     SERIAL_ERRORLNPGM(MSG_ERR_HOTEND_TOO_COLD);
352
     SERIAL_ERRORLNPGM(MSG_ERR_HOTEND_TOO_COLD);
353
 
353
 
354
-    #if ENABLED(ULTIPANEL)
354
+    #if HAS_LCD_MENU
355
       if (show_lcd) { // Show status screen
355
       if (show_lcd) { // Show status screen
356
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
356
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
357
         LCD_MESSAGEPGM(MSG_M600_TOO_COLD);
357
         LCD_MESSAGEPGM(MSG_M600_TOO_COLD);
416
 void wait_for_filament_reload(const int8_t max_beep_count/*=0*/ DXC_ARGS) {
416
 void wait_for_filament_reload(const int8_t max_beep_count/*=0*/ DXC_ARGS) {
417
   bool nozzle_timed_out = false;
417
   bool nozzle_timed_out = false;
418
 
418
 
419
-  #if ENABLED(ULTIPANEL)
419
+  #if HAS_LCD_MENU
420
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
420
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
421
   #endif
421
   #endif
422
   SERIAL_ECHO_START();
422
   SERIAL_ECHO_START();
454
         nozzle_timed_out |= thermalManager.is_heater_idle(e);
454
         nozzle_timed_out |= thermalManager.is_heater_idle(e);
455
 
455
 
456
     if (nozzle_timed_out) {
456
     if (nozzle_timed_out) {
457
-      #if ENABLED(ULTIPANEL)
457
+      #if HAS_LCD_MENU
458
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE);
458
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE);
459
       #endif
459
       #endif
460
       SERIAL_ECHO_START();
460
       SERIAL_ECHO_START();
461
-      #if ENABLED(ULTIPANEL) && ENABLED(EMERGENCY_PARSER)
461
+      #if HAS_LCD_MENU && ENABLED(EMERGENCY_PARSER)
462
         SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_HEAT);
462
         SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_HEAT);
463
       #elif ENABLED(EMERGENCY_PARSER)
463
       #elif ENABLED(EMERGENCY_PARSER)
464
         SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_HEAT_M108);
464
         SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_HEAT_M108);
475
       // Wait for the heaters to reach the target temperatures
475
       // Wait for the heaters to reach the target temperatures
476
       ensure_safe_temperature();
476
       ensure_safe_temperature();
477
 
477
 
478
-      #if ENABLED(ULTIPANEL)
478
+      #if HAS_LCD_MENU
479
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
479
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
480
       #endif
480
       #endif
481
       SERIAL_ECHO_START();
481
       SERIAL_ECHO_START();
482
-      #if ENABLED(ULTIPANEL) && ENABLED(EMERGENCY_PARSER)
482
+      #if HAS_LCD_MENU && ENABLED(EMERGENCY_PARSER)
483
         SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_INSERT);
483
         SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_INSERT);
484
       #elif ENABLED(EMERGENCY_PARSER)
484
       #elif ENABLED(EMERGENCY_PARSER)
485
         SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_INSERT_M108);
485
         SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_INSERT_M108);
550
   if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) // Load the new filament
550
   if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) // Load the new filament
551
     load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out, ADVANCED_PAUSE_MODE_PAUSE_PRINT DXC_PASS);
551
     load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out, ADVANCED_PAUSE_MODE_PAUSE_PRINT DXC_PASS);
552
 
552
 
553
-  #if ENABLED(ULTIPANEL)
553
+  #if HAS_LCD_MENU
554
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_RESUME); // "Wait for print to resume"
554
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_RESUME); // "Wait for print to resume"
555
   #endif
555
   #endif
556
 
556
 
578
     runout.reset();
578
     runout.reset();
579
   #endif
579
   #endif
580
 
580
 
581
-  #if ENABLED(ULTIPANEL)
581
+  #if HAS_LCD_MENU
582
     // Show status screen
582
     // Show status screen
583
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
583
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
584
   #endif
584
   #endif

+ 13
- 13
Marlin/src/gcode/bedlevel/G26.cpp Näytä tiedosto

156
 
156
 
157
 int8_t g26_prime_flag;
157
 int8_t g26_prime_flag;
158
 
158
 
159
-#if ENABLED(ULTIPANEL)
159
+#if HAS_LCD_MENU
160
 
160
 
161
   /**
161
   /**
162
    * If the LCD is clicked, cancel, wait for release, return true
162
    * If the LCD is clicked, cancel, wait for release, return true
164
   bool user_canceled() {
164
   bool user_canceled() {
165
     if (!is_lcd_clicked()) return false; // Return if the button isn't pressed
165
     if (!is_lcd_clicked()) return false; // Return if the button isn't pressed
166
     lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99);
166
     lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99);
167
-    #if ENABLED(ULTIPANEL)
167
+    #if HAS_LCD_MENU
168
       lcd_quick_feedback(true);
168
       lcd_quick_feedback(true);
169
     #endif
169
     #endif
170
     wait_for_release();
170
     wait_for_release();
327
   for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
327
   for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
328
     for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
328
     for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
329
 
329
 
330
-      #if ENABLED(ULTIPANEL)
330
+      #if HAS_LCD_MENU
331
         if (user_canceled()) return true;     // Check if the user wants to stop the Mesh Validation
331
         if (user_canceled()) return true;     // Check if the user wants to stop the Mesh Validation
332
       #endif
332
       #endif
333
 
333
 
418
       if (g26_bed_temp > 25) {
418
       if (g26_bed_temp > 25) {
419
         lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
419
         lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
420
         lcd_quick_feedback(true);
420
         lcd_quick_feedback(true);
421
-        #if ENABLED(ULTIPANEL)
421
+        #if HAS_LCD_MENU
422
           lcd_external_control = true;
422
           lcd_external_control = true;
423
         #endif
423
         #endif
424
     #endif
424
     #endif
425
         thermalManager.setTargetBed(g26_bed_temp);
425
         thermalManager.setTargetBed(g26_bed_temp);
426
         while (ABS(thermalManager.degBed() - g26_bed_temp) > 3) {
426
         while (ABS(thermalManager.degBed() - g26_bed_temp) > 3) {
427
 
427
 
428
-          #if ENABLED(ULTIPANEL)
428
+          #if HAS_LCD_MENU
429
             if (is_lcd_clicked()) return exit_from_g26();
429
             if (is_lcd_clicked()) return exit_from_g26();
430
           #endif
430
           #endif
431
 
431
 
448
   thermalManager.setTargetHotend(g26_hotend_temp, 0);
448
   thermalManager.setTargetHotend(g26_hotend_temp, 0);
449
   while (ABS(thermalManager.degHotend(0) - g26_hotend_temp) > 3) {
449
   while (ABS(thermalManager.degHotend(0) - g26_hotend_temp) > 3) {
450
 
450
 
451
-    #if ENABLED(ULTIPANEL)
451
+    #if HAS_LCD_MENU
452
       if (is_lcd_clicked()) return exit_from_g26();
452
       if (is_lcd_clicked()) return exit_from_g26();
453
     #endif
453
     #endif
454
 
454
 
474
  */
474
  */
475
 inline bool prime_nozzle() {
475
 inline bool prime_nozzle() {
476
 
476
 
477
-  #if ENABLED(ULTIPANEL)
477
+  #if HAS_LCD_MENU
478
     #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
478
     #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
479
       float Total_Prime = 0.0;
479
       float Total_Prime = 0.0;
480
     #endif
480
     #endif
619
 
619
 
620
   if (parser.seen('P')) {
620
   if (parser.seen('P')) {
621
     if (!parser.has_value()) {
621
     if (!parser.has_value()) {
622
-      #if ENABLED(ULTIPANEL)
622
+      #if HAS_LCD_MENU
623
         g26_prime_flag = -1;
623
         g26_prime_flag = -1;
624
       #else
624
       #else
625
         SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD.");
625
         SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD.");
664
   }
664
   }
665
 
665
 
666
   int16_t g26_repeats;
666
   int16_t g26_repeats;
667
-  #if ENABLED(ULTIPANEL)
667
+  #if HAS_LCD_MENU
668
     g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1);
668
     g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1);
669
   #else
669
   #else
670
     if (!parser.seen('R')) {
670
     if (!parser.seen('R')) {
723
   move_to(destination, 0.0);
723
   move_to(destination, 0.0);
724
   move_to(destination, g26_ooze_amount);
724
   move_to(destination, g26_ooze_amount);
725
 
725
 
726
-  #if ENABLED(ULTIPANEL)
726
+  #if HAS_LCD_MENU
727
     lcd_external_control = true;
727
     lcd_external_control = true;
728
   #endif
728
   #endif
729
 
729
 
831
         plan_arc(endpoint, arc_offset, false);  // Draw a counter-clockwise arc
831
         plan_arc(endpoint, arc_offset, false);  // Draw a counter-clockwise arc
832
         feedrate_mm_s = save_feedrate;
832
         feedrate_mm_s = save_feedrate;
833
         set_destination_from_current();
833
         set_destination_from_current();
834
-        #if ENABLED(ULTIPANEL)
834
+        #if HAS_LCD_MENU
835
           if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
835
           if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
836
         #endif
836
         #endif
837
 
837
 
857
 
857
 
858
         for (int8_t ind = start_ind; ind <= end_ind; ind++) {
858
         for (int8_t ind = start_ind; ind <= end_ind; ind++) {
859
 
859
 
860
-          #if ENABLED(ULTIPANEL)
860
+          #if HAS_LCD_MENU
861
             if (user_canceled()) goto LEAVE;          // Check if the user wants to stop the Mesh Validation
861
             if (user_canceled()) goto LEAVE;          // Check if the user wants to stop the Mesh Validation
862
           #endif
862
           #endif
863
 
863
 
906
   move_to(destination, 0); // Move back to the starting position
906
   move_to(destination, 0); // Move back to the starting position
907
   //debug_current_and_destination(PSTR("done doing X/Y move."));
907
   //debug_current_and_destination(PSTR("done doing X/Y move."));
908
 
908
 
909
-  #if ENABLED(ULTIPANEL)
909
+  #if HAS_LCD_MENU
910
     lcd_external_control = false;     // Give back control of the LCD Panel!
910
     lcd_external_control = false;     // Give back control of the LCD Panel!
911
   #endif
911
   #endif
912
 
912
 

+ 2
- 2
Marlin/src/gcode/calibrate/G33.cpp Näytä tiedosto

204
   #endif
204
   #endif
205
 }
205
 }
206
 
206
 
207
-#if HAS_BED_PROBE && ENABLED(ULTIPANEL)
207
+#if HAS_BED_PROBE && HAS_LCD_MENU
208
   static float probe_z_shift(const float center) {
208
   static float probe_z_shift(const float center) {
209
     STOW_PROBE();
209
     STOW_PROBE();
210
     endstops.enable_z_probe(false);
210
     endstops.enable_z_probe(false);
588
 
588
 
589
       switch (probe_points) {
589
       switch (probe_points) {
590
         case -1:
590
         case -1:
591
-          #if HAS_BED_PROBE && ENABLED(ULTIPANEL)
591
+          #if HAS_BED_PROBE && HAS_LCD_MENU
592
             zprobe_zoffset += probe_z_shift(z_at_pt[CEN]);
592
             zprobe_zoffset += probe_z_shift(z_at_pt[CEN]);
593
           #endif
593
           #endif
594
 
594
 

+ 1
- 1
Marlin/src/gcode/control/M17_M18_M84.cpp Näytä tiedosto

60
       #endif
60
       #endif
61
     }
61
     }
62
 
62
 
63
-    #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL)  // Only needed with an LCD
63
+    #if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
64
       if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false;
64
       if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false;
65
     #endif
65
     #endif
66
   }
66
   }

+ 3
- 3
Marlin/src/gcode/control/M80_M81.cpp Näytä tiedosto

27
 
27
 
28
 #include "../../inc/MarlinConfig.h"
28
 #include "../../inc/MarlinConfig.h"
29
 
29
 
30
-#if ENABLED(ULTIPANEL)
30
+#if HAS_LCD_MENU
31
   #include "../../lcd/ultralcd.h"
31
   #include "../../lcd/ultralcd.h"
32
 #endif
32
 #endif
33
 
33
 
82
       restore_stepper_drivers();
82
       restore_stepper_drivers();
83
     #endif
83
     #endif
84
 
84
 
85
-    #if ENABLED(ULTIPANEL)
85
+    #if HAS_LCD_MENU
86
       lcd_reset_status();
86
       lcd_reset_status();
87
     #endif
87
     #endif
88
   }
88
   }
115
     PSU_OFF();
115
     PSU_OFF();
116
   #endif
116
   #endif
117
 
117
 
118
-  #if ENABLED(ULTIPANEL)
118
+  #if HAS_LCD_MENU
119
     LCD_MESSAGEPGM(MACHINE_NAME " " MSG_OFF ".");
119
     LCD_MESSAGEPGM(MACHINE_NAME " " MSG_OFF ".");
120
   #endif
120
   #endif
121
 }
121
 }

+ 2
- 2
Marlin/src/gcode/feature/pause/M600.cpp Näytä tiedosto

33
   #include "../../../module/tool_change.h"
33
   #include "../../../module/tool_change.h"
34
 #endif
34
 #endif
35
 
35
 
36
-#if ENABLED(ULTIPANEL)
36
+#if HAS_LCD_MENU
37
   #include "../../../lcd/ultralcd.h"
37
   #include "../../../lcd/ultralcd.h"
38
 #endif
38
 #endif
39
 
39
 
70
   #endif
70
   #endif
71
 
71
 
72
   // Show initial "wait for start" message
72
   // Show initial "wait for start" message
73
-  #if ENABLED(ULTIPANEL)
73
+  #if HAS_LCD_MENU
74
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, target_extruder);
74
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, target_extruder);
75
   #endif
75
   #endif
76
 
76
 

+ 5
- 5
Marlin/src/gcode/feature/pause/M701_M702.cpp Näytä tiedosto

34
   #include "../../../module/tool_change.h"
34
   #include "../../../module/tool_change.h"
35
 #endif
35
 #endif
36
 
36
 
37
-#if ENABLED(ULTIPANEL)
37
+#if HAS_LCD_MENU
38
   #include "../../../lcd/ultralcd.h"
38
   #include "../../../lcd/ultralcd.h"
39
 #endif
39
 #endif
40
 
40
 
61
   if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
61
   if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
62
 
62
 
63
   // Show initial "wait for load" message
63
   // Show initial "wait for load" message
64
-  #if ENABLED(ULTIPANEL)
64
+  #if HAS_LCD_MENU
65
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
65
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
66
   #endif
66
   #endif
67
 
67
 
98
   #endif
98
   #endif
99
 
99
 
100
   // Show status screen
100
   // Show status screen
101
-  #if ENABLED(ULTIPANEL)
101
+  #if HAS_LCD_MENU
102
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
102
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
103
   #endif
103
   #endif
104
 }
104
 }
127
   if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
127
   if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
128
 
128
 
129
   // Show initial "wait for unload" message
129
   // Show initial "wait for unload" message
130
-  #if ENABLED(ULTIPANEL)
130
+  #if HAS_LCD_MENU
131
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_UNLOAD, ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, target_extruder);
131
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_UNLOAD, ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, target_extruder);
132
   #endif
132
   #endif
133
 
133
 
171
   #endif
171
   #endif
172
 
172
 
173
   // Show status screen
173
   // Show status screen
174
-  #if ENABLED(ULTIPANEL)
174
+  #if HAS_LCD_MENU
175
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
175
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
176
   #endif
176
   #endif
177
 }
177
 }

+ 1
- 1
Marlin/src/gcode/gcode.cpp Näytä tiedosto

427
       case 120: M120(); break;                                    // M120: Enable endstops
427
       case 120: M120(); break;                                    // M120: Enable endstops
428
       case 121: M121(); break;                                    // M121: Disable endstops
428
       case 121: M121(); break;                                    // M121: Disable endstops
429
 
429
 
430
-      #if ENABLED(ULTIPANEL)
430
+      #if HAS_LCD_MENU
431
         case 145: M145(); break;                                  // M145: Set material heatup parameters
431
         case 145: M145(); break;                                  // M145: Set material heatup parameters
432
       #endif
432
       #endif
433
 
433
 

+ 1
- 1
Marlin/src/gcode/gcode.h Näytä tiedosto

571
     static void M190();
571
     static void M190();
572
   #endif
572
   #endif
573
 
573
 
574
-  #if ENABLED(ULTIPANEL)
574
+  #if HAS_LCD_MENU
575
     static void M145();
575
     static void M145();
576
   #endif
576
   #endif
577
 
577
 

+ 3
- 3
Marlin/src/gcode/lcd/M0_M1.cpp Näytä tiedosto

27
 #include "../gcode.h"
27
 #include "../gcode.h"
28
 #include "../../module/stepper.h"
28
 #include "../../module/stepper.h"
29
 
29
 
30
-#if ENABLED(ULTIPANEL)
30
+#if HAS_LCD_MENU
31
   #include "../../lcd/ultralcd.h"
31
   #include "../../lcd/ultralcd.h"
32
 #endif
32
 #endif
33
 
33
 
59
 
59
 
60
   planner.synchronize();
60
   planner.synchronize();
61
 
61
 
62
-  #if ENABLED(ULTIPANEL)
62
+  #if HAS_LCD_MENU
63
 
63
 
64
     if (has_message)
64
     if (has_message)
65
       lcd_setstatus(args, true);
65
       lcd_setstatus(args, true);
93
     printerEventLEDs.onResumeAfterWait();
93
     printerEventLEDs.onResumeAfterWait();
94
   #endif
94
   #endif
95
 
95
 
96
-  #if ENABLED(ULTIPANEL)
96
+  #if HAS_LCD_MENU
97
     lcd_reset_status();
97
     lcd_reset_status();
98
   #endif
98
   #endif
99
 
99
 

+ 2
- 2
Marlin/src/gcode/lcd/M145.cpp Näytä tiedosto

22
 
22
 
23
 #include "../../inc/MarlinConfig.h"
23
 #include "../../inc/MarlinConfig.h"
24
 
24
 
25
-#if ENABLED(ULTIPANEL)
25
+#if HAS_LCD_MENU
26
 
26
 
27
 #include "../gcode.h"
27
 #include "../gcode.h"
28
 #include "../../lcd/ultralcd.h"
28
 #include "../../lcd/ultralcd.h"
60
   }
60
   }
61
 }
61
 }
62
 
62
 
63
-#endif // ULTIPANEL
63
+#endif // HAS_LCD_MENU

+ 2
- 2
Marlin/src/gcode/parser.h Näytä tiedosto

273
 
273
 
274
     static inline void set_input_temp_units(TempUnit units) { input_temp_units = units; }
274
     static inline void set_input_temp_units(TempUnit units) { input_temp_units = units; }
275
 
275
 
276
-    #if ENABLED(ULTIPANEL) && DISABLED(DISABLE_M503)
276
+    #if HAS_LCD_MENU && DISABLED(DISABLE_M503)
277
 
277
 
278
       FORCE_INLINE static char temp_units_code() {
278
       FORCE_INLINE static char temp_units_code() {
279
         return input_temp_units == TEMPUNIT_K ? 'K' : input_temp_units == TEMPUNIT_F ? 'F' : 'C';
279
         return input_temp_units == TEMPUNIT_K ? 'K' : input_temp_units == TEMPUNIT_F ? 'F' : 'C';
293
         }
293
         }
294
       }
294
       }
295
 
295
 
296
-    #endif // ULTIPANEL && !DISABLE_M503
296
+    #endif // HAS_LCD_MENU && !DISABLE_M503
297
 
297
 
298
     static inline float value_celsius() {
298
     static inline float value_celsius() {
299
       const float f = value_float();
299
       const float f = value_float();

+ 1
- 1
Marlin/src/gcode/queue.cpp Näytä tiedosto

387
           // Process critical commands early
387
           // Process critical commands early
388
           if (strcmp(command, "M108") == 0) {
388
           if (strcmp(command, "M108") == 0) {
389
             wait_for_heatup = false;
389
             wait_for_heatup = false;
390
-            #if ENABLED(ULTIPANEL)
390
+            #if HAS_LCD_MENU
391
               wait_for_user = false;
391
               wait_for_user = false;
392
             #endif
392
             #endif
393
           }
393
           }

+ 1
- 1
Marlin/src/gcode/queue.h Näytä tiedosto

97
  */
97
  */
98
 bool enqueue_and_echo_command(const char* cmd);
98
 bool enqueue_and_echo_command(const char* cmd);
99
 
99
 
100
-#define HAS_LCD_QUEUE_NOW (ENABLED(MALYAN_LCD) || (ENABLED(ULTIPANEL) && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE))))
100
+#define HAS_LCD_QUEUE_NOW (ENABLED(MALYAN_LCD) || (HAS_LCD_MENU && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE))))
101
 #define HAS_QUEUE_NOW (ENABLED(SDSUPPORT) || HAS_LCD_QUEUE_NOW)
101
 #define HAS_QUEUE_NOW (ENABLED(SDSUPPORT) || HAS_LCD_QUEUE_NOW)
102
 
102
 
103
 #if HAS_QUEUE_NOW
103
 #if HAS_QUEUE_NOW

+ 1
- 1
Marlin/src/inc/Conditionals_post.h Näytä tiedosto

239
 /**
239
 /**
240
  * Override here because this is set in Configuration_adv.h
240
  * Override here because this is set in Configuration_adv.h
241
  */
241
  */
242
-#if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
242
+#if HAS_LCD_MENU && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
243
   #undef SD_DETECT_INVERTED
243
   #undef SD_DETECT_INVERTED
244
 #endif
244
 #endif
245
 
245
 

+ 1
- 1
Marlin/src/inc/SanityCheck.h Näytä tiedosto

866
     #error "You probably want to use Max Endstops for DELTA!"
866
     #error "You probably want to use Max Endstops for DELTA!"
867
   #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED
867
   #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED
868
     #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
868
     #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
869
-  #elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || ENABLED(ULTIPANEL))
869
+  #elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || HAS_LCD_MENU)
870
     #error "DELTA_AUTO_CALIBRATION requires a probe or LCD Controller."
870
     #error "DELTA_AUTO_CALIBRATION requires a probe or LCD Controller."
871
   #elif ABL_GRID
871
   #elif ABL_GRID
872
     #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
872
     #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0

+ 4
- 5
Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp Näytä tiedosto

14
 
14
 
15
 #include "../../inc/MarlinConfigPre.h"
15
 #include "../../inc/MarlinConfigPre.h"
16
 
16
 
17
-#if ENABLED(ULTRA_LCD) && DISABLED(DOGLCD)
17
+#if HAS_CHARACTER_LCD
18
 
18
 
19
 #include "../ultralcd.h"
19
 #include "../ultralcd.h"
20
 #include "../../Marlin.h"
20
 #include "../../Marlin.h"
21
 
21
 
22
+#include "ultralcd_common_HD44780.h"
23
+
22
 #include <string.h>
24
 #include <string.h>
23
-#include "../fontutils.h"
24
-#include "../lcdprint.h"
25
 
25
 
26
-#include "ultralcd_common_HD44780.h"
27
 #ifndef LCD_CLASS
26
 #ifndef LCD_CLASS
28
   #include <LiquidCrystal.h>
27
   #include <LiquidCrystal.h>
29
   #define LCD_CLASS LiquidCrystal
28
   #define LCD_CLASS LiquidCrystal
1039
   return lcd_put_u8str_max_cb(utf8_str_P, read_byte_rom, max_length);
1038
   return lcd_put_u8str_max_cb(utf8_str_P, read_byte_rom, max_length);
1040
 }
1039
 }
1041
 
1040
 
1042
-#endif // ULTRA_LCD && !DOGLCD
1041
+#endif // HAS_CHARACTER_LCD

+ 19
- 29
Marlin/src/lcd/HD44780/ultralcd_common_HD44780.h Näytä tiedosto

32
   #include "../../libs/duration_t.h"
32
   #include "../../libs/duration_t.h"
33
 #endif
33
 #endif
34
 
34
 
35
-#if ENABLED(AUTO_BED_LEVELING_UBL)
36
-  #include "../../feature/bedlevel/ubl/ubl.h"
37
-
38
-  #if ENABLED(ULTIPANEL)
39
-    #define ULTRA_X_PIXELS_PER_CHAR    5
40
-    #define ULTRA_Y_PIXELS_PER_CHAR    8
41
-    #define ULTRA_COLUMNS_FOR_MESH_MAP 7
42
-    #define ULTRA_ROWS_FOR_MESH_MAP    4
43
-
44
-    #define N_USER_CHARS    8
45
-
46
-    #define TOP_LEFT      _BV(0)
47
-    #define TOP_RIGHT     _BV(1)
48
-    #define LOWER_LEFT    _BV(2)
49
-    #define LOWER_RIGHT   _BV(3)
50
-  #endif
51
-#endif
52
-
53
 ////////////////////////////////////
35
 ////////////////////////////////////
54
 // Setup button and encode mappings for each panel (into 'buttons' variable
36
 // Setup button and encode mappings for each panel (into 'buttons' variable
55
 //
37
 //
57
 // macro name. The mapping is independent of whether the button is directly connected or
39
 // macro name. The mapping is independent of whether the button is directly connected or
58
 // via a shift/i2c register.
40
 // via a shift/i2c register.
59
 
41
 
60
-#if ENABLED(ULTIPANEL)
42
+#if HAS_LCD_MENU
61
 
43
 
62
   extern volatile uint8_t buttons;
44
   extern volatile uint8_t buttons;
63
 
45
 
119
     #define LCD_CLICKED (buttons & (B_MI|B_ST))
101
     #define LCD_CLICKED (buttons & (B_MI|B_ST))
120
   #endif
102
   #endif
121
 
103
 
122
-#endif // ULTIPANEL
104
+  #if ENABLED(AUTO_BED_LEVELING_UBL)
105
+    #define ULTRA_X_PIXELS_PER_CHAR    5
106
+    #define ULTRA_Y_PIXELS_PER_CHAR    8
107
+    #define ULTRA_COLUMNS_FOR_MESH_MAP 7
108
+    #define ULTRA_ROWS_FOR_MESH_MAP    4
109
+
110
+    #define N_USER_CHARS    8
111
+
112
+    #define TOP_LEFT      _BV(0)
113
+    #define TOP_RIGHT     _BV(1)
114
+    #define LOWER_LEFT    _BV(2)
115
+    #define LOWER_RIGHT   _BV(3)
116
+  #endif
117
+
118
+#endif // HAS_LCD_MENU
123
 
119
 
124
 ////////////////////////////////////
120
 ////////////////////////////////////
125
 // Create LCD class instance and chipset-specific information
121
 // Create LCD class instance and chipset-specific information
141
 
137
 
142
 #elif ENABLED(LCD_I2C_TYPE_MCP23017)
138
 #elif ENABLED(LCD_I2C_TYPE_MCP23017)
143
   // For the LED indicators (which may be mapped to different events in lcd_implementation_update_indicators())
139
   // For the LED indicators (which may be mapped to different events in lcd_implementation_update_indicators())
140
+  #define LCD_HAS_STATUS_INDICATORS
144
   #define LED_A 0x04 //100
141
   #define LED_A 0x04 //100
145
   #define LED_B 0x02 //010
142
   #define LED_B 0x02 //010
146
   #define LED_C 0x01 //001
143
   #define LED_C 0x01 //001
147
 
144
 
148
-  #define LCD_HAS_STATUS_INDICATORS
149
-
150
   #include <Wire.h>
145
   #include <Wire.h>
151
   #include <LiquidTWI2.h>
146
   #include <LiquidTWI2.h>
152
   #define LCD_CLASS LiquidTWI2
147
   #define LCD_CLASS LiquidTWI2
160
   #include <LiquidCrystal_I2C.h>
155
   #include <LiquidCrystal_I2C.h>
161
   #define LCD_CLASS LiquidCrystal_I2C
156
   #define LCD_CLASS LiquidCrystal_I2C
162
 
157
 
163
-// 2 wire Non-latching LCD SR from:
164
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
165
 #elif ENABLED(SR_LCD_2W_NL)
158
 #elif ENABLED(SR_LCD_2W_NL)
159
+  // 2 wire Non-latching LCD SR from:
160
+  // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
166
   extern "C" void __cxa_pure_virtual() { while (1); }
161
   extern "C" void __cxa_pure_virtual() { while (1); }
167
   #include <LCD.h>
162
   #include <LCD.h>
168
   #include <LiquidCrystal_SR.h>
163
   #include <LiquidCrystal_SR.h>
178
   // Standard directly connected LCD implementations
173
   // Standard directly connected LCD implementations
179
   #include <LiquidCrystal.h>
174
   #include <LiquidCrystal.h>
180
   #define LCD_CLASS LiquidCrystal
175
   #define LCD_CLASS LiquidCrystal
181
-
182
 #endif
176
 #endif
183
 
177
 
184
 #include "../fontutils.h"
178
 #include "../fontutils.h"
185
 #include "../lcdprint.h"
179
 #include "../lcdprint.h"
186
-
187
-#if ENABLED(LCD_PROGRESS_BAR)
188
-  #define LCD_STR_PROGRESS  "\x03\x04\x05"
189
-#endif

+ 17
- 27
Marlin/src/lcd/HD44780/ultralcd_impl_HD44780.cpp Näytä tiedosto

22
 
22
 
23
 #include "../../inc/MarlinConfigPre.h"
23
 #include "../../inc/MarlinConfigPre.h"
24
 
24
 
25
-#if ENABLED(ULTRA_LCD) && DISABLED(DOGLCD)
25
+#if HAS_CHARACTER_LCD
26
 
26
 
27
 /**
27
 /**
28
  * ultralcd_impl_HD44780.cpp
28
  * ultralcd_impl_HD44780.cpp
40
 #include "../../module/planner.h"
40
 #include "../../module/planner.h"
41
 #include "../../module/motion.h"
41
 #include "../../module/motion.h"
42
 
42
 
43
+#if ENABLED(AUTO_BED_LEVELING_UBL)
44
+  #include "../../feature/bedlevel/ubl/ubl.h"
45
+#endif
46
+
43
 ////////////////////////////////////
47
 ////////////////////////////////////
44
 // Create LCD class instance and chipset-specific information
48
 // Create LCD class instance and chipset-specific information
45
 #if ENABLED(LCD_I2C_TYPE_PCF8575)
49
 #if ENABLED(LCD_I2C_TYPE_PCF8575)
79
   LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5, LCD_PINS_D6, LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7
83
   LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5, LCD_PINS_D6, LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7
80
 #endif
84
 #endif
81
 
85
 
82
-#include "../fontutils.h"
83
-#include "../lcdprint.h"
84
-
85
-#if ENABLED(LCD_PROGRESS_BAR)
86
-  static millis_t progress_bar_ms = 0;     // Start millis of the current progress bar cycle
87
-  #if PROGRESS_MSG_EXPIRE > 0
88
-    static millis_t expire_status_ms = 0;  // millis at which to expire the status message
89
-  #endif
90
-#endif
91
-
92
 #if ENABLED(LCD_HAS_STATUS_INDICATORS)
86
 #if ENABLED(LCD_HAS_STATUS_INDICATORS)
93
   static void lcd_implementation_update_indicators();
87
   static void lcd_implementation_update_indicators();
94
 #endif
88
 #endif
100
   lcd.createChar(c, temp);
94
   lcd.createChar(c, temp);
101
 }
95
 }
102
 
96
 
97
+#if ENABLED(LCD_PROGRESS_BAR)
98
+  #define LCD_STR_PROGRESS  "\x03\x04\x05"
99
+#endif
100
+
103
 void lcd_set_custom_characters(
101
 void lcd_set_custom_characters(
104
   #if ENABLED(LCD_PROGRESS_BAR) || ENABLED(SHOW_BOOTSCREEN)
102
   #if ENABLED(LCD_PROGRESS_BAR) || ENABLED(SHOW_BOOTSCREEN)
105
-    const uint8_t screen_charset=CHARSET_INFO
103
+    const HD44780CharSet screen_charset/*=CHARSET_INFO*/
106
   #endif
104
   #endif
107
 ) {
105
 ) {
108
   // CHARSET_BOOT
106
   // CHARSET_BOOT
318
 
316
 
319
 }
317
 }
320
 
318
 
321
-void lcd_implementation_init(
322
-  #if ENABLED(LCD_PROGRESS_BAR)
323
-    const uint8_t screen_charset=CHARSET_INFO
324
-  #endif
325
-) {
319
+void lcd_implementation_init() {
326
 
320
 
327
   #if ENABLED(LCD_I2C_TYPE_PCF8575)
321
   #if ENABLED(LCD_I2C_TYPE_PCF8575)
328
     lcd.begin(LCD_WIDTH, LCD_HEIGHT);
322
     lcd.begin(LCD_WIDTH, LCD_HEIGHT);
348
     lcd.begin(LCD_WIDTH, LCD_HEIGHT);
342
     lcd.begin(LCD_WIDTH, LCD_HEIGHT);
349
   #endif
343
   #endif
350
 
344
 
351
-  lcd_set_custom_characters(
352
-    #if ENABLED(LCD_PROGRESS_BAR)
353
-      screen_charset
354
-    #endif
355
-  );
345
+  LCD_SET_CHARSET(currentScreen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU);
356
 
346
 
357
   lcd.clear();
347
   lcd.clear();
358
 }
348
 }
416
   }
406
   }
417
 
407
 
418
   void lcd_bootscreen() {
408
   void lcd_bootscreen() {
419
-    lcd_set_custom_characters(CHARSET_BOOT);
409
+    LCD_SET_CHARSET(CHARSET_BOOT);
420
     lcd.clear();
410
     lcd.clear();
421
 
411
 
422
     #define LCD_EXTRA_SPACE (LCD_WIDTH-8)
412
     #define LCD_EXTRA_SPACE (LCD_WIDTH-8)
485
 
475
 
486
     lcd.clear();
476
     lcd.clear();
487
     safe_delay(100);
477
     safe_delay(100);
488
-    lcd_set_custom_characters();
478
+    LCD_SET_CHARSET(CHARSET_INFO);
489
     lcd.clear();
479
     lcd.clear();
490
   }
480
   }
491
 
481
 
975
 
965
 
976
 #endif
966
 #endif
977
 
967
 
978
-#if ENABLED(ULTIPANEL)
968
+#if HAS_LCD_MENU
979
 
969
 
980
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
970
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
981
 
971
 
1581
 
1571
 
1582
   #endif // AUTO_BED_LEVELING_UBL
1572
   #endif // AUTO_BED_LEVELING_UBL
1583
 
1573
 
1584
-#endif // ULTIPANEL
1574
+#endif // HAS_LCD_MENU
1585
 
1575
 
1586
-#endif // ULTRA_LCD && !DOGLCD
1576
+#endif // HAS_CHARACTER_LCD

+ 2
- 2
Marlin/src/lcd/dogm/lcdprint_u8g.cpp Näytä tiedosto

9
 
9
 
10
 #include "../../inc/MarlinConfigPre.h"
10
 #include "../../inc/MarlinConfigPre.h"
11
 
11
 
12
-#if ENABLED(DOGLCD)
12
+#if HAS_GRAPHICAL_LCD
13
 
13
 
14
 #include <U8glib.h>
14
 #include <U8glib.h>
15
 extern U8GLIB *pu8g;
15
 extern U8GLIB *pu8g;
62
   return ret;
62
   return ret;
63
 }
63
 }
64
 
64
 
65
-#endif // DOGLCD
65
+#endif // HAS_GRAPHICAL_LCD

+ 2
- 2
Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp Näytä tiedosto

67
 
67
 
68
 #include "../../inc/MarlinConfigPre.h"
68
 #include "../../inc/MarlinConfigPre.h"
69
 
69
 
70
-#if ENABLED(DOGLCD)
70
+#if HAS_GRAPHICAL_LCD
71
 
71
 
72
 #include <U8glib.h>
72
 #include <U8glib.h>
73
 #include "HAL_LCD_com_defines.h"
73
 #include "HAL_LCD_com_defines.h"
281
   return 1;
281
   return 1;
282
 }
282
 }
283
 
283
 
284
-#endif // DOGLCD
284
+#endif // HAS_GRAPHICAL_LCD

+ 2
- 2
Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp Näytä tiedosto

55
 
55
 
56
 #include "../../inc/MarlinConfig.h"
56
 #include "../../inc/MarlinConfig.h"
57
 
57
 
58
-#if ENABLED(DOGLCD)
58
+#if HAS_GRAPHICAL_LCD
59
 
59
 
60
 #include <U8glib.h>
60
 #include <U8glib.h>
61
 
61
 
233
 U8G_PB_DEV(u8g_dev_st7565_64128n_HAL_hw_spi, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_st7565_64128n_HAL_fn, U8G_COM_HAL_HW_SPI_FN);
233
 U8G_PB_DEV(u8g_dev_st7565_64128n_HAL_hw_spi, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_st7565_64128n_HAL_fn, U8G_COM_HAL_HW_SPI_FN);
234
 u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi = { u8g_dev_st7565_64128n_HAL_2x_fn, &u8g_dev_st7565_64128n_HAL_2x_pb, U8G_COM_HAL_HW_SPI_FN };
234
 u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi = { u8g_dev_st7565_64128n_HAL_2x_fn, &u8g_dev_st7565_64128n_HAL_2x_pb, U8G_COM_HAL_HW_SPI_FN };
235
 
235
 
236
-#endif // DOGLCD
236
+#endif // HAS_GRAPHICAL_LCD

+ 2
- 2
Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp Näytä tiedosto

55
 
55
 
56
 #include "../../inc/MarlinConfigPre.h"
56
 #include "../../inc/MarlinConfigPre.h"
57
 
57
 
58
-#if ENABLED(DOGLCD)
58
+#if HAS_GRAPHICAL_LCD
59
 
59
 
60
 #include <U8glib.h>
60
 #include <U8glib.h>
61
 
61
 
209
   u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_SW_SPI };
209
   u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_SW_SPI };
210
 #endif
210
 #endif
211
 
211
 
212
-#endif // DOGLCD
212
+#endif // HAS_GRAPHICAL_LCD

+ 33
- 34
Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp Näytä tiedosto

59
 
59
 
60
 #include "../../inc/MarlinConfigPre.h"
60
 #include "../../inc/MarlinConfigPre.h"
61
 
61
 
62
-#if ENABLED(DOGLCD)
62
+#if HAS_GRAPHICAL_LCD
63
 
63
 
64
 #include <U8glib.h>
64
 #include <U8glib.h>
65
 
65
 
114
       u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
114
       u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
115
       u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_init_seq);
115
       u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_init_seq);
116
       break;
116
       break;
117
-    case U8G_DEV_MSG_STOP:
118
-      break;
119
-    case U8G_DEV_MSG_PAGE_NEXT:
120
-      {
121
-        u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
122
-        u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
123
-        u8g_WriteByte(u8g, dev, 0x0B0 | pb->p.page); /* select current page */
124
-        u8g_SetAddress(u8g, dev, 1);           /* data mode */
125
-        if ( u8g_pb_WriteBuffer(pb, u8g, dev) == 0 )
126
-          return 0;
127
-        u8g_SetChipSelect(u8g, dev, 0);
128
-      }
129
-      break;
117
+
118
+    case U8G_DEV_MSG_STOP: break;
119
+
120
+    case U8G_DEV_MSG_PAGE_NEXT: {
121
+      u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
122
+      u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
123
+      u8g_WriteByte(u8g, dev, 0x0B0 | pb->p.page); /* select current page */
124
+      u8g_SetAddress(u8g, dev, 1);           /* data mode */
125
+      if (!u8g_pb_WriteBuffer(pb, u8g, dev)) return 0;
126
+      u8g_SetChipSelect(u8g, dev, 0);
127
+    } break;
128
+
130
     case U8G_DEV_MSG_CONTRAST:
129
     case U8G_DEV_MSG_CONTRAST:
131
       u8g_SetChipSelect(u8g, dev, 1);
130
       u8g_SetChipSelect(u8g, dev, 1);
132
       u8g_SetAddress(u8g, dev, 0);          /* instruction mode */
131
       u8g_SetAddress(u8g, dev, 0);          /* instruction mode */
144
       u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
143
       u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
145
       u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_init_seq);
144
       u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_init_seq);
146
       break;
145
       break;
147
-    case U8G_DEV_MSG_STOP:
148
-      break;
149
-    case U8G_DEV_MSG_PAGE_NEXT:
150
-      {
151
-        u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
152
-
153
-        u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
154
-        u8g_WriteByte(u8g, dev, 0x0B0 | (2*pb->p.page)); /* select current page */
155
-        u8g_SetAddress(u8g, dev, 1);           /* data mode */
156
-  u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)pb->buf);
157
-        u8g_SetChipSelect(u8g, dev, 0);
158
-
159
-        u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
160
-        u8g_WriteByte(u8g, dev, 0x0B0 | (2*pb->p.page+1)); /* select current page */
161
-        u8g_SetAddress(u8g, dev, 1);           /* data mode */
162
-  u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)(pb->buf)+pb->width);
163
-        u8g_SetChipSelect(u8g, dev, 0);
164
-      }
165
-      break;
146
+
147
+    case U8G_DEV_MSG_STOP: break;
148
+
149
+    case U8G_DEV_MSG_PAGE_NEXT: {
150
+      u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
151
+
152
+      u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
153
+      u8g_WriteByte(u8g, dev, 0x0B0 | (2*pb->p.page)); /* select current page */
154
+      u8g_SetAddress(u8g, dev, 1);           /* data mode */
155
+      u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)pb->buf);
156
+      u8g_SetChipSelect(u8g, dev, 0);
157
+
158
+      u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
159
+      u8g_WriteByte(u8g, dev, 0x0B0 | (2*pb->p.page+1)); /* select current page */
160
+      u8g_SetAddress(u8g, dev, 1);           /* data mode */
161
+      u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)(pb->buf)+pb->width);
162
+      u8g_SetChipSelect(u8g, dev, 0);
163
+    } break;
164
+
166
     case U8G_DEV_MSG_CONTRAST:
165
     case U8G_DEV_MSG_CONTRAST:
167
       u8g_SetChipSelect(u8g, dev, 1);
166
       u8g_SetChipSelect(u8g, dev, 1);
168
       u8g_SetAddress(u8g, dev, 0);          /* instruction mode */
167
       u8g_SetAddress(u8g, dev, 0);          /* instruction mode */
182
 u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_sw_spi = { u8g_dev_uc1701_mini12864_HAL_2x_fn, &u8g_dev_uc1701_mini12864_HAL_2x_pb, U8G_COM_HAL_SW_SPI_FN };
181
 u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_sw_spi = { u8g_dev_uc1701_mini12864_HAL_2x_fn, &u8g_dev_uc1701_mini12864_HAL_2x_pb, U8G_COM_HAL_SW_SPI_FN };
183
 u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_hw_spi = { u8g_dev_uc1701_mini12864_HAL_2x_fn, &u8g_dev_uc1701_mini12864_HAL_2x_pb, U8G_COM_HAL_HW_SPI_FN };
182
 u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_hw_spi = { u8g_dev_uc1701_mini12864_HAL_2x_fn, &u8g_dev_uc1701_mini12864_HAL_2x_pb, U8G_COM_HAL_HW_SPI_FN };
184
 
183
 
185
-#endif // DOGLCD
184
+#endif // HAS_GRAPHICAL_LCD

+ 2
- 2
Marlin/src/lcd/dogm/u8g_fontutf8.cpp Näytä tiedosto

9
 
9
 
10
 #include "../../inc/MarlinConfigPre.h"
10
 #include "../../inc/MarlinConfigPre.h"
11
 
11
 
12
-#if ENABLED(DOGLCD)
12
+#if HAS_GRAPHICAL_LCD
13
 
13
 
14
 #include <string.h>
14
 #include <string.h>
15
 #include "../fontutils.h"
15
 #include "../fontutils.h"
317
   return data.adv;
317
   return data.adv;
318
 }
318
 }
319
 
319
 
320
-#endif // DOGLCD
320
+#endif // HAS_GRAPHICAL_LCD

+ 2
- 2
Marlin/src/lcd/dogm/ultralcd_impl_DOGM.cpp Näytä tiedosto

245
 
245
 
246
 void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
246
 void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
247
 
247
 
248
-#if ENABLED(ULTIPANEL)
248
+#if HAS_LCD_MENU
249
 
249
 
250
   uint8_t row_y1, row_y2;
250
   uint8_t row_y1, row_y2;
251
 
251
 
655
 
655
 
656
   #endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
656
   #endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
657
 
657
 
658
-#endif // ULTIPANEL
658
+#endif // HAS_LCD_MENU
659
 
659
 
660
 #endif // HAS_GRAPHICAL_LCD
660
 #endif // HAS_GRAPHICAL_LCD

+ 10
- 22
Marlin/src/lcd/menu/menu.cpp Näytä tiedosto

22
 
22
 
23
 #include "../../inc/MarlinConfigPre.h"
23
 #include "../../inc/MarlinConfigPre.h"
24
 
24
 
25
-#if ENABLED(ULTIPANEL)
25
+#if HAS_LCD_MENU
26
 
26
 
27
 #include "menu.h"
27
 #include "menu.h"
28
 #include "../ultralcd.h"
28
 #include "../ultralcd.h"
75
 //////// Menu Navigation & History /////////
75
 //////// Menu Navigation & History /////////
76
 ////////////////////////////////////////////
76
 ////////////////////////////////////////////
77
 
77
 
78
-void lcd_status_screen();
79
-
80
 void lcd_return_to_status() { lcd_goto_screen(lcd_status_screen); }
78
 void lcd_return_to_status() { lcd_goto_screen(lcd_status_screen); }
81
 
79
 
82
 void lcd_save_previous_screen() {
80
 void lcd_save_previous_screen() {
203
 
201
 
204
 bool printer_busy() { return planner.movesplanned() || IS_SD_PRINTING(); }
202
 bool printer_busy() { return planner.movesplanned() || IS_SD_PRINTING(); }
205
 
203
 
206
-#if HAS_CHARACTER_LCD && (ENABLED(LCD_PROGRESS_BAR) || ENABLED(LCD_PROGRESS_BAR_TEST) || ENABLED(AUTO_BED_LEVELING_UBL))
207
-  void lcd_set_custom_characters(
208
-    #if ENABLED(LCD_PROGRESS_BAR) || ENABLED(SHOW_BOOTSCREEN)
209
-      const uint8_t screen_charset=CHARSET_INFO
210
-    #endif
211
-  );
212
-#endif
213
-
214
 /**
204
 /**
215
  * General function to go directly to a screen
205
  * General function to go directly to a screen
216
  */
206
  */
258
       #endif
248
       #endif
259
       screen_history_depth = 0;
249
       screen_history_depth = 0;
260
     }
250
     }
251
+
261
     lcd_implementation_clear();
252
     lcd_implementation_clear();
253
+
262
     // Re-initialize custom characters that may be re-used
254
     // Re-initialize custom characters that may be re-used
263
-    #if HAS_CHARACTER_LCD && ENABLED(AUTO_BED_LEVELING_UBL)
264
-      if (!ubl.lcd_map_control) {
265
-        lcd_set_custom_characters(
266
-          #if ENABLED(LCD_PROGRESS_BAR)
267
-            screen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU
268
-          #endif
269
-        );
270
-      }
271
-    #elif ENABLED(LCD_PROGRESS_BAR)
272
-      lcd_set_custom_characters(screen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU);
255
+    #if HAS_CHARACTER_LCD
256
+      #if ENABLED(AUTO_BED_LEVELING_UBL)
257
+        if (!ubl.lcd_map_control)
258
+      #endif
259
+          LCD_SET_CHARSET(screen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU);
273
     #endif
260
     #endif
261
+
274
     lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
262
     lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
275
     screen_changed = true;
263
     screen_changed = true;
276
     #if HAS_GRAPHICAL_LCD
264
     #if HAS_GRAPHICAL_LCD
476
   void _lcd_toggle_bed_leveling() { set_bed_leveling_enabled(!planner.leveling_active); }
464
   void _lcd_toggle_bed_leveling() { set_bed_leveling_enabled(!planner.leveling_active); }
477
 #endif
465
 #endif
478
 
466
 
479
-#endif // ULTIPANEL
467
+#endif // HAS_LCD_MENU

+ 2
- 2
Marlin/src/lcd/menu/menu_configuration.cpp Näytä tiedosto

54
     static int8_t bar_percent = 0;
54
     static int8_t bar_percent = 0;
55
     if (use_click()) {
55
     if (use_click()) {
56
       lcd_goto_previous_menu();
56
       lcd_goto_previous_menu();
57
-      lcd_set_custom_characters(CHARSET_MENU);
57
+      LCD_SET_CHARSET(CHARSET_MENU);
58
       return;
58
       return;
59
     }
59
     }
60
     bar_percent += (int8_t)encoderPosition;
60
     bar_percent += (int8_t)encoderPosition;
68
 
68
 
69
   void _progress_bar_test() {
69
   void _progress_bar_test() {
70
     lcd_goto_screen(progress_bar_test);
70
     lcd_goto_screen(progress_bar_test);
71
-    lcd_set_custom_characters();
71
+    LCD_SET_CHARSET(CHARSET_INFO);
72
   }
72
   }
73
 
73
 
74
 #endif // LCD_PROGRESS_BAR_TEST
74
 #endif // LCD_PROGRESS_BAR_TEST

+ 40
- 45
Marlin/src/lcd/ultralcd.cpp Näytä tiedosto

49
 
49
 
50
 #if ENABLED(POWER_LOSS_RECOVERY)
50
 #if ENABLED(POWER_LOSS_RECOVERY)
51
   #include "../feature/power_loss_recovery.h"
51
   #include "../feature/power_loss_recovery.h"
52
-  #if ENABLED(ULTIPANEL)
52
+  #if HAS_LCD_MENU
53
     void menu_job_recovery();
53
     void menu_job_recovery();
54
   #endif
54
   #endif
55
 #endif
55
 #endif
100
   millis_t previous_lcd_status_ms = 0;
100
   millis_t previous_lcd_status_ms = 0;
101
 #endif
101
 #endif
102
 
102
 
103
-#if ENABLED(SDSUPPORT) && ENABLED(ULTIPANEL) && ENABLED(SCROLL_LONG_FILENAMES)
103
+#if HAS_LCD_MENU && ENABLED(SDSUPPORT) && ENABLED(SCROLL_LONG_FILENAMES)
104
   uint8_t filename_scroll_pos, filename_scroll_max;
104
   uint8_t filename_scroll_pos, filename_scroll_max;
105
 #endif
105
 #endif
106
 
106
 
122
   int8_t encoderDirection = 1;
122
   int8_t encoderDirection = 1;
123
 #endif
123
 #endif
124
 
124
 
125
-void lcd_status_screen();
126
-
127
 #if HAS_LCD_MENU
125
 #if HAS_LCD_MENU
128
   #include "menu/menu.h"
126
   #include "menu/menu.h"
129
 
127
 
202
 
200
 
203
   lcd_buttons_update();
201
   lcd_buttons_update();
204
 
202
 
205
-  #if ENABLED(ULTIPANEL)
203
+  #if HAS_LCD_MENU
206
     encoderDiff = 0;
204
     encoderDiff = 0;
207
   #endif
205
   #endif
208
 }
206
 }
363
  * This is very display-dependent, so the lcd implementation draws this.
361
  * This is very display-dependent, so the lcd implementation draws this.
364
  */
362
  */
365
 
363
 
364
+#if ENABLED(LCD_PROGRESS_BAR)
365
+  millis_t progress_bar_ms = 0;     // Start millis of the current progress bar cycle
366
+  #if PROGRESS_MSG_EXPIRE > 0
367
+    static millis_t expire_status_ms = 0;
368
+    void dontExpireStatus() { expire_status_ms = 0; }
369
+  #endif
370
+#endif
371
+
366
 #if LCD_INFO_SCREEN_STYLE == 0
372
 #if LCD_INFO_SCREEN_STYLE == 0
367
   void lcd_impl_status_screen_0();
373
   void lcd_impl_status_screen_0();
368
 #elif LCD_INFO_SCREEN_STYLE == 1
374
 #elif LCD_INFO_SCREEN_STYLE == 1
371
 
377
 
372
 void lcd_status_screen() {
378
 void lcd_status_screen() {
373
 
379
 
374
-  #if ENABLED(ULTIPANEL)
380
+  #if HAS_LCD_MENU
375
     ENCODER_DIRECTION_NORMAL();
381
     ENCODER_DIRECTION_NORMAL();
376
     ENCODER_RATE_MULTIPLY(false);
382
     ENCODER_RATE_MULTIPLY(false);
377
   #endif
383
   #endif
378
 
384
 
379
-  #if ENABLED(LCD_SET_PROGRESS_MANUALLY) && ENABLED(SDSUPPORT) && (ENABLED(LCD_PROGRESS_BAR) || ENABLED(DOGLCD))
385
+  #if ENABLED(LCD_SET_PROGRESS_MANUALLY) && ENABLED(SDSUPPORT) && (ENABLED(LCD_PROGRESS_BAR) || HAS_GRAPHICAL_LCD)
380
     // Progress bar % comes from SD when actively printing
386
     // Progress bar % comes from SD when actively printing
381
     if (IS_SD_PRINTING())
387
     if (IS_SD_PRINTING())
382
       progress_bar_percent = card.percentDone();
388
       progress_bar_percent = card.percentDone();
425
 
431
 
426
   #endif // LCD_PROGRESS_BAR
432
   #endif // LCD_PROGRESS_BAR
427
 
433
 
428
-  #if ENABLED(ULTIPANEL)
434
+  #if HAS_LCD_MENU
429
 
435
 
430
     if (use_click()) {
436
     if (use_click()) {
431
       #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
437
       #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
432
         previous_lcd_status_ms = millis();  // get status message to show up for a while
438
         previous_lcd_status_ms = millis();  // get status message to show up for a while
433
       #endif
439
       #endif
434
-      lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
435
-        #if ENABLED(LCD_PROGRESS_BAR)
436
-          CHARSET_MENU
437
-        #endif
438
-      );
439
       lcd_goto_screen(menu_main);
440
       lcd_goto_screen(menu_main);
441
+      lcd_implementation_init(); // May revive the LCD if static electricity killed it
440
       return;
442
       return;
441
     }
443
     }
442
 
444
 
465
 
467
 
466
     feedrate_percentage = constrain(feedrate_percentage, 10, 999);
468
     feedrate_percentage = constrain(feedrate_percentage, 10, 999);
467
 
469
 
468
-  #endif // ULTIPANEL
470
+  #endif // HAS_LCD_MENU
469
 
471
 
470
   #if LCD_INFO_SCREEN_STYLE == 0
472
   #if LCD_INFO_SCREEN_STYLE == 0
471
     lcd_impl_status_screen_0();
473
     lcd_impl_status_screen_0();
514
 
516
 
515
 void lcd_quick_feedback(const bool clear_buttons) {
517
 void lcd_quick_feedback(const bool clear_buttons) {
516
 
518
 
517
-  #if ENABLED(ULTIPANEL)
519
+  #if HAS_LCD_MENU
518
     lcd_refresh();
520
     lcd_refresh();
519
     if (clear_buttons) buttons = 0;
521
     if (clear_buttons) buttons = 0;
520
     next_button_update_ms = millis() + 500;
522
     next_button_update_ms = millis() + 500;
525
   // Buzz and wait. The delay is needed for buttons to settle!
527
   // Buzz and wait. The delay is needed for buttons to settle!
526
   lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
528
   lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
527
 
529
 
528
-  #if ENABLED(ULTIPANEL)
530
+  #if HAS_LCD_MENU
529
     #if ENABLED(LCD_USE_I2C_BUZZER)
531
     #if ENABLED(LCD_USE_I2C_BUZZER)
530
       delay(10);
532
       delay(10);
531
     #elif PIN_EXISTS(BEEPER)
533
     #elif PIN_EXISTS(BEEPER)
534
   #endif
536
   #endif
535
 }
537
 }
536
 
538
 
537
-#if ENABLED(ULTIPANEL)
539
+#if HAS_LCD_MENU
538
 
540
 
539
   extern bool no_reentry; // Flag to prevent recursion into menu handlers
541
   extern bool no_reentry; // Flag to prevent recursion into menu handlers
540
 
542
 
602
     }
604
     }
603
   }
605
   }
604
 
606
 
605
-#endif // ULTIPANEL
607
+#endif // HAS_LCD_MENU
606
 
608
 
607
 /**
609
 /**
608
  * Update the LCD, read encoder buttons, etc.
610
  * Update the LCD, read encoder buttons, etc.
652
   static uint16_t max_display_update_time = 0;
654
   static uint16_t max_display_update_time = 0;
653
   static millis_t next_lcd_update_ms;
655
   static millis_t next_lcd_update_ms;
654
 
656
 
655
-  #if ENABLED(ULTIPANEL)
657
+  #if HAS_LCD_MENU
656
     static millis_t return_to_status_ms = 0;
658
     static millis_t return_to_status_ms = 0;
657
 
659
 
658
     // Handle any queued Move Axis motion
660
     // Handle any queued Move Axis motion
688
       }
690
       }
689
     #endif
691
     #endif
690
 
692
 
691
-  #endif // ULTIPANEL
693
+  #endif // HAS_LCD_MENU
692
 
694
 
693
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
695
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
694
 
696
 
712
       }
714
       }
713
 
715
 
714
       lcd_refresh();
716
       lcd_refresh();
715
-      lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
716
-        #if ENABLED(LCD_PROGRESS_BAR)
717
-          currentScreen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU
718
-        #endif
719
-      );
717
+      lcd_implementation_init(); // May revive the LCD if static electricity killed it
720
     }
718
     }
721
 
719
 
722
   #endif // SDSUPPORT && SD_DETECT_PIN
720
   #endif // SDSUPPORT && SD_DETECT_PIN
730
 
728
 
731
   const millis_t ms = millis();
729
   const millis_t ms = millis();
732
   if (ELAPSED(ms, next_lcd_update_ms)
730
   if (ELAPSED(ms, next_lcd_update_ms)
733
-    #if ENABLED(DOGLCD)
731
+    #if HAS_GRAPHICAL_LCD
734
       || drawing_screen
732
       || drawing_screen
735
     #endif
733
     #endif
736
   ) {
734
   ) {
741
       lcd_implementation_update_indicators();
739
       lcd_implementation_update_indicators();
742
     #endif
740
     #endif
743
 
741
 
744
-    #if ENABLED(ULTIPANEL)
742
+    #if HAS_LCD_MENU
745
 
743
 
746
       #if ENABLED(LCD_HAS_SLOW_BUTTONS)
744
       #if ENABLED(LCD_HAS_SLOW_BUTTONS)
747
         slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
745
         slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
797
         lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
795
         lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
798
       }
796
       }
799
 
797
 
800
-    #endif // ULTIPANEL
798
+    #endif // HAS_LCD_MENU
801
 
799
 
802
     // This runs every ~100ms when idling often enough.
800
     // This runs every ~100ms when idling often enough.
803
     // Instead of tracking changes just redraw the Status Screen once per second.
801
     // Instead of tracking changes just redraw the Status Screen once per second.
804
     if (
802
     if (
805
-      #if ENABLED(ULTIPANEL)
803
+      #if HAS_LCD_MENU
806
         currentScreen == lcd_status_screen &&
804
         currentScreen == lcd_status_screen &&
807
       #endif
805
       #endif
808
       !lcd_status_update_delay--
806
       !lcd_status_update_delay--
809
     ) {
807
     ) {
810
       lcd_status_update_delay = 9
808
       lcd_status_update_delay = 9
811
-        #if ENABLED(DOGLCD)
809
+        #if HAS_GRAPHICAL_LCD
812
           + 3
810
           + 3
813
         #endif
811
         #endif
814
       ;
812
       ;
816
       lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
814
       lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
817
     }
815
     }
818
 
816
 
819
-    #if ENABLED(ULTIPANEL) && ENABLED(SCROLL_LONG_FILENAMES)
817
+    #if HAS_LCD_MENU && ENABLED(SCROLL_LONG_FILENAMES)
820
       // If scrolling of long file names is enabled and we are in the sd card menu,
818
       // If scrolling of long file names is enabled and we are in the sd card menu,
821
       // cause a refresh to occur until all the text has scrolled into view.
819
       // cause a refresh to occur until all the text has scrolled into view.
822
       if (currentScreen == menu_sdcard && filename_scroll_pos < filename_scroll_max && !lcd_status_update_delay--) {
820
       if (currentScreen == menu_sdcard && filename_scroll_pos < filename_scroll_max && !lcd_status_update_delay--) {
830
     // then we want to use 1/2 of the time only.
828
     // then we want to use 1/2 of the time only.
831
     uint16_t bbr2 = planner.block_buffer_runtime() >> 1;
829
     uint16_t bbr2 = planner.block_buffer_runtime() >> 1;
832
 
830
 
833
-    #if ENABLED(DOGLCD)
831
+    #if HAS_GRAPHICAL_LCD
834
       const bool &is_drawing = drawing_screen;
832
       const bool &is_drawing = drawing_screen;
835
     #else
833
     #else
836
       constexpr bool is_drawing = false;
834
       constexpr bool is_drawing = false;
855
         buttons_reprapworld_keypad = 0;
853
         buttons_reprapworld_keypad = 0;
856
       #endif
854
       #endif
857
 
855
 
858
-      #if ENABLED(ULTIPANEL)
856
+      #if HAS_LCD_MENU
859
         #define CURRENTSCREEN() (*currentScreen)()
857
         #define CURRENTSCREEN() (*currentScreen)()
860
       #else
858
       #else
861
         #define CURRENTSCREEN() lcd_status_screen()
859
         #define CURRENTSCREEN() lcd_status_screen()
862
       #endif
860
       #endif
863
 
861
 
864
-      #if ENABLED(DOGLCD)
862
+      #if HAS_GRAPHICAL_LCD
865
         #if ENABLED(LIGHTWEIGHT_UI)
863
         #if ENABLED(LIGHTWEIGHT_UI)
866
-          #if ENABLED(ULTIPANEL)
864
+          #if HAS_LCD_MENU
867
             const bool in_status = currentScreen == lcd_status_screen;
865
             const bool in_status = currentScreen == lcd_status_screen;
868
           #else
866
           #else
869
             constexpr bool in_status = true;
867
             constexpr bool in_status = true;
896
         CURRENTSCREEN();
894
         CURRENTSCREEN();
897
       #endif
895
       #endif
898
 
896
 
899
-      #if ENABLED(ULTIPANEL)
897
+      #if HAS_LCD_MENU
900
         lcd_clicked = false;
898
         lcd_clicked = false;
901
       #endif
899
       #endif
902
 
900
 
905
       NOLESS(max_display_update_time, millis() - ms);
903
       NOLESS(max_display_update_time, millis() - ms);
906
     }
904
     }
907
 
905
 
908
-    #if ENABLED(ULTIPANEL)
906
+    #if HAS_LCD_MENU
909
 
907
 
910
       // Return to Status Screen after a timeout
908
       // Return to Status Screen after a timeout
911
       if (currentScreen == lcd_status_screen || defer_return_to_status)
909
       if (currentScreen == lcd_status_screen || defer_return_to_status)
913
       else if (ELAPSED(ms, return_to_status_ms))
911
       else if (ELAPSED(ms, return_to_status_ms))
914
         lcd_return_to_status();
912
         lcd_return_to_status();
915
 
913
 
916
-    #endif // ULTIPANEL
914
+    #endif // HAS_LCD_MENU
917
 
915
 
918
     // Change state of drawing flag between screen updates
916
     // Change state of drawing flag between screen updates
919
     if (!is_drawing) switch (lcdDrawUpdate) {
917
     if (!is_drawing) switch (lcdDrawUpdate) {
942
       expire_status_ms = persist ? 0 : progress_bar_ms + PROGRESS_MSG_EXPIRE;
940
       expire_status_ms = persist ? 0 : progress_bar_ms + PROGRESS_MSG_EXPIRE;
943
     #endif
941
     #endif
944
   #endif
942
   #endif
943
+
945
   lcd_refresh();
944
   lcd_refresh();
946
 
945
 
947
   #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
946
   #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
953
   #endif
952
   #endif
954
 }
953
 }
955
 
954
 
956
-#if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
957
-  void dontExpireStatus() { expire_status_ms = 0; }
958
-#endif
959
-
960
 bool lcd_hasstatus() { return (lcd_status_message[0] != '\0'); }
955
 bool lcd_hasstatus() { return (lcd_status_message[0] != '\0'); }
961
 
956
 
962
 void lcd_setstatus(const char * const message, const bool persist) {
957
 void lcd_setstatus(const char * const message, const bool persist) {
1023
 
1018
 
1024
 void lcd_setalertstatusPGM(PGM_P const message) {
1019
 void lcd_setalertstatusPGM(PGM_P const message) {
1025
   lcd_setstatusPGM(message, 1);
1020
   lcd_setstatusPGM(message, 1);
1026
-  #if ENABLED(ULTIPANEL)
1021
+  #if HAS_LCD_MENU
1027
     lcd_return_to_status();
1022
     lcd_return_to_status();
1028
   #endif
1023
   #endif
1029
 }
1024
 }
1068
   }
1063
   }
1069
 #endif
1064
 #endif
1070
 
1065
 
1071
-#if ENABLED(ULTIPANEL)
1066
+#if HAS_LCD_MENU
1072
 
1067
 
1073
   /**
1068
   /**
1074
    * Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
1069
    * Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
1252
     }
1247
     }
1253
   }
1248
   }
1254
 
1249
 
1255
-#endif // ULTIPANEL
1250
+#endif // HAS_LCD_MENU
1256
 
1251
 
1257
 #endif // ULTRA_LCD
1252
 #endif // ULTRA_LCD

+ 26
- 15
Marlin/src/lcd/ultralcd.h Näytä tiedosto

89
 
89
 
90
   #elif ENABLED(U8GLIB_SSD1306)
90
   #elif ENABLED(U8GLIB_SSD1306)
91
     // Generic support for SSD1306 OLED I2C LCDs
91
     // Generic support for SSD1306 OLED I2C LCDs
92
-    //#define U8G_CLASS U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE 
92
+    //#define U8G_CLASS U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE
93
     //#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)           // 4 stripes
93
     //#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)           // 4 stripes
94
     #define U8G_CLASS U8GLIB_SSD1306_128X64_2X
94
     #define U8G_CLASS U8GLIB_SSD1306_128X64_2X
95
     #define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)             // 4 stripes
95
     #define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)             // 4 stripes
102
     //#define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0   // 4 stripes
102
     //#define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0   // 4 stripes
103
   #elif ENABLED(U8GLIB_SH1106)
103
   #elif ENABLED(U8GLIB_SH1106)
104
     // Generic support for SH1106 OLED I2C LCDs
104
     // Generic support for SH1106 OLED I2C LCDs
105
-    //#define U8G_CLASS U8GLIB_SH1106_128X64_2X_I2C_2_WIRE 
105
+    //#define U8G_CLASS U8GLIB_SH1106_128X64_2X_I2C_2_WIRE
106
     //#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)           // 4 stripes
106
     //#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)           // 4 stripes
107
     #define U8G_CLASS U8GLIB_SH1106_128X64_2X
107
     #define U8G_CLASS U8GLIB_SH1106_128X64_2X
108
     #define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)             // 4 stripes
108
     #define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)             // 4 stripes
199
     #include "../module/motion.h" // for active_extruder
199
     #include "../module/motion.h" // for active_extruder
200
   #endif
200
   #endif
201
 
201
 
202
+  void lcd_status_screen();
202
   void lcd_return_to_status();
203
   void lcd_return_to_status();
203
   bool lcd_hasstatus();
204
   bool lcd_hasstatus();
204
   void lcd_setstatus(const char* message, const bool persist=false);
205
   void lcd_setstatus(const char* message, const bool persist=false);
229
 
230
 
230
   void lcd_quick_feedback(const bool clear_buttons); // Audible feedback for a button click - could also be visual
231
   void lcd_quick_feedback(const bool clear_buttons); // Audible feedback for a button click - could also be visual
231
 
232
 
232
-  #if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
233
-    void dontExpireStatus();
233
+  #if ENABLED(LCD_PROGRESS_BAR)
234
+    extern millis_t progress_bar_ms;  // Start time for the current progress bar cycle
235
+    #if PROGRESS_MSG_EXPIRE > 0
236
+      void dontExpireStatus();
237
+    #endif
234
   #endif
238
   #endif
235
 
239
 
236
   #if ENABLED(LCD_SET_PROGRESS_MANUALLY)
240
   #if ENABLED(LCD_SET_PROGRESS_MANUALLY)
246
     void set_lcd_contrast(const int16_t value);
250
     void set_lcd_contrast(const int16_t value);
247
   #endif
251
   #endif
248
 
252
 
249
-  #if ENABLED(DOGLCD)
253
+  #if HAS_GRAPHICAL_LCD
250
     #define SETCURSOR(col, row) lcd_moveto(col * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT))
254
     #define SETCURSOR(col, row) lcd_moveto(col * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT))
251
     #define SETCURSOR_RJ(len, row) lcd_moveto(LCD_PIXEL_WIDTH - len * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT))
255
     #define SETCURSOR_RJ(len, row) lcd_moveto(LCD_PIXEL_WIDTH - len * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT))
252
   #else
256
   #else
316
       extern uint8_t filename_scroll_pos, filename_scroll_max;
320
       extern uint8_t filename_scroll_pos, filename_scroll_max;
317
     #endif
321
     #endif
318
 
322
 
319
-  #endif // ULTIPANEL
323
+  #endif // HAS_LCD_MENU
320
 
324
 
321
   #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
325
   #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
322
     extern millis_t previous_lcd_status_ms;
326
     extern millis_t previous_lcd_status_ms;
422
   void lcd_reselect_last_file();
426
   void lcd_reselect_last_file();
423
 #endif
427
 #endif
424
 
428
 
425
-// LCD implementations
426
-void lcd_implementation_clear();
427
-void lcd_implementation_init();
428
-
429
 #if HAS_GRAPHICAL_LCD
429
 #if HAS_GRAPHICAL_LCD
430
   extern bool drawing_screen, first_page;
430
   extern bool drawing_screen, first_page;
431
 #elif HAS_SPI_LCD
431
 #elif HAS_SPI_LCD
432
   constexpr bool first_page = true;
432
   constexpr bool first_page = true;
433
 #endif
433
 #endif
434
 
434
 
435
+// LCD implementations
436
+void lcd_implementation_clear();
437
+void lcd_implementation_init();
438
+
435
 #if HAS_CHARACTER_LCD
439
 #if HAS_CHARACTER_LCD
436
 
440
 
437
-  enum HD44780CharSet : uint8_t {
438
-    CHARSET_MENU,
439
-    CHARSET_INFO,
440
-    CHARSET_BOOT
441
-  };
441
+  enum HD44780CharSet : uint8_t { CHARSET_MENU, CHARSET_INFO, CHARSET_BOOT };
442
+
443
+  void lcd_set_custom_characters(
444
+    #if ENABLED(LCD_PROGRESS_BAR) || ENABLED(SHOW_BOOTSCREEN)
445
+      const HD44780CharSet screen_charset=CHARSET_INFO
446
+    #endif
447
+  );
448
+  #if ENABLED(LCD_PROGRESS_BAR)
449
+    #define LCD_SET_CHARSET(C) lcd_set_custom_characters(C)
450
+  #else
451
+    #define LCD_SET_CHARSET(C) lcd_set_custom_characters()
452
+  #endif
442
 
453
 
443
 #endif
454
 #endif

+ 2
- 2
Marlin/src/module/tool_change.cpp Näytä tiedosto

70
   #include "../feature/fanmux.h"
70
   #include "../feature/fanmux.h"
71
 #endif
71
 #endif
72
 
72
 
73
-#if ENABLED(ULTIPANEL)
73
+#if HAS_LCD_MENU
74
   #include "../lcd/ultralcd.h"
74
   #include "../lcd/ultralcd.h"
75
 #endif
75
 #endif
76
 
76
 
524
                 no_move = true;
524
                 no_move = true;
525
           #endif
525
           #endif
526
 
526
 
527
-          #if ENABLED(ULTIPANEL)
527
+          #if HAS_LCD_MENU
528
             lcd_return_to_status();
528
             lcd_return_to_status();
529
           #endif
529
           #endif
530
 
530
 

Loading…
Peruuta
Tallenna