diff --git a/src/gui/footer/footer_item_axis.hpp b/src/gui/footer/footer_item_axis.hpp index c877180bc4..72dbb2efba 100644 --- a/src/gui/footer/footer_item_axis.hpp +++ b/src/gui/footer/footer_item_axis.hpp @@ -31,11 +31,6 @@ string_view_utf8 FooterItemAxisPos::static_makeViewIntoBuff(float value) { if (printed_chars < 1) { buff[0] = '\0'; - } else if (size_t(printed_chars) < buff.size()) { - // Remove repeated trailing zeroes after the decimal point - while (((--printed_chars) > 2) && (buff[printed_chars] == '0') && (buff[printed_chars - 1] != '.')) { - buff[printed_chars] = '\0'; - } } return string_view_utf8::MakeRAM((const uint8_t *)buff.data()); } @@ -68,11 +63,6 @@ string_view_utf8 FooterItemAxisCurrPos::static_makeViewIntoBuff(float valu if (printed_chars < 1) { buff[0] = '\0'; - } else if (size_t(printed_chars) < buff.size()) { - // Remove repeated trailing zeroes after the decimal point - while (((--printed_chars) > 2) && (buff[printed_chars] == '0') && (buff[printed_chars - 1] != '.')) { - buff[printed_chars] = '\0'; - } } return string_view_utf8::MakeRAM((const uint8_t *)buff.data()); } diff --git a/src/gui/footer/footer_item_live_z.cpp b/src/gui/footer/footer_item_live_z.cpp index cee767d4b9..71be05ba00 100644 --- a/src/gui/footer/footer_item_live_z.cpp +++ b/src/gui/footer/footer_item_live_z.cpp @@ -25,11 +25,6 @@ string_view_utf8 FooterItemLiveZ::static_makeView(int value) { if (printed_chars < 1) { buff[0] = '\0'; - } else if (size_t(printed_chars) < buff.size()) { - // dont want it to erase last in 0.0, -1.0, -2.0 - while ((--printed_chars) > 2 && buff[printed_chars] == '0' && buff[printed_chars - 1] != '.') { - buff[printed_chars] = '\0'; - } } return string_view_utf8::MakeRAM((const uint8_t *)buff.data());