From 3137df9ad43d2af8f1ca2f6a53c788467fae6010 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Feb 2018 01:37:02 -0600 Subject: [PATCH 1/4] Special override of LCD_WIDTH --- Marlin/Conditionals_LCD.h | 6 +++++- .../example_configurations/Geeetech/GT2560/Configuration.h | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h index 97784a182..2ed21aa43 100644 --- a/Marlin/Conditionals_LCD.h +++ b/Marlin/Conditionals_LCD.h @@ -277,7 +277,11 @@ #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display #ifndef LCD_WIDTH - #define LCD_WIDTH 22 + #ifdef LCD_WIDTH_OVERRIDE + #define LCD_WIDTH LCD_WIDTH_OVERRIDE + #else + #define LCD_WIDTH 22 + #endif #endif #ifndef LCD_HEIGHT #define LCD_HEIGHT 5 diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index 8cbac8403..36d635002 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -1815,8 +1815,8 @@ */ #if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(MKS_MINI_12864) #define SDSUPPORT // Force SD Card support on for these displays -#elif ENABLED(ULTRA_LCD) && ENABLED(DOGLCD) // No panel, just graphical LCD? - #define LCD_WIDTH 20 // Default is 22. For this Geeetech use 20 +#else + #define LCD_WIDTH_OVERRIDE 20 // Default is 22. For this Geeetech use 20. #endif #endif // CONFIGURATION_H From 252ae1b52d71af5c44d78532c5828468bbd8185a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Feb 2018 00:26:45 -0600 Subject: [PATCH 2/4] Drop ubl.h include from steppers.cpp --- Marlin/stepper.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index f633ee30d..0c4897bca 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -54,10 +54,6 @@ #include "cardreader.h" #include "speed_lookuptable.h" -#if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL) - #include "ubl.h" -#endif - #if HAS_DIGIPOTSS #include #endif From 9509568b7ebdb794e48050a7985e8d1657643f3e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Feb 2018 01:14:58 -0600 Subject: [PATCH 3/4] Patch utility for debug-leveling --- Marlin/utility.cpp | 4 ++-- Marlin/utility.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/utility.cpp b/Marlin/utility.cpp index 0f5919355..63ee94bd0 100644 --- a/Marlin/utility.cpp +++ b/Marlin/utility.cpp @@ -47,7 +47,7 @@ void safe_delay(millis_t ms) { #endif // EEPROM_SETTINGS -#if ENABLED(ULTRA_LCD) +#if ENABLED(ULTRA_LCD) || (ENABLED(DEBUG_LEVELING_FEATURE) && (ENABLED(MESH_BED_LEVELING) || (HAS_ABL && !ABL_PLANAR))) char conv[8] = { 0 }; @@ -254,4 +254,4 @@ void safe_delay(millis_t ms) { return &conv[1]; } -#endif // ULTRA_LCD +#endif // ULTRA_LCD || (DEBUG_LEVELING_FEATURE && (MESH_BED_LEVELING || (HAS_ABL && !ABL_PLANAR))) diff --git a/Marlin/utility.h b/Marlin/utility.h index c3cc9c8dd..7837222bb 100644 --- a/Marlin/utility.h +++ b/Marlin/utility.h @@ -29,7 +29,7 @@ void safe_delay(millis_t ms); void crc16(uint16_t *crc, const void * const data, uint16_t cnt); #endif -#if ENABLED(ULTRA_LCD) || ENABLED(DEBUG_LEVELING_FEATURE) +#if ENABLED(ULTRA_LCD) || (ENABLED(DEBUG_LEVELING_FEATURE) && (ENABLED(MESH_BED_LEVELING) || (HAS_ABL && !ABL_PLANAR))) // Convert uint8_t to string with 123 format char* i8tostr3(const uint8_t x); @@ -81,6 +81,6 @@ void safe_delay(millis_t ms); FORCE_INLINE char *ftostr4sign(const float &x) { return itostr4sign((int)x); } #endif -#endif // ULTRA_LCD +#endif // ULTRA_LCD || (DEBUG_LEVELING_FEATURE && (MESH_BED_LEVELING || (HAS_ABL && !ABL_PLANAR))) #endif // __UTILITY_H__ From f3a09768e873a3f9706d0cf7a273e340f95a382a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 6 Feb 2018 20:29:57 -0600 Subject: [PATCH 4/4] Tweak early handling of M108/M112/M410 --- Marlin/Marlin_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index e577f4cb3..ae5480620 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1114,15 +1114,15 @@ inline void get_serial_commands() { } #if DISABLED(EMERGENCY_PARSER) - // If command was e-stop process now + // Process critical commands early if (strcmp(command, "M108") == 0) { wait_for_heatup = false; - #if ENABLED(ULTIPANEL) + #if HAS_DISPLAY wait_for_user = false; #endif } if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED)); - if (strcmp(command, "M410") == 0) { quickstop_stepper(); } + if (strcmp(command, "M410") == 0) quickstop_stepper(); #endif #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0