From 14b7c8cf517c25b8936f9a8ab983150f9d20db08 Mon Sep 17 00:00:00 2001 From: GMagician Date: Sat, 3 Feb 2018 22:58:26 +0100 Subject: [PATCH] [1.1.x] Fix temperature out of LCD Fix bug introduced in #9381 Original code was 18-chars*6 hence reversed number in if statements --- Marlin/ultralcd_impl_DOGM.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index ebdce8b18..186c609a9 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -379,7 +379,7 @@ void lcd_implementation_clear() { } // Automatically cleared by Picture Loop FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t x, const uint8_t y) { const char * const str = itostr3(temp); - u8g.setPrintPos(x - (str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1) * DOG_CHAR_WIDTH / 2, y); + u8g.setPrintPos(x - (str[0] != ' ' ? 0 : str[1] != ' ' ? 1 : 2) * DOG_CHAR_WIDTH / 2, y); lcd_print(str); lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); }