1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

🎨 Misc. adjustments, spacing

This commit is contained in:
Scott Lahteine 2022-04-03 16:50:39 -05:00
parent c4873a64ec
commit 19838d97be
8 changed files with 50 additions and 44 deletions

View File

@ -2700,38 +2700,38 @@
//========================== Extensible UI Displays =========================== //========================== Extensible UI Displays ===========================
//============================================================================= //=============================================================================
// /**
// DGUS Touch Display with DWIN OS. (Choose one.) * DGUS Touch Display with DWIN OS. (Choose one.)
// ORIGIN : https://www.aliexpress.com/item/32993409517.html * ORIGIN : https://www.aliexpress.com/item/32993409517.html
// FYSETC : https://www.aliexpress.com/item/32961471929.html * FYSETC : https://www.aliexpress.com/item/32961471929.html
// MKS : https://www.aliexpress.com/item/1005002008179262.html * MKS : https://www.aliexpress.com/item/1005002008179262.html
// *
// Flash display with DGUS Displays for Marlin: * Flash display with DGUS Displays for Marlin:
// - Format the SD card to FAT32 with an allocation size of 4kb. * - Format the SD card to FAT32 with an allocation size of 4kb.
// - Download files as specified for your type of display. * - Download files as specified for your type of display.
// - Plug the microSD card into the back of the display. * - Plug the microSD card into the back of the display.
// - Boot the display and wait for the update to complete. * - Boot the display and wait for the update to complete.
// *
// ORIGIN (Marlin DWIN_SET) * ORIGIN (Marlin DWIN_SET)
// - Download https://github.com/coldtobi/Marlin_DGUS_Resources * - Download https://github.com/coldtobi/Marlin_DGUS_Resources
// - Copy the downloaded DWIN_SET folder to the SD card. * - Copy the downloaded DWIN_SET folder to the SD card.
// *
// FYSETC (Supplier default) * FYSETC (Supplier default)
// - Download https://github.com/FYSETC/FYSTLCD-2.0 * - Download https://github.com/FYSETC/FYSTLCD-2.0
// - Copy the downloaded SCREEN folder to the SD card. * - Copy the downloaded SCREEN folder to the SD card.
// *
// HIPRECY (Supplier default) * HIPRECY (Supplier default)
// - Download https://github.com/HiPrecy/Touch-Lcd-LEO * - Download https://github.com/HiPrecy/Touch-Lcd-LEO
// - Copy the downloaded DWIN_SET folder to the SD card. * - Copy the downloaded DWIN_SET folder to the SD card.
// *
// MKS (MKS-H43) (Supplier default) * MKS (MKS-H43) (Supplier default)
// - Download https://github.com/makerbase-mks/MKS-H43 * - Download https://github.com/makerbase-mks/MKS-H43
// - Copy the downloaded DWIN_SET folder to the SD card. * - Copy the downloaded DWIN_SET folder to the SD card.
// *
// RELOADED (T5UID1) * RELOADED (T5UID1)
// - Download https://github.com/Desuuuu/DGUS-reloaded/releases * - Download https://github.com/Desuuuu/DGUS-reloaded/releases
// - Copy the downloaded DWIN_SET folder to the SD card. * - Copy the downloaded DWIN_SET folder to the SD card.
// */
//#define DGUS_LCD_UI_ORIGIN //#define DGUS_LCD_UI_ORIGIN
//#define DGUS_LCD_UI_FYSETC //#define DGUS_LCD_UI_FYSETC
//#define DGUS_LCD_UI_HIPRECY //#define DGUS_LCD_UI_HIPRECY

View File

@ -22,7 +22,7 @@
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"
#if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER) #if HAS_GCODE_M876
#include "../../feature/host_actions.h" #include "../../feature/host_actions.h"
#include "../gcode.h" #include "../gcode.h"
@ -37,4 +37,4 @@ void GcodeSuite::M876() {
} }
#endif // HOST_PROMPT_SUPPORT && !EMERGENCY_PARSER #endif // HAS_GCODE_M876

View File

@ -701,6 +701,10 @@
#undef SERIAL_XON_XOFF #undef SERIAL_XON_XOFF
#endif #endif
#if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER)
#define HAS_GCODE_M876
#endif
#if ENABLED(HOST_ACTION_COMMANDS) #if ENABLED(HOST_ACTION_COMMANDS)
#ifndef ACTION_ON_PAUSE #ifndef ACTION_ON_PAUSE
#define ACTION_ON_PAUSE "pause" #define ACTION_ON_PAUSE "pause"

View File

@ -184,12 +184,14 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
#endif #endif
#if LCD_BACKLIGHT_TIMEOUT #if LCD_BACKLIGHT_TIMEOUT
uint16_t MarlinUI::lcd_backlight_timeout; // Initialized by settings.load() uint16_t MarlinUI::lcd_backlight_timeout; // Initialized by settings.load()
millis_t MarlinUI::backlight_off_ms = 0; millis_t MarlinUI::backlight_off_ms = 0;
void MarlinUI::refresh_backlight_timeout() { void MarlinUI::refresh_backlight_timeout() {
backlight_off_ms = lcd_backlight_timeout ? millis() + lcd_backlight_timeout * 1000UL : 0; backlight_off_ms = lcd_backlight_timeout ? millis() + lcd_backlight_timeout * 1000UL : 0;
WRITE(LCD_BACKLIGHT_PIN, HIGH); WRITE(LCD_BACKLIGHT_PIN, HIGH);
} }
#endif #endif
void MarlinUI::init() { void MarlinUI::init() {

View File

@ -541,6 +541,10 @@ void menu_configuration() {
#if HAS_LCD_CONTRAST && LCD_CONTRAST_MIN < LCD_CONTRAST_MAX #if HAS_LCD_CONTRAST && LCD_CONTRAST_MIN < LCD_CONTRAST_MAX
EDIT_ITEM_FAST(uint8, MSG_CONTRAST, &ui.contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, ui.refresh_contrast, true); EDIT_ITEM_FAST(uint8, MSG_CONTRAST, &ui.contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, ui.refresh_contrast, true);
#endif #endif
//
// Set display backlight / sleep timeout
//
#if LCD_BACKLIGHT_TIMEOUT && LCD_BKL_TIMEOUT_MIN < LCD_BKL_TIMEOUT_MAX #if LCD_BACKLIGHT_TIMEOUT && LCD_BKL_TIMEOUT_MIN < LCD_BKL_TIMEOUT_MAX
EDIT_ITEM(uint16_4, MSG_LCD_BKL_TIMEOUT, &ui.lcd_backlight_timeout, LCD_BKL_TIMEOUT_MIN, LCD_BKL_TIMEOUT_MAX, ui.refresh_backlight_timeout); EDIT_ITEM(uint16_4, MSG_LCD_BKL_TIMEOUT, &ui.lcd_backlight_timeout, LCD_BKL_TIMEOUT_MIN, LCD_BKL_TIMEOUT_MAX, ui.refresh_backlight_timeout);
#endif #endif

View File

@ -399,7 +399,7 @@ typedef struct SettingsDataStruct {
uint8_t lcd_brightness; // M256 B uint8_t lcd_brightness; // M256 B
// //
// LCD_BACKLIGHT_TIMEOUT // Display Sleep
// //
#if LCD_BACKLIGHT_TIMEOUT #if LCD_BACKLIGHT_TIMEOUT
uint16_t lcd_backlight_timeout; // (G-code needed) uint16_t lcd_backlight_timeout; // (G-code needed)
@ -1142,7 +1142,7 @@ void MarlinSettings::postprocess() {
} }
// //
// LCD Backlight Timeout // LCD Backlight / Sleep Timeout
// //
#if LCD_BACKLIGHT_TIMEOUT #if LCD_BACKLIGHT_TIMEOUT
EEPROM_WRITE(ui.lcd_backlight_timeout); EEPROM_WRITE(ui.lcd_backlight_timeout);
@ -1156,7 +1156,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(USE_CONTROLLER_FAN) #if ENABLED(USE_CONTROLLER_FAN)
const controllerFan_settings_t &cfs = controllerFan.settings; const controllerFan_settings_t &cfs = controllerFan.settings;
#else #else
controllerFan_settings_t cfs = controllerFan_defaults; constexpr controllerFan_settings_t cfs = controllerFan_defaults;
#endif #endif
EEPROM_WRITE(cfs); EEPROM_WRITE(cfs);
} }
@ -2091,7 +2091,7 @@ void MarlinSettings::postprocess() {
} }
// //
// LCD Backlight Timeout // LCD Backlight / Sleep Timeout
// //
#if LCD_BACKLIGHT_TIMEOUT #if LCD_BACKLIGHT_TIMEOUT
EEPROM_READ(ui.lcd_backlight_timeout); EEPROM_READ(ui.lcd_backlight_timeout);
@ -3168,7 +3168,7 @@ void MarlinSettings::reset() {
TERN_(HAS_LCD_BRIGHTNESS, ui.brightness = LCD_BRIGHTNESS_DEFAULT); TERN_(HAS_LCD_BRIGHTNESS, ui.brightness = LCD_BRIGHTNESS_DEFAULT);
// //
// LCD Backlight Timeout // LCD Backlight / Sleep Timeout
// //
#if LCD_BACKLIGHT_TIMEOUT #if LCD_BACKLIGHT_TIMEOUT
ui.lcd_backlight_timeout = LCD_BACKLIGHT_TIMEOUT; ui.lcd_backlight_timeout = LCD_BACKLIGHT_TIMEOUT;

View File

@ -45,10 +45,6 @@
#define HAS_SAVED_POSITIONS #define HAS_SAVED_POSITIONS
#endif #endif
#if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER)
#define HAS_GCODE_M876
#endif
#if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD) #if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD)
#define HAS_SMART_EFF_MOD #define HAS_SMART_EFF_MOD
#endif #endif

View File

@ -217,7 +217,7 @@ default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
-<src/gcode/lcd/M0_M1.cpp> -<src/gcode/lcd/M0_M1.cpp>
-<src/gcode/lcd/M73.cpp> -<src/gcode/lcd/M73.cpp>
-<src/gcode/lcd/M117.cpp> -<src/gcode/lcd/M117.cpp>
-<src/gcode/lcd/M250.cpp> -<src/gcode/lcd/M256.cpp> -<src/gcode/lcd/M250.cpp> -<src/gcode/lcd/M255.cpp> -<src/gcode/lcd/M256.cpp>
-<src/gcode/lcd/M300.cpp> -<src/gcode/lcd/M300.cpp>
-<src/gcode/lcd/M414.cpp> -<src/gcode/lcd/M414.cpp>
-<src/gcode/lcd/M995.cpp> -<src/gcode/lcd/M995.cpp>