🚸 Expose sub-options for E3V2 Enhanced (#23099)

This commit is contained in:
Miguel Risco-Castillo
2021-11-10 11:31:35 -05:00
committed by GitHub
parent 99df0b86fb
commit b4b16b63ff
6 changed files with 105 additions and 39 deletions

View File

@@ -49,6 +49,7 @@ MarlinUI ui;
#if ENABLED(DWIN_CREALITY_LCD)
#include "e3v2/creality/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#include "fontutils.h"
#include "e3v2/enhanced/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "e3v2/jyersui/dwin.h"
@@ -69,7 +70,7 @@ MarlinUI ui;
constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
#if HAS_STATUS_MESSAGE
#if BOTH(HAS_WIRED_LCD, STATUS_MESSAGE_SCROLLING)
#if ENABLED(STATUS_MESSAGE_SCROLLING) && EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_ENHANCED)
uint8_t MarlinUI::status_scroll_offset; // = 0
#endif
char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
@@ -1481,11 +1482,9 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
void MarlinUI::finish_status(const bool persist) {
#if HAS_WIRED_LCD
UNUSED(persist);
#if !(BASIC_PROGRESS_BAR && (PROGRESS_MSG_EXPIRE) > 0)
UNUSED(persist);
#endif
#if HAS_WIRED_LCD
#if BASIC_PROGRESS_BAR || BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
const millis_t ms = millis();
@@ -1502,13 +1501,15 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
next_filament_display = ms + 5000UL; // Show status message for 5s
#endif
TERN_(STATUS_MESSAGE_SCROLLING, status_scroll_offset = 0);
#else // HAS_WIRED_LCD
UNUSED(persist);
#endif
#if ENABLED(STATUS_MESSAGE_SCROLLING) && EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_ENHANCED)
status_scroll_offset = 0;
#endif
TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(status_message));
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_StatusChanged(status_message));
TERN_(DWIN_CREALITY_LCD, DWIN_StatusChanged(status_message));
TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_CheckStatusMessage());
TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Update_Status(status_message));
}