From ef90b49fffa540746e66b15c463233e2efb0ef81 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 6 Oct 2017 23:56:58 -0500 Subject: [PATCH 1/2] Remove extra NEWPANEL settings in Conditionals_LCD.h --- Marlin/src/inc/Conditionals_LCD.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 3f8092d233..57dcca8076 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -34,7 +34,6 @@ #define DOGLCD #define ULTIPANEL - #define NEWPANEL #define DEFAULT_LCD_CONTRAST 90 #define LCD_CONTRAST_MIN 60 #define LCD_CONTRAST_MAX 140 @@ -43,7 +42,6 @@ #define DOGLCD #define ULTIPANEL - #define NEWPANEL #define DEFAULT_LCD_CONTRAST 17 #define U8GLIB_ST7565_64128N @@ -51,7 +49,6 @@ #define DOGLCD #define ULTIPANEL - #define NEWPANEL #define DEFAULT_LCD_CONTRAST 17 #elif ENABLED(ANET_KEYPAD_LCD) @@ -102,7 +99,6 @@ #define U8GLIB_SSD1306 #define ULTIPANEL - #define NEWPANEL #define REVERSE_ENCODER_DIRECTION #define REVERSE_MENU_DIRECTION @@ -111,14 +107,12 @@ #define LCD_I2C_TYPE_PCA8574 #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander #define ULTIPANEL - #define NEWPANEL #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define DOGLCD #define U8GLIB_ST7920 #define ULTIPANEL - #define NEWPANEL #endif @@ -143,7 +137,6 @@ || ENABLED(G3D_PANEL) \ || ENABLED(RIGIDBOT_PANEL) #define ULTIPANEL - #define NEWPANEL #endif #if ENABLED(REPRAPWORLD_KEYPAD) @@ -165,7 +158,6 @@ #define LCD_I2C_TYPE_PCF8575 #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander #define ULTIPANEL - #define NEWPANEL #elif ENABLED(LCD_I2C_PANELOLU2) @@ -175,7 +167,6 @@ #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD #define ULTIPANEL - #define NEWPANEL #elif ENABLED(LCD_I2C_VIKI) @@ -191,7 +182,6 @@ #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) #define ULTIPANEL - #define NEWPANEL #define ENCODER_FEEDRATE_DEADZONE 4 @@ -237,7 +227,6 @@ #if ENABLED(SAV_3DLCD) #define SR_LCD_2W_NL // Non latching 2 wire shift register #define ULTIPANEL - #define NEWPANEL #endif #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display @@ -250,7 +239,7 @@ #endif #if ENABLED(ULTIPANEL) - #define NEWPANEL //enable this if you have a click-encoder panel + #define NEWPANEL // Disable this if you actually have no click-encoder panel #define ULTRA_LCD #ifndef LCD_WIDTH #define LCD_WIDTH 20 From de84f57a9c2a45f5dc53584c07fd6e4fb1aedbf7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 6 Oct 2017 23:57:11 -0500 Subject: [PATCH 2/2] Patch SD file draw bug --- Marlin/src/lcd/ultralcd_impl_DOGM.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index 159e493e99..d437d040ed 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -928,14 +928,15 @@ static void lcd_implementation_status_screen() { if (!PAGE_CONTAINS(row_y1, row_y2)) return; uint8_t n = LCD_WIDTH - (START_COL) - 1; + char c; if (longFilename[0]) { filename = longFilename; - longFilename[n] = '\0'; + longFilename[n] = '\0'; // cutoff at screen edge } if (isDir) lcd_print(LCD_STR_FOLDER[0]); - while (char c = *filename) { + while ((c = *filename) && n > 0) { n -= lcd_print_and_count(c); filename++; }