浏览代码

Merge pull request #1863 from DRracer/lcd20190523

Fix. menu texts and formatting - issues PFW-877 and PFW-879
Marek Běl 5 年之前
父节点
当前提交
df02030fe0
共有 9 个文件被更改,包括 57 次插入63 次删除
  1. 7 13
      Firmware/menu.cpp
  2. 4 4
      Firmware/ultralcd.cpp
  3. 4 4
      lang/lang_en.txt
  4. 7 7
      lang/lang_en_cz.txt
  5. 7 7
      lang/lang_en_de.txt
  6. 7 7
      lang/lang_en_es.txt
  7. 7 7
      lang/lang_en_fr.txt
  8. 7 7
      lang/lang_en_it.txt
  9. 7 7
      lang/lang_en_pl.txt

+ 7 - 13
Firmware/menu.cpp

@@ -308,9 +308,9 @@ const char menu_fmt_int3[] PROGMEM = "%c%.15S:%s%3d";
 
 
 const char menu_fmt_float31[] PROGMEM = "%-12.12S%+8.1f";
 const char menu_fmt_float31[] PROGMEM = "%-12.12S%+8.1f";
 
 
-const char menu_fmt_float13[] PROGMEM = "%-15.15S%+5.3f";
+const char menu_fmt_float13[] PROGMEM = "%c%-13.13S%+5.3f";
 
 
-const char menu_fmt_float13off[] PROGMEM = "%c%.12S:%s%";
+const char menu_fmt_float13off[] PROGMEM = "%c%-13.13S%6.6s";
 
 
 template<typename T>
 template<typename T>
 static void menu_draw_P(char chr, const char* str, int16_t val);
 static void menu_draw_P(char chr, const char* str, int16_t val);
@@ -331,20 +331,14 @@ template<>
 void menu_draw_P<uint8_t*>(char chr, const char* str, int16_t val)
 void menu_draw_P<uint8_t*>(char chr, const char* str, int16_t val)
 {
 {
     menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]);
     menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]);
-    int text_len = strlen_P(str);
-    if (text_len > 15) text_len = 15;
-    char spaces[21];
-    strcpy_P(spaces, menu_20x_space);
-    spaces[12 - text_len] = 0;
-    float factor = 1.0 + static_cast<float>(val) / 1000.0;
+    float factor = 1.0f + static_cast<float>(val) / 1000.0f;
     if (val <= _md->minEditValue)
     if (val <= _md->minEditValue)
     {
     {
-        lcd_printf_P(menu_fmt_float13off, chr, str, spaces);
-        lcd_puts_P(_i(" [off]"));
+        lcd_printf_P(menu_fmt_float13off, chr, str, " [off]");
     }
     }
     else
     else
     {
     {
-        lcd_printf_P(menu_fmt_float13, chr, str, spaces, factor);
+        lcd_printf_P(menu_fmt_float13, chr, str, factor);
     }
     }
 }
 }
 
 
@@ -363,7 +357,7 @@ void menu_draw_float31(const char* str, float val)
 	lcd_printf_P(menu_fmt_float31, str, val);	
 	lcd_printf_P(menu_fmt_float31, str, val);	
 }
 }
 
 
-//! @brief Draw up to 12 chars of text and a float number in format +1.234
+//! @brief Draw up to 14 chars of text and a float number in format +1.234
 //! 
 //! 
 //! @param str string label to print
 //! @param str string label to print
 //! @param val value to print aligned to the right side of the display  
 //! @param val value to print aligned to the right side of the display  
@@ -375,7 +369,7 @@ void menu_draw_float31(const char* str, float val)
 //! Moreover, this function gets inlined in the final code, so removing it doesn't really help ;)
 //! Moreover, this function gets inlined in the final code, so removing it doesn't really help ;)
 void menu_draw_float13(const char* str, float val)
 void menu_draw_float13(const char* str, float val)
 {
 {
-	lcd_printf_P(menu_fmt_float13, str, val);
+	lcd_printf_P(menu_fmt_float13, ' ', str, val);
 }
 }
 
 
 template <typename T>
 template <typename T>

+ 4 - 4
Firmware/ultralcd.cpp

@@ -5191,11 +5191,11 @@ void lcd_settings_linearity_correction_menu(void)
 #ifdef TMC2130_LINEARITY_CORRECTION_XYZ
 #ifdef TMC2130_LINEARITY_CORRECTION_XYZ
 	//tmc2130_wave_fac[X_AXIS]
 	//tmc2130_wave_fac[X_AXIS]
 
 
-	MENU_ITEM_EDIT_int3_P(_i("X-correct"),  &tmc2130_wave_fac[X_AXIS],  TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9
-	MENU_ITEM_EDIT_int3_P(_i("Y-correct"),  &tmc2130_wave_fac[Y_AXIS],  TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9
-	MENU_ITEM_EDIT_int3_P(_i("Z-correct"),  &tmc2130_wave_fac[Z_AXIS],  TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9
+	MENU_ITEM_EDIT_int3_P(_i("X-correct:"),  &tmc2130_wave_fac[X_AXIS],  TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=10
+	MENU_ITEM_EDIT_int3_P(_i("Y-correct:"),  &tmc2130_wave_fac[Y_AXIS],  TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=10
+	MENU_ITEM_EDIT_int3_P(_i("Z-correct:"),  &tmc2130_wave_fac[Z_AXIS],  TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=10
 #endif //TMC2130_LINEARITY_CORRECTION_XYZ
 #endif //TMC2130_LINEARITY_CORRECTION_XYZ
-	MENU_ITEM_EDIT_int3_P(_i("E-correct"),  &tmc2130_wave_fac[E_AXIS],  TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9
+	MENU_ITEM_EDIT_int3_P(_i("E-correct:"),  &tmc2130_wave_fac[E_AXIS],  TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=10
 	MENU_END();
 	MENU_END();
 }
 }
 #endif // TMC2130
 #endif // TMC2130

+ 4 - 4
lang/lang_en.txt

@@ -160,8 +160,8 @@
 #MSG_WIZARD_REPEAT_V2_CAL c=20 r=7
 #MSG_WIZARD_REPEAT_V2_CAL c=20 r=7
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 
 
-#MSG_EXTRUDER_CORRECTION c=9
-"E-correct"
+#MSG_EXTRUDER_CORRECTION c=10
+"E-correct:"
 
 
 #MSG_EJECT_FILAMENT c=17 r=1
 #MSG_EJECT_FILAMENT c=17 r=1
 "Eject filament"
 "Eject filament"
@@ -899,7 +899,7 @@
 "XYZ calibration all right. X/Y axes are slightly skewed. Good job!"
 "XYZ calibration all right. X/Y axes are slightly skewed. Good job!"
 
 
 #
 #
-"X-correct"
+"X-correct:"
 
 
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
@@ -926,7 +926,7 @@
 "Y distance from min"
 "Y distance from min"
 
 
 #
 #
-"Y-correct"
+"Y-correct:"
 
 
 #MSG_OFF
 #MSG_OFF
 " [off]"
 " [off]"

+ 7 - 7
lang/lang_en_cz.txt

@@ -214,9 +214,9 @@
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Chcete opakovat posledni krok a pozmenit vzdalenost mezi tryskou a podlozkou?"
 "Chcete opakovat posledni krok a pozmenit vzdalenost mezi tryskou a podlozkou?"
 
 
-#MSG_EXTRUDER_CORRECTION c=9
-"E-correct"
-"Korekce E"
+#MSG_EXTRUDER_CORRECTION c=10
+"E-correct:"
+"Korekce E:"
 
 
 #MSG_EJECT_FILAMENT c=17 r=1
 #MSG_EJECT_FILAMENT c=17 r=1
 "Eject filament"
 "Eject filament"
@@ -1199,8 +1199,8 @@
 "Kalibrace XYZ v poradku. X/Y osy mirne zkosene. Dobra prace!"
 "Kalibrace XYZ v poradku. X/Y osy mirne zkosene. Dobra prace!"
 
 
 #
 #
-"X-correct"
-"Korekce X"
+"X-correct:"
+"Korekce X:"
 
 
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
@@ -1235,8 +1235,8 @@
 "Y vzdalenost od min"
 "Y vzdalenost od min"
 
 
 #
 #
-"Y-correct"
-"Korekce Y"
+"Y-correct:"
+"Korekce Y:"
 
 
 #MSG_OFF
 #MSG_OFF
 " [off]"
 " [off]"

+ 7 - 7
lang/lang_en_de.txt

@@ -214,9 +214,9 @@
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Moechten Sie den letzten Schritt wiederholen, um den Abstand zwischen Duese und Druckbett neu einzustellen?"
 "Moechten Sie den letzten Schritt wiederholen, um den Abstand zwischen Duese und Druckbett neu einzustellen?"
 
 
-#MSG_EXTRUDER_CORRECTION c=9
-"E-correct"
-"E-Korrektur"
+#MSG_EXTRUDER_CORRECTION c=10
+"E-correct:"
+"E-Korrektur:"
 
 
 #MSG_EJECT_FILAMENT c=17 r=1
 #MSG_EJECT_FILAMENT c=17 r=1
 "Eject filament"
 "Eject filament"
@@ -1199,8 +1199,8 @@
 "XYZ Kalibrierung in Ordnung. X/Y Achsen sind etwas schraeg."
 "XYZ Kalibrierung in Ordnung. X/Y Achsen sind etwas schraeg."
 
 
 #
 #
-"X-correct"
-"X-Korrektur"
+"X-correct:"
+"X-Korrektur:"
 
 
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
@@ -1236,8 +1236,8 @@
 "Y Entfernung vom Min"
 "Y Entfernung vom Min"
 
 
 #
 #
-"Y-correct"
-"Y-Korrektur"
+"Y-correct:"
+"Y-Korrektur:"
 
 
 #MSG_OFF
 #MSG_OFF
 " [off]"
 " [off]"

+ 7 - 7
lang/lang_en_es.txt

@@ -214,9 +214,9 @@
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Quieres repetir el ultimo paso para reajustar la distancia boquilla-base?"
 "Quieres repetir el ultimo paso para reajustar la distancia boquilla-base?"
 
 
-#MSG_EXTRUDER_CORRECTION c=9
-"E-correct"
-"E-correcion"
+#MSG_EXTRUDER_CORRECTION c=10
+"E-correct:"
+"E-correcion:"
 
 
 #MSG_EJECT_FILAMENT c=17 r=1
 #MSG_EJECT_FILAMENT c=17 r=1
 "Eject filament"
 "Eject filament"
@@ -1199,8 +1199,8 @@
 "Calibracion XYZ correcta. Los ejes X / Y estan ligeramente inclinados. Buen trabajo!"
 "Calibracion XYZ correcta. Los ejes X / Y estan ligeramente inclinados. Buen trabajo!"
 
 
 #
 #
-"X-correct"
-"X-correcion"
+"X-correct:"
+"X-correcion:"
 
 
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
@@ -1235,8 +1235,8 @@
 "Distancia en Y desde el min"
 "Distancia en Y desde el min"
 
 
 #
 #
-"Y-correct"
-"Y-correcion"
+"Y-correct:"
+"Y-correcion:"
 
 
 #MSG_OFF
 #MSG_OFF
 " [off]"
 " [off]"

+ 7 - 7
lang/lang_en_fr.txt

@@ -214,9 +214,9 @@
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Voulez-vous repeter la derniere etape pour reajuster la distance entre la buse et le plateau chauffant ?"
 "Voulez-vous repeter la derniere etape pour reajuster la distance entre la buse et le plateau chauffant ?"
 
 
-#MSG_EXTRUDER_CORRECTION c=9
-"E-correct"
-"Correct-E"
+#MSG_EXTRUDER_CORRECTION c=10
+"E-correct:"
+"Correct-E:"
 
 
 #MSG_EJECT_FILAMENT c=17 r=1
 #MSG_EJECT_FILAMENT c=17 r=1
 "Eject filament"
 "Eject filament"
@@ -1199,8 +1199,8 @@
 "Calibration XYZ OK. Les axes X/Y sont legerement non perpendiculaires. Bon boulot !"
 "Calibration XYZ OK. Les axes X/Y sont legerement non perpendiculaires. Bon boulot !"
 
 
 #
 #
-"X-correct"
-"Correction-X"
+"X-correct:"
+"Correct-X:"
 
 
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
@@ -1235,8 +1235,8 @@
 "Distance Y du min"
 "Distance Y du min"
 
 
 #
 #
-"Y-correct"
-"Correction-Y"
+"Y-correct:"
+"Correct-Y:"
 
 
 #MSG_OFF
 #MSG_OFF
 " [off]"
 " [off]"

+ 7 - 7
lang/lang_en_it.txt

@@ -214,9 +214,9 @@
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Desideri ripetere l'ultimo passaggio per migliorare la distanza fra ugello e piatto?"
 "Desideri ripetere l'ultimo passaggio per migliorare la distanza fra ugello e piatto?"
 
 
-#MSG_EXTRUDER_CORRECTION c=9
-"E-correct"
-"Correzione-E"
+#MSG_EXTRUDER_CORRECTION c=10
+"E-correct:"
+"Correzione-E:"
 
 
 #MSG_EJECT_FILAMENT c=17 r=1
 #MSG_EJECT_FILAMENT c=17 r=1
 "Eject filament"
 "Eject filament"
@@ -1199,8 +1199,8 @@
 "Calibrazion XYZ corretta. Assi X/Y leggermente storti. Ben fatto!"
 "Calibrazion XYZ corretta. Assi X/Y leggermente storti. Ben fatto!"
 
 
 #
 #
-"X-correct"
-"Correzione-X"
+"X-correct:"
+"Correzione-X:"
 
 
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
@@ -1235,8 +1235,8 @@
 "Distanza Y dal min"
 "Distanza Y dal min"
 
 
 #
 #
-"Y-correct"
-"Correzione-Y"
+"Y-correct:"
+"Correzione-Y:"
 
 
 #MSG_OFF
 #MSG_OFF
 " [off]"
 " [off]"

+ 7 - 7
lang/lang_en_pl.txt

@@ -214,9 +214,9 @@
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
 "Chcesz powtorzyc ostatni krok i ponownie ustawic odleglosc miedzy dysza a stolikiem?"
 "Chcesz powtorzyc ostatni krok i ponownie ustawic odleglosc miedzy dysza a stolikiem?"
 
 
-#MSG_EXTRUDER_CORRECTION c=9
-"E-correct"
-"Korekcja E"
+#MSG_EXTRUDER_CORRECTION c=10
+"E-correct:"
+"Korekcja E:"
 
 
 #MSG_EJECT_FILAMENT c=17 r=1
 #MSG_EJECT_FILAMENT c=17 r=1
 "Eject filament"
 "Eject filament"
@@ -1199,8 +1199,8 @@
 "Kalibracja XYZ prawidlowa. Osie X/Y lekko skosne. Dobra robota!"
 "Kalibracja XYZ prawidlowa. Osie X/Y lekko skosne. Dobra robota!"
 
 
 #
 #
-"X-correct"
-"Korekcja X"
+"X-correct:"
+"Korekcja X:"
 
 
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 #MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
 "XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"
@@ -1235,8 +1235,8 @@
 "Dystans od 0 w osi Y"
 "Dystans od 0 w osi Y"
 
 
 #
 #
-"Y-correct"
-"Korekcja Y"
+"Y-correct:"
+"Korekcja Y:"
 
 
 #MSG_OFF
 #MSG_OFF
 " [off]"
 " [off]"