Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some DOGM warnings #16363

Merged
merged 2 commits into from
Jan 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Marlin/src/lcd/dogm/dogm_Statusscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,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(0U, (10 - (STATUS_LOGO_HEIGHT) / 2))
#endif
#ifndef STATUS_LOGO_HEIGHT
#define STATUS_LOGO_HEIGHT (sizeof(status_logo_bmp) / (STATUS_LOGO_BYTEWIDTH))
Expand Down
6 changes: 4 additions & 2 deletions Marlin/src/lcd/dogm/status_screen_DOGM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,15 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons
UNUSED(blink);
#endif

const bool isHeat = BED_ALT();

const uint8_t tx = STATUS_BED_TEXT_X;

const float temp = thermalManager.degBed(),
target = thermalManager.degTargetBed();

#if ENABLED(STATUS_HEAT_PERCENT) || (DO_DRAW_BED && DISABLED(STATUS_BED_ANIM))
const bool isHeat = BED_ALT();
#endif

#if DO_DRAW_BED && DISABLED(STATUS_BED_ANIM)
#define STATIC_BED true
#define BED_DOT isHeat
Expand Down