From 34b17d4a8a9f08cdae108ad983a776b9067f578b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 18 Apr 2016 19:34:59 -0700 Subject: [PATCH] Reduce heater status code if no bed --- Marlin/dogm_lcd_implementation.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 5033fbe817..ee8bb88dd1 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -287,9 +287,11 @@ FORCE_INLINE void _draw_centered_temp(int temp, int x, int y) { } FORCE_INLINE void _draw_heater_status(int x, int heater) { - bool isBed = heater < 0; - - lcd_setFont(FONT_STATUSMENU); + #if HAS_TEMP_BED + bool isBed = heater < 0; + #else + const bool isBed = false; + #endif _draw_centered_temp((isBed ? degTargetBed() : degTargetHotend(heater)) + 0.5, x, 7); @@ -351,8 +353,10 @@ static void lcd_implementation_status_screen() { // Extruders for (int i = 0; i < EXTRUDERS; i++) _draw_heater_status(5 + i * 25, i); - // Heatbed - if (EXTRUDERS < 4) _draw_heater_status(81, -1); + // Heated bed + #if EXTRUDERS < 4 && HAS_TEMP_BED + _draw_heater_status(81, -1); + #endif // Fan lcd_setFont(FONT_STATUSMENU);