diff --git a/Marlin/src/HAL/HAL_AVR/HAL.h b/Marlin/src/HAL/HAL_AVR/HAL.h index e6d9683675..d739a379e8 100644 --- a/Marlin/src/HAL/HAL_AVR/HAL.h +++ b/Marlin/src/HAL/HAL_AVR/HAL.h @@ -91,19 +91,19 @@ typedef int8_t pin_t; #define NUM_SERIAL 1 #else #if !WITHIN(SERIAL_PORT, -1, 3) - #error "SERIAL_PORT must be from -1 to 3" + #error "SERIAL_PORT must be from -1 to 3. Please update your configuration." #endif #define MYSERIAL0 customizedSerial1 #ifdef SERIAL_PORT_2 #if !WITHIN(SERIAL_PORT_2, -1, 3) - #error "SERIAL_PORT_2 must be from -1 to 3" + #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration." #elif SERIAL_PORT_2 == SERIAL_PORT - #error "SERIAL_PORT_2 must be different than SERIAL_PORT" + #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration." #endif - #define NUM_SERIAL 2 #define MYSERIAL1 customizedSerial2 + #define NUM_SERIAL 2 #else #define NUM_SERIAL 1 #endif diff --git a/Marlin/src/HAL/HAL_DUE/HAL.h b/Marlin/src/HAL/HAL_DUE/HAL.h index 64cff24665..3f38ae0a36 100644 --- a/Marlin/src/HAL/HAL_DUE/HAL.h +++ b/Marlin/src/HAL/HAL_DUE/HAL.h @@ -56,8 +56,7 @@ #ifdef SERIAL_PORT_2 #if SERIAL_PORT_2 == SERIAL_PORT #error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration." - #endif - #if SERIAL_PORT_2 == -1 + #elif SERIAL_PORT_2 == -1 #define MYSERIAL1 customizedSerial2 #elif SERIAL_PORT_2 == 0 #define MYSERIAL1 Serial diff --git a/Marlin/src/HAL/HAL_ESP32/HAL.h b/Marlin/src/HAL/HAL_ESP32/HAL.h index df9a5648c8..b5f2d3e204 100644 --- a/Marlin/src/HAL/HAL_ESP32/HAL.h +++ b/Marlin/src/HAL/HAL_ESP32/HAL.h @@ -48,8 +48,8 @@ extern portMUX_TYPE spinlock; #define MYSERIAL0 flushableSerial #if ENABLED(WIFISUPPORT) - #define NUM_SERIAL 2 #define MYSERIAL1 webSocketSerial + #define NUM_SERIAL 2 #else #define NUM_SERIAL 1 #endif diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.h b/Marlin/src/HAL/HAL_LPC1768/HAL.h index 1648905453..a85379ad99 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL.h +++ b/Marlin/src/HAL/HAL_LPC1768/HAL.h @@ -61,10 +61,6 @@ extern "C" volatile uint32_t _millis; #define ST7920_DELAY_3 DELAY_NS(750) #endif -#if !WITHIN(SERIAL_PORT, -1, 3) - #error "SERIAL_PORT must be from -1 to 3" -#endif - #if SERIAL_PORT == -1 #define MYSERIAL0 UsbSerial #elif SERIAL_PORT == 0 @@ -75,16 +71,14 @@ extern "C" volatile uint32_t _millis; #define MYSERIAL0 MSerial2 #elif SERIAL_PORT == 3 #define MYSERIAL0 MSerial3 +#else + #error "SERIAL_PORT must be from -1 to 3. Please update your configuration." #endif #ifdef SERIAL_PORT_2 - #if !WITHIN(SERIAL_PORT_2, -1, 3) - #error "SERIAL_PORT_2 must be from -1 to 3" - #elif SERIAL_PORT_2 == SERIAL_PORT - #error "SERIAL_PORT_2 must be different than SERIAL_PORT" - #endif - #define NUM_SERIAL 2 - #if SERIAL_PORT_2 == -1 + #if SERIAL_PORT_2 == SERIAL_PORT + #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration." + #elif SERIAL_PORT_2 == -1 #define MYSERIAL1 UsbSerial #elif SERIAL_PORT_2 == 0 #define MYSERIAL1 MSerial @@ -94,7 +88,10 @@ extern "C" volatile uint32_t _millis; #define MYSERIAL1 MSerial2 #elif SERIAL_PORT_2 == 3 #define MYSERIAL1 MSerial3 + #else + #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration." #endif + #define NUM_SERIAL 2 #else #define NUM_SERIAL 1 #endif diff --git a/Marlin/src/HAL/HAL_SAMD51/HAL.h b/Marlin/src/HAL/HAL_SAMD51/HAL.h index dea84da5d1..9551352200 100644 --- a/Marlin/src/HAL/HAL_SAMD51/HAL.h +++ b/Marlin/src/HAL/HAL_SAMD51/HAL.h @@ -33,11 +33,9 @@ #include "MarlinSerial_AGCM4.h" // Serial ports - #if !WITHIN(SERIAL_PORT, -1, 3) - #error "SERIAL_PORT must be from -1 to 3" - #endif // MYSERIAL0 required before MarlinSerial includes! + #if SERIAL_PORT == -1 #define MYSERIAL0 Serial #elif SERIAL_PORT == 0 @@ -46,18 +44,16 @@ #define MYSERIAL0 Serial2 #elif SERIAL_PORT == 2 #define MYSERIAL0 Serial3 - #else + #elif SERIAL_PORT == 3 #define MYSERIAL0 Serial4 + #else + #error "SERIAL_PORT must be from -1 to 3. Please update your configuration." #endif #ifdef SERIAL_PORT_2 - #if !WITHIN(SERIAL_PORT_2, -1, 3) - #error "SERIAL_PORT_2 must be from -1 to 3" - #elif SERIAL_PORT_2 == SERIAL_PORT - #error "SERIAL_PORT_2 must be different than SERIAL_PORT" - #endif - #define NUM_SERIAL 2 - #if SERIAL_PORT_2 == -1 + #if SERIAL_PORT_2 == SERIAL_PORT + #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration." + #elif SERIAL_PORT_2 == -1 #define MYSERIAL1 Serial #elif SERIAL_PORT_2 == 0 #define MYSERIAL1 Serial1 @@ -65,9 +61,12 @@ #define MYSERIAL1 Serial2 #elif SERIAL_PORT_2 == 2 #define MYSERIAL1 Serial3 - #else + #elif SERIAL_PORT_2 == 3 #define MYSERIAL1 Serial4 + #else + #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration." #endif + #define NUM_SERIAL 2 #else #define NUM_SERIAL 1 #endif diff --git a/Marlin/src/HAL/HAL_STM32/HAL.h b/Marlin/src/HAL/HAL_STM32/HAL.h index 910d437bd6..b27e5c6d62 100644 --- a/Marlin/src/HAL/HAL_STM32/HAL.h +++ b/Marlin/src/HAL/HAL_STM32/HAL.h @@ -44,13 +44,8 @@ // ------------------------ #if SERIAL_PORT == 0 - #error "Serial port 0 does not exist" -#endif - -#if !WITHIN(SERIAL_PORT, -1, 6) - #error "SERIAL_PORT must be from -1 to 6" -#endif -#if SERIAL_PORT == -1 + #error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration." +#elif SERIAL_PORT == -1 #define MYSERIAL0 SerialUSB #elif SERIAL_PORT == 1 #define MYSERIAL0 Serial1 @@ -64,20 +59,17 @@ #define MYSERIAL0 Serial5 #elif SERIAL_PORT == 6 #define MYSERIAL0 Serial6 +#else + #error "SERIAL_PORT must be from -1 to 6. Please update your configuration." #endif #ifdef SERIAL_PORT_2 - #if SERIAL_PORT_2 == 0 - #error "Serial port 0 does not exist" - #endif - - #if !WITHIN(SERIAL_PORT_2, -1, 6) - #error "SERIAL_PORT_2 must be from -1 to 6" - #elif SERIAL_PORT_2 == SERIAL_PORT - #error "SERIAL_PORT_2 must be different than SERIAL_PORT" - #endif #define NUM_SERIAL 2 - #if SERIAL_PORT_2 == -1 + #if SERIAL_PORT_2 == 0 + #error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration." + #elif SERIAL_PORT_2 == SERIAL_PORT + #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration." + #elif SERIAL_PORT_2 == -1 #define MYSERIAL1 SerialUSB #elif SERIAL_PORT_2 == 1 #define MYSERIAL1 Serial1 @@ -91,6 +83,8 @@ #define MYSERIAL1 Serial5 #elif SERIAL_PORT_2 == 6 #define MYSERIAL1 Serial6 + #else + #error "SERIAL_PORT_2 must be from -1 to 6. Please update your configuration." #endif #else #define NUM_SERIAL 1 diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.h b/Marlin/src/HAL/HAL_STM32F1/HAL.h index a88b72107e..fea5ff86e8 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL.h +++ b/Marlin/src/HAL/HAL_STM32F1/HAL.h @@ -78,13 +78,10 @@ #define MSerial5 Serial4 #endif -#if !WITHIN(SERIAL_PORT, -1, 5) - #error "SERIAL_PORT must be from -1 to 5" -#endif -#if SERIAL_PORT == -1 +#if SERIAL_PORT == 0 + #error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration." +#elif SERIAL_PORT == -1 #define MYSERIAL0 UsbSerial -#elif SERIAL_PORT == 0 - #error "Serial port 0 does not exist" #elif SERIAL_PORT == 1 #define MYSERIAL0 MSerial1 #elif SERIAL_PORT == 2 @@ -95,19 +92,17 @@ #define MYSERIAL0 MSerial4 #elif SERIAL_PORT == 5 #define MYSERIAL0 MSerial5 +#else + #error "SERIAL_PORT must be from -1 to 5. Please update your configuration." #endif #ifdef SERIAL_PORT_2 - #if !WITHIN(SERIAL_PORT_2, -1, 5) - #error "SERIAL_PORT_2 must be from -1 to 5" + #if SERIAL_PORT_2 == 0 + #error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration." #elif SERIAL_PORT_2 == SERIAL_PORT - #error "SERIAL_PORT_2 must be different than SERIAL_PORT" - #endif - #define NUM_SERIAL 2 - #if SERIAL_PORT_2 == -1 + #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration." + #elif SERIAL_PORT_2 == -1 #define MYSERIAL1 UsbSerial - #elif SERIAL_PORT_2 == 0 - #error "Serial port 0 does not exist" #elif SERIAL_PORT_2 == 1 #define MYSERIAL1 MSerial1 #elif SERIAL_PORT_2 == 2 @@ -118,7 +113,10 @@ #define MYSERIAL1 MSerial4 #elif SERIAL_PORT_2 == 5 #define MYSERIAL1 MSerial5 + #else + #error "SERIAL_PORT_2 must be from -1 to 5. Please update your configuration." #endif + #define NUM_SERIAL 2 #else #define NUM_SERIAL 1 #endif diff --git a/Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h b/Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h index 0e44df4d11..f4a581991e 100644 --- a/Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h +++ b/Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h @@ -44,17 +44,12 @@ // Defines // ------------------------ -//Serial override +// Serial override //extern HalSerial usb_serial; #if defined(STM32F4) && SERIAL_PORT == 0 - #error "Serial port 0 does not exist" -#endif - -#if !WITHIN(SERIAL_PORT, -1, 6) - #error "SERIAL_PORT must be from -1 to 6" -#endif -#if SERIAL_PORT == -1 + #error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration." +#elif SERIAL_PORT == -1 #define MYSERIAL0 SerialUSB #elif SERIAL_PORT == 1 #define MYSERIAL0 SerialUART1 @@ -68,19 +63,16 @@ #define MYSERIAL0 SerialUART5 #elif SERIAL_PORT == 6 #define MYSERIAL0 SerialUART6 +#else + #error "SERIAL_PORT must be from -1 to 6. Please update your configuration." #endif #ifdef SERIAL_PORT_2 #if defined(STM32F4) && SERIAL_PORT_2 == 0 - #error "Serial port 0 does not exist" - #endif - #if !WITHIN(SERIAL_PORT_2, -1, 6) - #error "SERIAL_PORT_2 must be from -1 to 6" + #error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration." #elif SERIAL_PORT_2 == SERIAL_PORT - #error "SERIAL_PORT_2 must be different than SERIAL_PORT" - #endif - #define NUM_SERIAL 2 - #if SERIAL_PORT_2 == -1 + #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration." + #elif SERIAL_PORT_2 == -1 #define MYSERIAL1 SerialUSB #elif SERIAL_PORT_2 == 1 #define MYSERIAL1 SerialUART1 @@ -94,7 +86,10 @@ #define MYSERIAL1 SerialUART5 #elif SERIAL_PORT_2 == 6 #define MYSERIAL1 SerialUART6 + #else + #error "SERIAL_PORT_2 must be from -1 to 6. Please update your configuration." #endif + #define NUM_SERIAL 2 #else #define NUM_SERIAL 1 #endif diff --git a/Marlin/src/HAL/shared/backtrace/unwinder.h b/Marlin/src/HAL/shared/backtrace/unwinder.h index 604854ad0f..cae1379513 100644 --- a/Marlin/src/HAL/shared/backtrace/unwinder.h +++ b/Marlin/src/HAL/shared/backtrace/unwinder.h @@ -164,7 +164,7 @@ typedef struct { * link register (i.e. not a normal register) and the stack pointer value * supplied. * - * -If the program was compiled with -funwind-tables , it will use them to + * -If the program was compiled with -funwind-tables it will use them to * perform the traceback. Otherwise, brute force will be employed * -If the program was compiled with -mpoke-function-name, then you will * get function names in the traceback. Otherwise, you will not. diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index 439078b51e..7719a2d1c7 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -912,7 +912,7 @@ void ST7920_Lite_Status_Screen::on_exit() { ncs(); } -// This is called prior to the KILL screen to +// Called prior to the KILL screen to // clear the screen, preventing a garbled display. void ST7920_Lite_Status_Screen::clear_text_buffer() { cs(); diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp index ce0be0e6b3..87094eb804 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp @@ -74,7 +74,7 @@ static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = { 0x038, // 8 Bit interface (DL=1), basic instruction set (RE=0) 0x00C, // display on, cursor & blink off; 0x08: all off - 0x006, // Entry mode: Cursor move to right ,DDRAM address counter (AC) plus 1, no shift + 0x006, // Entry mode: Cursor move to right, DDRAM address counter (AC) plus 1, no shift 0x002, // disable scroll, enable CGRAM adress 0x001, // clear RAM, needs 1.6 ms U8G_ESC_DLY(100), // delay 100 ms diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h index 1863d0ec29..854b8897b3 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h @@ -179,5 +179,5 @@ #else - #error Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify "ftdi_eve_boards.h" + #error "Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify 'ftdi_eve_boards.h'." #endif diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp index d21511856f..c4bf02a87a 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp @@ -1179,7 +1179,7 @@ void CLCD::default_display_orientation() { #endif } #elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED) - #error PORTRAIT or MIRRORED orientation not supported on the FT800 + #error "PORTRAIT or MIRRORED orientation not supported on the FT800." #elif ENABLED(TOUCH_UI_INVERTED) mem_write_32(REG::ROTATE, 1); #endif diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h index e1439a75c6..471530cadf 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h @@ -124,5 +124,5 @@ } #else - #error Unknown or no TOUCH_UI_FTDI_EVE display resolution specified. To add a display resolution, modify "ftdi_eve_resolutions.h" + #error "Unknown or no TOUCH_UI_FTDI_EVE display resolution specified. To add a display resolution, modify 'ftdi_eve_resolutions.h'." #endif diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h index 0ef9779c71..ef2b23a3a2 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h @@ -210,7 +210,9 @@ #define ENABLED(b) _CAT(SWITCH_ENABLED_, b) #define DISABLED(b) !ENABLED(b) #define ANY(A,B) (ENABLED(A) || ENABLED(B)) + #define EITHER(A,B) (ENABLED(A) || ENABLED(B)) #define BOTH(A,B) (ENABLED(A) && ENABLED(B)) + #define NONE(A,B) (DISABLED(A) && DISABLED(B)) // Remove compiler warning on an unused variable #ifndef UNUSED diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/pin_mappings.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/pin_mappings.h index c2818570f1..d474644b8c 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/pin_mappings.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/pin_mappings.h @@ -29,7 +29,7 @@ #ifdef CR10_TFT_PINMAP #ifndef __MARLIN_FIRMWARE__ - #error This pin mapping requires Marlin. + #error "This pin mapping requires Marlin." #endif #define CLCD_USE_SOFT_SPI @@ -49,7 +49,7 @@ #ifdef AO_EXP1_DEPRECATED_PINMAP #ifndef __MARLIN_FIRMWARE__ - #error This pin mapping requires Marlin. + #error "This pin mapping requires Marlin." #endif #define CLCD_MOD_RESET LCD_PINS_D4 @@ -89,7 +89,7 @@ #ifdef AO_EXP1_PINMAP #ifndef __MARLIN_FIRMWARE__ - #error This pin mapping requires Marlin. + #error "This pin mapping requires Marlin." #endif #define CLCD_MOD_RESET LCD_PINS_ENABLE @@ -134,7 +134,7 @@ #ifdef AO_EXP2_PINMAP #ifndef __MARLIN_FIRMWARE__ - #error This pin mapping requires Marlin. + #error "This pin mapping requires Marlin." #endif #define CLCD_SPI_CS BTN_EN1 diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp index 58a545937c..016996e265 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp @@ -55,7 +55,7 @@ void MainMenu::onRedraw(draw_mode_t what) { .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS)) .tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE)) .enabled( - #if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) + #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS) 1 #endif ) diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h index 4e6d8d3e2d..176c8145e3 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h @@ -232,7 +232,7 @@ class SpinnerDialogBox : public DialogBoxBaseClass, public CachedScreen { private: static void draw_axis_position(draw_mode_t); diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp index bc2cce2ff6..e71f200a35 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) +#if ENABLED(TOUCH_UI_FTDI_EVE) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS) #include "screens.h" #include "screen_data.h" diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/colors.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/colors.h index 95494bbae8..933e91db80 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/colors.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/colors.h @@ -75,7 +75,7 @@ namespace Theme { constexpr uint32_t gray_color_5 = hsl_to_rgb(accent_hue, gray_sat, 0.78); constexpr uint32_t gray_color_6 = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest - #if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) + #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS) // Lulzbot TAZ Pro constexpr uint32_t theme_darkest = gray_color_1; constexpr uint32_t theme_dark = gray_color_2; diff --git a/Marlin/src/lcd/extui_dgus_lcd.cpp b/Marlin/src/lcd/extui_dgus_lcd.cpp index c2daacd70a..0da82472b4 100644 --- a/Marlin/src/lcd/extui_dgus_lcd.cpp +++ b/Marlin/src/lcd/extui_dgus_lcd.cpp @@ -34,6 +34,8 @@ #include "extensible_ui/lib/dgus/DGUSDisplay.h" #include "extensible_ui/lib/dgus/DGUSDisplayDefinition.h" +extern const char NUL_STR[]; + namespace ExtUI { void onStartup() { @@ -44,15 +46,26 @@ namespace ExtUI { void onIdle() { ScreenHandler.loop(); } void onPrinterKilled(PGM_P error, PGM_P component) { - extern const char NUL_STR[]; ScreenHandler.sendinfoscreen(GET_TEXT(MSG_HALTED), error, NUL_STR, GET_TEXT(MSG_PLEASE_RESET), true, true, true, true); ScreenHandler.GotoScreen(DGUSLCD_SCREEN_KILL); while (!ScreenHandler.loop()); // Wait while anything is left to be sent } - void onMediaInserted() { ScreenHandler.SDCardInserted(); } - void onMediaError() { ScreenHandler.SDCardError(); } - void onMediaRemoved() { ScreenHandler.SDCardRemoved(); } + void onMediaInserted() { + #if ENABLED(SDSUPPORT) + ScreenHandler.SDCardInserted(); + #endif + } + void onMediaError() { + #if ENABLED(SDSUPPORT) + ScreenHandler.SDCardError(); + #endif + } + void onMediaRemoved() { + #if ENABLED(SDSUPPORT) + ScreenHandler.SDCardRemoved(); + #endif + } void onPlayTone(const uint16_t frequency, const uint16_t duration) {} void onPrintTimerStarted() {} diff --git a/Marlin/src/lcd/extui_example.cpp b/Marlin/src/lcd/extui_example.cpp index 9a00db5f80..595b45e31b 100644 --- a/Marlin/src/lcd/extui_example.cpp +++ b/Marlin/src/lcd/extui_example.cpp @@ -60,7 +60,7 @@ namespace ExtUI { void onFactoryReset() {} void onStoreSettings(char *buff) { - // This is called when saving to EEPROM (i.e. M500). If the ExtUI needs + // Called when saving to EEPROM (i.e. M500). If the ExtUI needs // permanent data to be stored, it can write up to eeprom_data_size bytes // into buff. @@ -70,7 +70,7 @@ namespace ExtUI { } void onLoadSettings(const char *buff) { - // This is called while loading settings from EEPROM. If the ExtUI + // Called while loading settings from EEPROM. If the ExtUI // needs to retrieve data, it should copy up to eeprom_data_size bytes // from buff @@ -80,17 +80,17 @@ namespace ExtUI { } void onConfigurationStoreWritten(bool success) { - // This is called after the entire EEPROM has been written, + // Called after the entire EEPROM has been written, // whether successful or not. } void onConfigurationStoreRead(bool success) { - // This is called after the entire EEPROM has been read, + // Called after the entire EEPROM has been read, // whether successful or not. } void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { - // This is called when any mesh points are updated + // Called when any mesh points are updated } } diff --git a/config/examples/FlashForge/CreatorPro/CuraSettings.txt b/config/examples/FlashForge/CreatorPro/CuraSettings.txt index 8f74d83a99..d45af2b721 100644 --- a/config/examples/FlashForge/CreatorPro/CuraSettings.txt +++ b/config/examples/FlashForge/CreatorPro/CuraSettings.txt @@ -117,7 +117,7 @@ Extruder 2 - ;START G-CODE; M104 T0 S{material_print_temperature, 0} -M104 T1 S{material_print_temperature , 1} +M104 T1 S{material_print_temperature, 1} M140 S{material_bed_temperature} G28 ;purge right @@ -136,9 +136,9 @@ G92 E0 ;purge left T1 ;M104 T0 S{material_standby_temperature, 0} -M104 T1 S{material_print_temperature ,1} +M104 T1 S{material_print_temperature, 1} G1 X-110 Y-70 Z30 F4800 -M109 T1 S{material_print_temperature , 1} +M109 T1 S{material_print_temperature, 1} G92 E0 G1 Z0.4 F1800 G1 X-67 Y-70 E25 F300 ; purge nozzle