Fix MIN/MAX function collision with macros

This commit is contained in:
Scott Lahteine
2019-07-05 18:01:21 -05:00
parent b6546ea33a
commit 750a16ad38
63 changed files with 167 additions and 167 deletions

View File

@ -1170,7 +1170,7 @@
#define STATUS_LOGO_X 0
#endif
#ifndef STATUS_LOGO_Y
#define STATUS_LOGO_Y MIN(0, 10 - (STATUS_LOGO_HEIGHT) / 2)
#define STATUS_LOGO_Y _MIN(0, 10 - (STATUS_LOGO_HEIGHT) / 2)
#endif
#ifndef STATUS_LOGO_HEIGHT
#define STATUS_LOGO_HEIGHT (sizeof(status_logo_bmp) / (STATUS_LOGO_BYTEWIDTH))

View File

@ -96,7 +96,7 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons
#define CHAMBER_ALT() false
#endif
#define MAX_HOTEND_DRAW MIN(HOTENDS, ((LCD_PIXEL_WIDTH - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
#define MAX_HOTEND_DRAW _MIN(HOTENDS, ((LCD_PIXEL_WIDTH - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
#define STATUS_HEATERS_BOT (STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1)
#if ENABLED(MARLIN_DEV_MODE)

View File

@ -169,7 +169,7 @@ void MarlinUI::set_font(const MarlinFont font_nr) {
text_width_1 = (sizeof(STRING_SPLASH_LINE1) - 1) * (MENU_FONT_WIDTH),
text_width_2 = (sizeof(STRING_SPLASH_LINE2) - 1) * (MENU_FONT_WIDTH);
#endif
constexpr uint8_t text_max_width = MAX(text_width_1, text_width_2),
constexpr uint8_t text_max_width = _MAX(text_width_1, text_width_2),
rspace = width - (START_BMPWIDTH);
int8_t offx, offy, txt_base, txt_offx_1, txt_offx_2;