Browse Source

Actual fix to the missing first two characters

leptun 4 years ago
parent
commit
596ffe1dc2

+ 1 - 1
Firmware/Marlin_main.cpp

@@ -6131,7 +6131,7 @@ Sigma_Exit:
         WRITE(PS_ON_PIN, PS_ON_ASLEEP);
       #endif
         powersupply = false;
-        LCD_MESSAGERPGM(CAT4(CUSTOM_MENDEL_NAME,PSTR(" "),_i("Off"),PSTR(".")));
+        LCD_MESSAGERPGM(CAT4(CUSTOM_MENDEL_NAME,PSTR(" "),MSG_OFF,PSTR(".")));
         lcd_update(0);
 	  break;
 

+ 1 - 5
Firmware/menu.cpp

@@ -188,11 +188,7 @@ static void menu_draw_toggle_puts_P(const char* str, const char* toggle)
 {
 	menu_draw_item_puts_P(LCD_STR_REFRESH[0], str);
 	lcd_set_cursor(LCD_WIDTH - 4 - strlen_P(toggle), menu_row);
-	lcd_putc('[');
-	lcd_puts_P(toggle);
-	lcd_putc(']');
-	
-	// lcd_printf_P(PSTR("[%s]"), toggle);
+	lcd_printf_P(PSTR("[%S]"), toggle);
 }
 
 //! @brief Format sheet name

+ 2 - 0
Firmware/messages.c

@@ -104,6 +104,8 @@ const char MSG_WIZARD_QUIT[] PROGMEM_I1 = ISTR("You can always resume the Wizard
 const char MSG_YES[] PROGMEM_I1 = ISTR("Yes"); ////
 const char MSG_V2_CALIBRATION[] PROGMEM_I1 = ISTR("First layer cal."); ////c=17 r=1
 const char WELCOME_MSG[] PROGMEM_I1 = ISTR(CUSTOM_MENDEL_NAME " OK."); ////c=20
+const char MSG_OFF[] PROGMEM_I1 = ISTR("Off"); ////
+const char MSG_ON[] PROGMEM_I1 = ISTR("On"); ////
 //not internationalized messages
 const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////
 const char MSG_BROWNOUT_RESET[] PROGMEM_N1 = " Brown out Reset"; ////

+ 2 - 0
Firmware/messages.h

@@ -104,6 +104,8 @@ extern const char MSG_WIZARD_QUIT[];
 extern const char MSG_YES[];
 extern const char MSG_V2_CALIBRATION[];
 extern const char WELCOME_MSG[];
+extern const char MSG_OFF[];
+extern const char MSG_ON[];
 //not internationalized messages
 extern const char MSG_BROWNOUT_RESET[];
 extern const char MSG_EXTERNAL_RESET[];

+ 2 - 2
Firmware/ultralcd.cpp

@@ -5569,7 +5569,7 @@ static void lcd_settings_menu()
 
 	SETTINGS_CUTTER;
 
-	MENU_ITEM_TOGGLE_P(_i("Fans check"), fans_check_enabled ? _i("On") : _i("Off"), lcd_set_fan_check);
+	MENU_ITEM_TOGGLE_P(_i("Fans check"), fans_check_enabled ? _T(MSG_ON) : _T(MSG_OFF), lcd_set_fan_check);
 
 	SETTINGS_SILENT_MODE;
 
@@ -6878,7 +6878,7 @@ static void lcd_tune_menu()
 
      if(farm_mode)
      {
-       MENU_ITEM_TOGGLE_P(_i("Fans check"), fans_check_enabled ? _i("On") : _i("Off"), lcd_set_fan_check);
+       MENU_ITEM_TOGGLE_P(_i("Fans check"), fans_check_enabled ? _T(MSG_ON) : _T(MSG_OFF), lcd_set_fan_check);
      }
 
 #ifdef TMC2130

+ 2 - 2
lang/lang_en.txt

@@ -925,8 +925,8 @@
 #
 "Y-correct:"
 
-#
+#MSG_OFF
 "Off"
 
-#
+#MSG_ON
 "On"

+ 2 - 2
lang/lang_en_cz.txt

@@ -1234,10 +1234,10 @@
 "Y-correct:"
 "Korekce Y:"
 
-#
+#MSG_OFF
 "Off"
 "Vyp"
 
-#
+#MSG_ON
 "On"
 "Zap"

+ 2 - 2
lang/lang_en_de.txt

@@ -1235,10 +1235,10 @@
 "Y-correct:"
 "Y-Korrektur:"
 
-#
+#MSG_OFF
 "Off"
 "Aus"
 
-#
+#MSG_ON
 "On"
 "An"

+ 2 - 2
lang/lang_en_es.txt

@@ -1234,10 +1234,10 @@
 "Y-correct:"
 "Y-correcion:"
 
-#
+#MSG_OFF
 "Off"
 "Ina"
 
-#
+#MSG_ON
 "On"
 "Act"

+ 2 - 2
lang/lang_en_fr.txt

@@ -1234,10 +1234,10 @@
 "Y-correct:"
 "Correct-Y:"
 
-#
+#MSG_OFF
 "Off"
 "\x00"
 
-#
+#MSG_ON
 "On"
 "\x00"

+ 2 - 2
lang/lang_en_it.txt

@@ -1234,10 +1234,10 @@
 "Y-correct:"
 "Correzione-Y:"
 
-#
+#MSG_OFF
 "Off"
 "\x00"
 
-#
+#MSG_ON
 "On"
 "\x00"

+ 2 - 2
lang/lang_en_pl.txt

@@ -1234,10 +1234,10 @@
 "Y-correct:"
 "Korekcja Y:"
 
-#
+#MSG_OFF
 "Off"
 "Wyl"
 
-#
+#MSG_ON
 "On"
 "Wl"