Ender 3 V2 Status Line (#21369)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d172c71376
commit
930752d46e
@@ -44,9 +44,16 @@ MarlinUI ui;
|
||||
#include "../gcode/queue.h"
|
||||
#include "fontutils.h"
|
||||
#include "../sd/cardreader.h"
|
||||
#if EITHER(EXTENSIBLE_UI, DWIN_CREALITY_LCD)
|
||||
#define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../module/printcounter.h"
|
||||
#include "../MarlinCore.h"
|
||||
#include "dwin/e3v2/dwin.h"
|
||||
#endif
|
||||
|
||||
#if HAS_STATUS_MESSAGE
|
||||
#define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U)
|
||||
#endif
|
||||
|
||||
#if LCD_HAS_WAIT_FOR_MOVE
|
||||
@@ -55,25 +62,24 @@ MarlinUI ui;
|
||||
|
||||
constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||
|
||||
#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));
|
||||
#if HAS_STATUS_MESSAGE
|
||||
#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));
|
||||
#else
|
||||
constexpr uint8_t MAX_MESSAGE_LENGTH = MAX_LANG_CHARSIZE * (LCD_WIDTH);
|
||||
#endif
|
||||
#else
|
||||
constexpr uint8_t MAX_MESSAGE_LENGTH = MAX_LANG_CHARSIZE * (LCD_WIDTH);
|
||||
constexpr uint8_t MAX_MESSAGE_LENGTH = 63;
|
||||
#endif
|
||||
#elif EITHER(EXTENSIBLE_UI, DWIN_CREALITY_LCD)
|
||||
constexpr uint8_t MAX_MESSAGE_LENGTH = 63;
|
||||
#endif
|
||||
|
||||
#if EITHER(HAS_WIRED_LCD, EXTENSIBLE_UI)
|
||||
uint8_t MarlinUI::alert_level; // = 0
|
||||
char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
|
||||
uint8_t MarlinUI::alert_level; // = 0
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
|
||||
MarlinUI::progress_t MarlinUI::progress_override; // = 0
|
||||
#if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME)
|
||||
#if ENABLED(USE_M73_REMAINING_TIME)
|
||||
uint32_t MarlinUI::remaining_time;
|
||||
#endif
|
||||
#endif
|
||||
@@ -1461,6 +1467,7 @@ void MarlinUI::update() {
|
||||
#endif
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(status_message));
|
||||
TERN_(DWIN_CREALITY_LCD, DWIN_StatusChanged(status_message));
|
||||
}
|
||||
|
||||
#if ENABLED(STATUS_MESSAGE_SCROLLING)
|
||||
@@ -1581,7 +1588,7 @@ void MarlinUI::update() {
|
||||
|
||||
#endif
|
||||
|
||||
#else // !HAS_DISPLAY
|
||||
#elif !HAS_STATUS_MESSAGE // && !HAS_DISPLAY
|
||||
|
||||
//
|
||||
// Send the status line as a host notification
|
||||
@@ -1596,7 +1603,7 @@ void MarlinUI::update() {
|
||||
TERN(HOST_PROMPT_SUPPORT, host_action_notify_P(message), UNUSED(message));
|
||||
}
|
||||
|
||||
#endif // !HAS_DISPLAY
|
||||
#endif // !HAS_DISPLAY && !HAS_STATUS_MESSAGE
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user