From bf5df306e16a415a0af002d1990317cca5331e8b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 17 Feb 2018 00:52:08 -0600 Subject: [PATCH] Fix compile error with SHOW_BOOTSCREEN disabled Fix #9530 Fix #9524 --- Marlin/src/lcd/dogm/dogm_bitmaps.h | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/Marlin/src/lcd/dogm/dogm_bitmaps.h b/Marlin/src/lcd/dogm/dogm_bitmaps.h index 85165dd736..f9bc106d63 100644 --- a/Marlin/src/lcd/dogm/dogm_bitmaps.h +++ b/Marlin/src/lcd/dogm/dogm_bitmaps.h @@ -118,14 +118,16 @@ #endif -#endif + #ifndef START_BMP_BYTEWIDTH + #define START_BMP_BYTEWIDTH ((START_BMPWIDTH + 7) / 8) + #endif + #ifndef START_BMPHEIGHT + #define START_BMPHEIGHT (sizeof(start_bmp) / (START_BMP_BYTEWIDTH)) + #endif + static_assert(sizeof(start_bmp) == (START_BMP_BYTEWIDTH) * (START_BMPHEIGHT), "Bootscreen (start_bmp) dimensions don't match data."); -// Here comes a compile-time operation to match the extruder symbols -// on the info screen to the set number of extruders in configuration.h -// -// When only one extruder is selected, the "1" on the symbol will not -// be displayed. +#endif #if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE) @@ -601,13 +603,6 @@ #endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY -#ifndef START_BMP_BYTEWIDTH - #define START_BMP_BYTEWIDTH ((START_BMPWIDTH + 7) / 8) -#endif -#ifndef START_BMPHEIGHT - #define START_BMPHEIGHT (sizeof(start_bmp) / (START_BMP_BYTEWIDTH)) -#endif - #ifndef CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH #define CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH ((CUSTOM_BOOTSCREEN_BMPWIDTH + 7) / 8) #endif @@ -645,11 +640,6 @@ #error "Only 4 fan animation frames currently supported." #endif -// -// Make sure data size matches -// -static_assert(sizeof(start_bmp) == (START_BMP_BYTEWIDTH) * (START_BMPHEIGHT), "Bootscreen (start_bmp) dimensions don't match data."); - #define BMP_SIZE (STATUS_BMP_BYTEWIDTH) * (STATUS_SCREENHEIGHT) static_assert(sizeof(status_screen0_bmp) == BMP_SIZE, "Status header (status_screen0_bmp) dimensions don't match data."); #if FAN_ANIM_FRAMES > 1