Ver código fonte

bed level correction menu fix (menu_item_edit for negative integers)

PavelSindler 6 anos atrás
pai
commit
91b12ff64b
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      Firmware/menu.cpp

+ 2 - 1
Firmware/menu.cpp

@@ -284,7 +284,8 @@ void menu_draw_P<int16_t*>(char chr, const char* str, int16_t val)
 	if (text_len > 15) text_len = 15;
 	char spaces[21];
 	strcpy_P(spaces, menu_20x_space);
-	spaces[15 - text_len] = 0;
+	if (val <= -100) spaces[15 - text_len - 1] = 0;
+	else spaces[15 - text_len] = 0;
 	lcd_printf_P(menu_fmt_int3, chr, str, spaces, val);
 }