Skip to content

Commit

Permalink
Fix JyersUI ZOffset Multiplication (MarlinFirmware#22975)
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanityAutomation authored and thinkyhead committed Oct 18, 2021
1 parent 1112d66 commit 5bfc5c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/lcd/e3v2/jyersui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ void CrealityDWINClass::Draw_Float(float value, uint8_t row, bool selected/*=fal
if (isnan(value))
DWIN_Draw_String(true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), F(" NaN"));
else {
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, Color_White, bColor, digits - log10(minunit) + 1, log10(minunit), xpos, MBASE(row), (value < 0 ? -value : value) * minunit);
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, Color_White, bColor, digits - log10(minunit) + 1, log10(minunit), xpos, MBASE(row), (value < 0 ? -value : value));
DWIN_Draw_String(true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), value < 0 ? F("-") : F(" "));
}
}
Expand Down Expand Up @@ -855,7 +855,7 @@ void CrealityDWINClass::Draw_Status_Area(bool icons/*=false*/) {
}
if (zoffsetvalue != offset) {
offset = zoffsetvalue;
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 2, 2, 207, 417, (zoffsetvalue < 0 ? -zoffsetvalue : zoffsetvalue) * 100);
DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 2, 2, 207, 417, (zoffsetvalue < 0 ? -zoffsetvalue : zoffsetvalue));
DWIN_Draw_String(true, DWIN_FONT_MENU, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 205, 419, zoffsetvalue < 0 ? F("-") : F(" "));
}
#endif
Expand Down

0 comments on commit 5bfc5c1

Please sign in to comment.