Rename LCD conditionals (#19533)
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_CHARACTER_LCD
|
||||
#if HAS_MARLINUI_HD44780
|
||||
|
||||
#include "../ultralcd.h"
|
||||
#include "../../MarlinCore.h"
|
||||
@ -1119,4 +1119,4 @@ int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
|
||||
|
||||
#endif // DEBUG_LCDPRINT
|
||||
|
||||
#endif // HAS_CHARACTER_LCD
|
||||
#endif // HAS_MARLINUI_HD44780
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_CHARACTER_LCD
|
||||
#if HAS_MARLINUI_HD44780
|
||||
|
||||
/**
|
||||
* ultralcd_HD44780.cpp
|
||||
@ -1517,4 +1517,4 @@ void MarlinUI::draw_status_screen() {
|
||||
|
||||
#endif // HAS_LCD_MENU
|
||||
|
||||
#endif // HAS_CHARACTER_LCD
|
||||
#endif // HAS_MARLINUI_HD44780
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#include "ultralcd_DOGM.h"
|
||||
|
||||
@ -53,4 +53,4 @@ int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD && DISABLED(LIGHTWEIGHT_UI)
|
||||
#if HAS_MARLINUI_U8GLIB && DISABLED(LIGHTWEIGHT_UI)
|
||||
|
||||
#include "dogm_Statusscreen.h"
|
||||
#include "ultralcd_DOGM.h"
|
||||
@ -913,4 +913,4 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD && !LIGHTWEIGHT_UI
|
||||
#endif // HAS_MARLINUI_U8GLIB && !LIGHTWEIGHT_UI
|
||||
|
@ -67,7 +67,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#include "HAL_LCD_com_defines.h"
|
||||
|
||||
@ -300,4 +300,4 @@ uint8_t u8g_WriteEscSeqP_2_wire(u8g_t *u8g, u8g_dev_t *dev, const uint8_t *esc_s
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#include <U8glib.h>
|
||||
#include "HAL_LCD_com_defines.h"
|
||||
@ -233,4 +233,4 @@ u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_sw_spi = { u8g_dev_st7565_64128n_HAL_2x_f
|
||||
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);
|
||||
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 };
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#include "HAL_LCD_com_defines.h"
|
||||
|
||||
@ -205,4 +205,4 @@ u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi = { u8g_dev_st7920_128x64_HAL_4x_f
|
||||
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 };
|
||||
#endif
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD && (PIN_EXISTS(FSMC_CS) || ENABLED(SPI_GRAPHICAL_TFT))
|
||||
#if HAS_MARLINUI_U8GLIB && (PIN_EXISTS(FSMC_CS) || ENABLED(SPI_GRAPHICAL_TFT))
|
||||
|
||||
#include "HAL_LCD_com_defines.h"
|
||||
#include "ultralcd_DOGM.h"
|
||||
@ -813,4 +813,4 @@ uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_p
|
||||
|
||||
U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_tft_320x240_upscale_from_128x64_fn, U8G_COM_HAL_TFT_FN);
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD && FSMC_CS
|
||||
#endif // HAS_MARLINUI_U8GLIB && FSMC_CS
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#include "HAL_LCD_com_defines.h"
|
||||
|
||||
@ -210,4 +210,4 @@ u8g_pb_t u8g_dev_uc1701_mini12864_HAL_2x_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u
|
||||
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 };
|
||||
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 };
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#include <string.h>
|
||||
#include "../fontutils.h"
|
||||
@ -312,4 +312,4 @@ int uxg_GetUtf8StrPixelWidthP(u8g_t *pu8g, PGM_P utf8_msg) {
|
||||
return data.adv;
|
||||
}
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#include "ultralcd_DOGM.h"
|
||||
#include "u8g_fontutf8.h"
|
||||
@ -687,4 +687,4 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
|
||||
#endif // HAS_LCD_MENU
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_WIRED_LCD
|
||||
#include "ultralcd.h"
|
||||
#include "../MarlinCore.h"
|
||||
#endif
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
#include "lcdprint.h"
|
||||
|
||||
@ -73,4 +73,4 @@ lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const int8_t ind, PGM_P const i
|
||||
return n;
|
||||
}
|
||||
|
||||
#endif // HAS_SPI_LCD
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#include "dogm/u8g_fontutf8.h"
|
||||
typedef u8g_uint_t lcd_uint_t;
|
||||
|
@ -213,14 +213,14 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co
|
||||
clear_lcd();
|
||||
|
||||
// Re-initialize custom characters that may be re-used
|
||||
#if HAS_CHARACTER_LCD
|
||||
#if HAS_MARLINUI_HD44780
|
||||
if (TERN1(AUTO_BED_LEVELING_UBL, !ubl.lcd_map_control))
|
||||
set_custom_characters(on_status_screen() ? CHARSET_INFO : CHARSET_MENU);
|
||||
#endif
|
||||
|
||||
refresh(LCDVIEW_CALL_REDRAW_NEXT);
|
||||
screen_changed = true;
|
||||
TERN_(HAS_GRAPHICAL_LCD, drawing_screen = false);
|
||||
TERN_(HAS_MARLINUI_U8GLIB, drawing_screen = false);
|
||||
|
||||
TERN_(HAS_LCD_MENU, encoder_direction_normal());
|
||||
|
||||
|
@ -39,7 +39,7 @@ typedef void (*selectFunc_t)();
|
||||
#define SS_INVERT 0x02
|
||||
#define SS_DEFAULT SS_CENTER
|
||||
|
||||
#if HAS_GRAPHICAL_LCD && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
|
||||
#if HAS_MARLINUI_U8GLIB && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
|
||||
void _lcd_zoffset_overlay_gfx(const float zvalue);
|
||||
#endif
|
||||
|
||||
@ -215,7 +215,7 @@ void _lcd_draw_homing();
|
||||
void line_to_z(const float &z);
|
||||
#endif
|
||||
|
||||
#if HAS_GRAPHICAL_LCD && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
|
||||
#if HAS_MARLINUI_U8GLIB && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
|
||||
void _lcd_zoffset_overlay_gfx(const float zvalue);
|
||||
#endif
|
||||
|
||||
|
@ -60,7 +60,9 @@ void menu_advanced_settings();
|
||||
static int8_t bar_percent = 0;
|
||||
if (ui.use_click()) {
|
||||
ui.goto_previous_screen();
|
||||
ui.set_custom_characters(CHARSET_MENU);
|
||||
#if HAS_MARLINUI_HD44780
|
||||
ui.set_custom_characters(CHARSET_MENU);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
bar_percent += (int8_t)ui.encoderPosition;
|
||||
@ -73,7 +75,9 @@ void menu_advanced_settings();
|
||||
|
||||
void _progress_bar_test() {
|
||||
ui.goto_screen(progress_bar_test);
|
||||
ui.set_custom_characters(CHARSET_INFO);
|
||||
#if HAS_MARLINUI_HD44780
|
||||
ui.set_custom_characters(CHARSET_INFO);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // LCD_PROGRESS_BAR_TEST
|
||||
|
@ -99,7 +99,7 @@ class MenuItem_sdfolder : public MenuItem_sdbase {
|
||||
encoderTopLine = 0;
|
||||
ui.encoderPosition = 2 * (ENCODER_STEPS_PER_MENU_ITEM);
|
||||
ui.screen_changed = true;
|
||||
TERN_(HAS_GRAPHICAL_LCD, ui.drawing_screen = false);
|
||||
TERN_(HAS_MARLINUI_U8GLIB, ui.drawing_screen = false);
|
||||
ui.refresh();
|
||||
}
|
||||
};
|
||||
@ -107,7 +107,7 @@ class MenuItem_sdfolder : public MenuItem_sdbase {
|
||||
void menu_media() {
|
||||
ui.encoder_direction_menus();
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
static uint16_t fileCnt;
|
||||
if (ui.first_page) fileCnt = card.get_num_Files();
|
||||
#else
|
||||
|
@ -205,7 +205,7 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
|
||||
#if DISABLED(HAS_GRAPHICAL_TFT)
|
||||
extern const char NUL_STR[];
|
||||
SUBMENU_P(NUL_STR, []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
|
||||
MENU_ITEM_ADDON_START(0 + ENABLED(HAS_CHARACTER_LCD));
|
||||
MENU_ITEM_ADDON_START(0 + ENABLED(HAS_MARLINUI_HD44780));
|
||||
lcd_put_u8str(tmp);
|
||||
MENU_ITEM_ADDON_END();
|
||||
#else
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
#include "../../feature/babystep.h"
|
||||
#include "../lcdprint.h"
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#include "../dogm/ultralcd_DOGM.h"
|
||||
#endif
|
||||
|
||||
@ -68,10 +68,10 @@
|
||||
const float spm = planner.steps_to_mm[axis];
|
||||
MenuEditItemBase::draw_edit_screen(msg, BABYSTEP_TO_STR(spm * babystep.accum));
|
||||
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||
const bool in_view = TERN1(HAS_GRAPHICAL_LCD, PAGE_CONTAINS(LCD_PIXEL_HEIGHT - MENU_FONT_HEIGHT, LCD_PIXEL_HEIGHT - 1));
|
||||
const bool in_view = TERN1(HAS_MARLINUI_U8GLIB, PAGE_CONTAINS(LCD_PIXEL_HEIGHT - MENU_FONT_HEIGHT, LCD_PIXEL_HEIGHT - 1));
|
||||
if (in_view) {
|
||||
TERN_(HAS_GRAPHICAL_LCD, ui.set_font(FONT_MENU));
|
||||
lcd_moveto(0, TERN(HAS_GRAPHICAL_LCD, LCD_PIXEL_HEIGHT - MENU_FONT_DESCENT, LCD_HEIGHT - 1));
|
||||
TERN_(HAS_MARLINUI_U8GLIB, ui.set_font(FONT_MENU));
|
||||
lcd_moveto(0, TERN(HAS_MARLINUI_U8GLIB, LCD_PIXEL_HEIGHT - MENU_FONT_DESCENT, LCD_HEIGHT - 1));
|
||||
lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL));
|
||||
lcd_put_wchar(':');
|
||||
lcd_put_u8str(BABYSTEP_TO_STR(spm * babystep.axis_total[BS_TOTAL_IND(axis)]));
|
||||
|
@ -74,7 +74,7 @@ TouchButtons touch;
|
||||
void TouchButtons::init() { touchIO.Init(); }
|
||||
|
||||
uint8_t TouchButtons::read_buttons() {
|
||||
#ifdef HAS_SPI_LCD
|
||||
#ifdef HAS_WIRED_LCD
|
||||
int16_t x, y;
|
||||
|
||||
if (!touchIO.getRawPoint(&x, &y)) return 0;
|
||||
|
@ -51,7 +51,7 @@ MarlinUI ui;
|
||||
|
||||
constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_WIRED_LCD
|
||||
#if ENABLED(STATUS_MESSAGE_SCROLLING)
|
||||
uint8_t MarlinUI::status_scroll_offset; // = 0
|
||||
constexpr uint8_t MAX_MESSAGE_LENGTH = _MAX(LONG_FILENAME_LENGTH, MAX_LANG_CHARSIZE * 2 * (LCD_WIDTH));
|
||||
@ -62,7 +62,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||
constexpr uint8_t MAX_MESSAGE_LENGTH = 63;
|
||||
#endif
|
||||
|
||||
#if EITHER(HAS_SPI_LCD, EXTENSIBLE_UI)
|
||||
#if EITHER(HAS_WIRED_LCD, EXTENSIBLE_UI)
|
||||
uint8_t MarlinUI::alert_level; // = 0
|
||||
char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
|
||||
#endif
|
||||
@ -114,9 +114,9 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#include "dogm/ultralcd_DOGM.h"
|
||||
#endif
|
||||
|
||||
@ -167,7 +167,7 @@ uint8_t MarlinUI::lcd_status_update_delay = 1; // First update one loop delayed
|
||||
|
||||
millis_t MarlinUI::next_button_update_ms; // = 0
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
bool MarlinUI::drawing_screen, MarlinUI::first_page; // = false
|
||||
#endif
|
||||
|
||||
@ -372,7 +372,7 @@ void MarlinUI::init() {
|
||||
|
||||
#endif // HAS_SHIFT_ENCODER
|
||||
|
||||
#if HAS_ENCODER_ACTION && HAS_SLOW_BUTTONS
|
||||
#if BOTH(HAS_ENCODER_ACTION, HAS_SLOW_BUTTONS)
|
||||
slow_buttons = 0;
|
||||
#endif
|
||||
|
||||
@ -873,7 +873,7 @@ void MarlinUI::update() {
|
||||
|
||||
#endif // HAS_LCD_MENU
|
||||
|
||||
if (ELAPSED(ms, next_lcd_update_ms) || TERN0(HAS_GRAPHICAL_LCD, drawing_screen)) {
|
||||
if (ELAPSED(ms, next_lcd_update_ms) || TERN0(HAS_MARLINUI_U8GLIB, drawing_screen)) {
|
||||
|
||||
next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL;
|
||||
|
||||
@ -971,7 +971,7 @@ void MarlinUI::update() {
|
||||
// This runs every ~100ms when idling often enough.
|
||||
// Instead of tracking changes just redraw the Status Screen once per second.
|
||||
if (on_status_screen() && !lcd_status_update_delay--) {
|
||||
lcd_status_update_delay = TERN(HAS_GRAPHICAL_LCD, 12, 9);
|
||||
lcd_status_update_delay = TERN(HAS_MARLINUI_U8GLIB, 12, 9);
|
||||
if (max_display_update_time) max_display_update_time--; // Be sure never go to a very big number
|
||||
refresh(LCDVIEW_REDRAW_NOW);
|
||||
}
|
||||
@ -1010,7 +1010,7 @@ void MarlinUI::update() {
|
||||
|
||||
TERN_(HAS_ADC_BUTTONS, keypad_buttons = 0);
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#if ENABLED(LIGHTWEIGHT_UI)
|
||||
const bool in_status = on_status_screen(),
|
||||
@ -1294,7 +1294,7 @@ void MarlinUI::update() {
|
||||
|
||||
#endif // HAS_ENCODER_ACTION
|
||||
|
||||
#endif // HAS_SPI_LCD
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
#if HAS_DISPLAY
|
||||
|
||||
@ -1342,7 +1342,7 @@ void MarlinUI::update() {
|
||||
next_filament_display = ms + 5000UL; // Show status message for 5s
|
||||
#endif
|
||||
|
||||
#if BOTH(HAS_SPI_LCD, STATUS_MESSAGE_SCROLLING)
|
||||
#if BOTH(HAS_WIRED_LCD, STATUS_MESSAGE_SCROLLING)
|
||||
status_scroll_offset = 0;
|
||||
#endif
|
||||
|
||||
@ -1501,7 +1501,7 @@ void MarlinUI::update() {
|
||||
set_status_P(print_paused);
|
||||
|
||||
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
||||
TERN_(HAS_SPI_LCD, lcd_pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT)); // Show message immediately to let user know about pause in progress
|
||||
TERN_(HAS_WIRED_LCD, lcd_pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT)); // Show message immediately to let user know about pause in progress
|
||||
queue.inject_P(PSTR("M25 P\nM24"));
|
||||
#elif ENABLED(SDSUPPORT)
|
||||
queue.inject_P(PSTR("M25"));
|
||||
@ -1610,11 +1610,11 @@ void MarlinUI::update() {
|
||||
|
||||
refresh();
|
||||
|
||||
#if HAS_SPI_LCD || defined(LED_BACKLIGHT_TIMEOUT)
|
||||
#if HAS_WIRED_LCD || defined(LED_BACKLIGHT_TIMEOUT)
|
||||
const millis_t ms = millis();
|
||||
#endif
|
||||
|
||||
TERN_(HAS_SPI_LCD, next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL); // Delay LCD update for SD activity
|
||||
TERN_(HAS_WIRED_LCD, next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL); // Delay LCD update for SD activity
|
||||
|
||||
#ifdef LED_BACKLIGHT_TIMEOUT
|
||||
leds.reset_timeout(ms);
|
||||
|
@ -40,7 +40,7 @@
|
||||
#if HAS_ENCODER_WHEEL || ANY_BUTTON(ENC, BACK, UP, DWN, LFT, RT)
|
||||
#define HAS_DIGITAL_BUTTONS 1
|
||||
#endif
|
||||
#if !HAS_ADC_BUTTONS && (ENABLED(REPRAPWORLD_KEYPAD) || (HAS_SPI_LCD && DISABLED(NEWPANEL)))
|
||||
#if !HAS_ADC_BUTTONS && (ENABLED(REPRAPWORLD_KEYPAD) || (HAS_WIRED_LCD && DISABLED(NEWPANEL)))
|
||||
#define HAS_SHIFT_ENCODER 1
|
||||
#endif
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
#define MULTI_MANUAL 1
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
#include "../MarlinCore.h"
|
||||
|
||||
@ -104,7 +104,7 @@
|
||||
|
||||
#endif // HAS_LCD_MENU
|
||||
|
||||
#endif // HAS_SPI_LCD
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// REPRAPWORLD_KEYPAD (and ADC_KEYPAD)
|
||||
#if ENABLED(REPRAPWORLD_KEYPAD)
|
||||
@ -231,7 +231,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
enum MarlinFont : uint8_t {
|
||||
FONT_STATUSMENU = 1,
|
||||
FONT_EDIT,
|
||||
@ -316,11 +316,11 @@ public:
|
||||
static void refresh();
|
||||
#else
|
||||
FORCE_INLINE static void refresh() {
|
||||
TERN_(HAS_SPI_LCD, refresh(LCDVIEW_CLEAR_CALL_REDRAW));
|
||||
TERN_(HAS_WIRED_LCD, refresh(LCDVIEW_CLEAR_CALL_REDRAW));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_WIRED_LCD
|
||||
static bool detected();
|
||||
static void init_lcd();
|
||||
#else
|
||||
@ -381,7 +381,7 @@ public:
|
||||
static void pause_print();
|
||||
static void resume_print();
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
static millis_t next_button_update_ms;
|
||||
|
||||
@ -403,7 +403,7 @@ public:
|
||||
static void show_bootscreen();
|
||||
#endif
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
static void set_font(const MarlinFont font_nr);
|
||||
|
||||
@ -458,7 +458,7 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
static bool drawing_screen, first_page;
|
||||
#else
|
||||
static constexpr bool drawing_screen = false, first_page = true;
|
||||
@ -577,7 +577,7 @@ public:
|
||||
|
||||
static void draw_select_screen_prompt(PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr);
|
||||
|
||||
#elif HAS_SPI_LCD
|
||||
#elif HAS_WIRED_LCD
|
||||
|
||||
static constexpr bool lcd_clicked = false;
|
||||
static constexpr bool on_status_screen() { return true; }
|
||||
@ -692,7 +692,7 @@ private:
|
||||
static void finish_status(const bool persist);
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_WIRED_LCD
|
||||
#if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS > 0
|
||||
static bool defer_return_to_status;
|
||||
#else
|
||||
|
Reference in New Issue
Block a user