Переглянути джерело

Toggle SD Settings

This includes FlashAir support and SD Sorting type
leptun 5 роки тому
батько
коміт
f69035323a
10 змінених файлів з 143 додано та 106 видалено
  1. 5 0
      Firmware/messages.c
  2. 5 0
      Firmware/messages.h
  3. 7 7
      Firmware/ultralcd.cpp
  4. 13 10
      lang/lang_en.txt
  5. 18 14
      lang/lang_en_cz.txt
  6. 19 15
      lang/lang_en_de.txt
  7. 19 15
      lang/lang_en_es.txt
  8. 19 15
      lang/lang_en_fr.txt
  9. 19 15
      lang/lang_en_it.txt
  10. 19 15
      lang/lang_en_pl.txt

+ 5 - 0
Firmware/messages.c

@@ -115,6 +115,11 @@ const char MSG_FIRMWARE[] PROGMEM_I1 = ISTR("Firmware"); ////
 const char MSG_GCODE[] PROGMEM_I1 = ISTR("Gcode"); ////
 const char MSG_GCODE[] PROGMEM_I1 = ISTR("Gcode"); ////
 const char MSG_NOZZLE_DIAMETER[] PROGMEM_I1 = ISTR("Nozzle d."); ////
 const char MSG_NOZZLE_DIAMETER[] PROGMEM_I1 = ISTR("Nozzle d."); ////
 const char MSG_MMU_MODE[] PROGMEM_I1 = ISTR("MMU Mode"); ////
 const char MSG_MMU_MODE[] PROGMEM_I1 = ISTR("MMU Mode"); ////
+const char MSG_SD_CARD[] PROGMEM_I1 = ISTR("SD card"); ////
+const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[] PROGMEM_I1 = ISTR("FlashAir"); ////
+const char MSG_SORT[] PROGMEM_I1 = ISTR("Sort"); ////
+const char MSG_SORT_TIME[] PROGMEM_I1 = ISTR("Time"); ////
+const char MSG_SORT_ALPHA[] PROGMEM_I1 = ISTR("Alphabet"); ////
 
 
 //not internationalized messages
 //not internationalized messages
 const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////
 const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////

+ 5 - 0
Firmware/messages.h

@@ -115,6 +115,11 @@ extern const char MSG_FIRMWARE[];
 extern const char MSG_GCODE[];
 extern const char MSG_GCODE[];
 extern const char MSG_NOZZLE_DIAMETER[];
 extern const char MSG_NOZZLE_DIAMETER[];
 extern const char MSG_MMU_MODE[];
 extern const char MSG_MMU_MODE[];
+extern const char MSG_SD_CARD[];
+extern const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[];
+extern const char MSG_SORT[];
+extern const char MSG_SORT_TIME[];
+extern const char MSG_SORT_ALPHA[];
 
 
 //not internationalized messages
 //not internationalized messages
 extern const char MSG_BROWNOUT_RESET[];
 extern const char MSG_BROWNOUT_RESET[];

+ 7 - 7
Firmware/ultralcd.cpp

@@ -5231,9 +5231,9 @@ while (0)
 do\
 do\
 {\
 {\
     if (card.ToshibaFlashAir_isEnabled())\
     if (card.ToshibaFlashAir_isEnabled())\
-        MENU_ITEM_FUNCTION_P(_i("SD card [flshAir]"), lcd_toshiba_flash_air_compatibility_toggle);/*////MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1*/\
+        MENU_ITEM_TOGGLE_P(_T(MSG_SD_CARD), _T(MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY), lcd_toshiba_flash_air_compatibility_toggle);\
     else\
     else\
-        MENU_ITEM_FUNCTION_P(_i("SD card  [normal]"), lcd_toshiba_flash_air_compatibility_toggle);/*////MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1*/\
+        MENU_ITEM_TOGGLE_P(_T(MSG_SD_CARD), _T(MSG_NORMAL), lcd_toshiba_flash_air_compatibility_toggle);\
 \
 \
     if (!farm_mode)\
     if (!farm_mode)\
     {\
     {\
@@ -5241,9 +5241,9 @@ do\
         EEPROM_read(EEPROM_SD_SORT, (uint8_t*)&sdSort, sizeof(sdSort));\
         EEPROM_read(EEPROM_SD_SORT, (uint8_t*)&sdSort, sizeof(sdSort));\
         switch (sdSort)\
         switch (sdSort)\
         {\
         {\
-          case SD_SORT_TIME: MENU_ITEM_FUNCTION_P(_i("Sort       [time]"), lcd_sort_type_set); break;/*////MSG_SORT_TIME c=17 r=1*/\
-          case SD_SORT_ALPHA: MENU_ITEM_FUNCTION_P(_i("Sort   [alphabet]"), lcd_sort_type_set); break;/*////MSG_SORT_ALPHA c=17 r=1*/\
-          default: MENU_ITEM_FUNCTION_P(_i("Sort       [none]"), lcd_sort_type_set);/*////MSG_SORT_NONE c=17 r=1*/\
+          case SD_SORT_TIME: MENU_ITEM_TOGGLE_P(_T(MSG_SORT), _T(MSG_SORT_TIME), lcd_sort_type_set); break;\
+          case SD_SORT_ALPHA: MENU_ITEM_TOGGLE_P(_T(MSG_SORT), _T(MSG_SORT_ALPHA), lcd_sort_type_set); break;\
+          default: MENU_ITEM_TOGGLE_P(_T(MSG_SORT), _T(MSG_NONE), lcd_sort_type_set);\
         }\
         }\
     }\
     }\
 }\
 }\
@@ -5253,9 +5253,9 @@ while (0)
 do\
 do\
 {\
 {\
     if (card.ToshibaFlashAir_isEnabled())\
     if (card.ToshibaFlashAir_isEnabled())\
-        MENU_ITEM_FUNCTION_P(_i("SD card [flshAir]"), lcd_toshiba_flash_air_compatibility_toggle);/*////MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1*/\
+        MENU_ITEM_TOGGLE_P(_T(MSG_SD_CARD), _T(MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY), lcd_toshiba_flash_air_compatibility_toggle);\
     else\
     else\
-        MENU_ITEM_FUNCTION_P(_i("SD card  [normal]"), lcd_toshiba_flash_air_compatibility_toggle);/*////MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1*/\
+        MENU_ITEM_TOGGLE_P(_T(MSG_SD_CARD), _T(MSG_NORMAL), lcd_toshiba_flash_air_compatibility_toggle);\
 }\
 }\
 while (0)
 while (0)
 #endif // SDCARD_SORT_ALPHA
 #endif // SDCARD_SORT_ALPHA

+ 13 - 10
lang/lang_en.txt

@@ -649,11 +649,11 @@
 #MSG_WIZARD_RERUN c=20 r=7
 #MSG_WIZARD_RERUN c=20 r=7
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1
-"SD card  [normal]"
+#MSG_SD_CARD
+"SD card"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1
-"SD card [flshAir]"
+#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY
+"FlashAir"
 
 
 #
 #
 "Right"
 "Right"
@@ -703,17 +703,20 @@
 #MSG_FILE_CNT c=20 r=4
 #MSG_FILE_CNT c=20 r=4
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 
 
-#MSG_SORT_NONE c=17 r=1
-"Sort       [none]"
+#MSG_SORT
+"Sort"
 
 
-#MSG_SORT_TIME c=17 r=1
-"Sort       [time]"
+#MSG_NONE
+"None"
+
+#MSG_SORT_TIME
+"Time"
 
 
 #
 #
 "Severe skew"
 "Severe skew"
 
 
-#MSG_SORT_ALPHA c=17 r=1
-"Sort   [alphabet]"
+#MSG_SORT_ALPHA
+"Alphabet"
 
 
 #MSG_SORTING c=20 r=1
 #MSG_SORTING c=20 r=1
 "Sorting files"
 "Sorting files"

+ 18 - 14
lang/lang_en_cz.txt

@@ -866,13 +866,13 @@
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Spusteni Pruvodce vymaze ulozene vysledky vsech kalibraci a spusti kalibracni proces od zacatku. Pokracovat?"
 "Spusteni Pruvodce vymaze ulozene vysledky vsech kalibraci a spusti kalibracni proces od zacatku. Pokracovat?"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1
-"SD card  [normal]"
+#MSG_SD_CARD
+"SD card"
 "\x00"
 "\x00"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1
-"SD card [flshAir]"
-"SD card [FlshAir]"
+#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY
+"FlashAir"
+"\x00"
 
 
 #
 #
 "Right"
 "Right"
@@ -938,21 +938,25 @@
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Nektere soubory nebudou setrideny. Maximalni pocet souboru ve slozce pro setrideni je 100."
 "Nektere soubory nebudou setrideny. Maximalni pocet souboru ve slozce pro setrideni je 100."
 
 
-#MSG_SORT_NONE c=17 r=1
-"Sort       [none]"
-"Trideni   [Zadne]"
+#MSG_SORT
+"Sort"
+"Trideni"
+
+#MSG_NONE
+"None"
+"Zadne"
 
 
-#MSG_SORT_TIME c=17 r=1
-"Sort       [time]"
-"Trideni     [cas]"
+#MSG_SORT_TIME
+"Time"
+"Cas"
 
 
 #
 #
 "Severe skew"
 "Severe skew"
 "Tezke zkoseni"
 "Tezke zkoseni"
 
 
-#MSG_SORT_ALPHA c=17 r=1
-"Sort   [alphabet]"
-"Trideni [Abeceda]"
+#MSG_SORT_ALPHA
+"Alphabet"
+"Abeceda"
 
 
 #MSG_SORTING c=20 r=1
 #MSG_SORTING c=20 r=1
 "Sorting files"
 "Sorting files"

+ 19 - 15
lang/lang_en_de.txt

@@ -866,13 +866,13 @@
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Der Assistent wird die aktuellen Kalibrierungsdaten loeschen und von vorne beginnen. Weiterfahren?"
 "Der Assistent wird die aktuellen Kalibrierungsdaten loeschen und von vorne beginnen. Weiterfahren?"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1
-"SD card  [normal]"
-"SD Karte [normal]"
+#MSG_SD_CARD
+"SD card"
+"SD Karte"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1
-"SD card [flshAir]"
-"SD Karte[flshAir]"
+#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY
+"FlashAir"
+"\x00"
 
 
 #
 #
 "Right"
 "Right"
@@ -938,21 +938,25 @@
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Einige Dateien wur- den nicht sortiert. Max. Dateien pro Verzeichnis = 100."
 "Einige Dateien wur- den nicht sortiert. Max. Dateien pro Verzeichnis = 100."
 
 
-#MSG_SORT_NONE c=17 r=1
-"Sort       [none]"
-"Sort.     [Keine]"
+#MSG_SORT
+"Sort"
+"Sort."
+
+#MSG_NONE
+"None"
+"Keine"
 
 
-#MSG_SORT_TIME c=17 r=1
-"Sort       [time]"
-"Sort.      [Zeit]"
+#MSG_SORT_TIME
+"Time"
+"Zeit"
 
 
 #
 #
 "Severe skew"
 "Severe skew"
 "Schwerer Schraeglauf"
 "Schwerer Schraeglauf"
 
 
-#MSG_SORT_ALPHA c=17 r=1
-"Sort   [alphabet]"
-"Sort.  [Alphabet]"
+#MSG_SORT_ALPHA
+"Alphabet"
+"\x00"
 
 
 #MSG_SORTING c=20 r=1
 #MSG_SORTING c=20 r=1
 "Sorting files"
 "Sorting files"

+ 19 - 15
lang/lang_en_es.txt

@@ -866,13 +866,13 @@
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Ejecutar el Wizard borrara los valores de calibracion actuales y comenzara de nuevo. Continuar?"
 "Ejecutar el Wizard borrara los valores de calibracion actuales y comenzara de nuevo. Continuar?"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1
-"SD card  [normal]"
-"Tarj. SD [normal]"
+#MSG_SD_CARD
+"SD card"
+"Tarj. SD"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1
-"SD card [flshAir]"
-"Tarj. SD[FlshAir]"
+#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY
+"FlashAir"
+"\x00"
 
 
 #
 #
 "Right"
 "Right"
@@ -938,21 +938,25 @@
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Algunos archivos no se ordenaran. Maximo 100 archivos por carpeta para ordenar. "
 "Algunos archivos no se ordenaran. Maximo 100 archivos por carpeta para ordenar. "
 
 
-#MSG_SORT_NONE c=17 r=1
-"Sort       [none]"
-"Ordenar    [nada]"
+#MSG_SORT
+"Sort"
+"Ordenar"
+
+#MSG_NONE
+"None"
+"Nada"
 
 
-#MSG_SORT_TIME c=17 r=1
-"Sort       [time]"
-"Ordenar   [Fecha]"
+#MSG_SORT_TIME
+"Time"
+"Fecha"
 
 
 #
 #
 "Severe skew"
 "Severe skew"
 "Inclinacion severa"
 "Inclinacion severa"
 
 
-#MSG_SORT_ALPHA c=17 r=1
-"Sort   [alphabet]"
-"Ordenar [alfabet]"
+#MSG_SORT_ALPHA
+"Alphabet"
+"Alfabet"
 
 
 #MSG_SORTING c=20 r=1
 #MSG_SORTING c=20 r=1
 "Sorting files"
 "Sorting files"

+ 19 - 15
lang/lang_en_fr.txt

@@ -866,13 +866,13 @@
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Lancer l'Assistant supprimera les resultats actuels de calibration et commencera du debut. Continuer ?"
 "Lancer l'Assistant supprimera les resultats actuels de calibration et commencera du debut. Continuer ?"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1
-"SD card  [normal]"
-"Carte SD [normal]"
+#MSG_SD_CARD
+"SD card"
+"Carte SD"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1
-"SD card [flshAir]"
-"Carte SD [flashAir]"
+#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY
+"FlashAir"
+"\x00"
 
 
 #
 #
 "Right"
 "Right"
@@ -938,21 +938,25 @@
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Certains fichiers ne seront pas tries. Max 100 fichiers tries par dossier."
 "Certains fichiers ne seront pas tries. Max 100 fichiers tries par dossier."
 
 
-#MSG_SORT_NONE c=17 r=1
-"Sort       [none]"
-"Tri :     [aucun]"
+#MSG_SORT
+"Sort"
+"Tri"
+
+#MSG_NONE
+"None"
+"Aucun"
 
 
-#MSG_SORT_TIME c=17 r=1
-"Sort       [time]"
-"Tri       [heure]"
+#MSG_SORT_TIME
+"Time"
+"Heure"
 
 
 #
 #
 "Severe skew"
 "Severe skew"
 "Deviation severe"
 "Deviation severe"
 
 
-#MSG_SORT_ALPHA c=17 r=1
-"Sort   [alphabet]"
-"Tri    [alphabet]"
+#MSG_SORT_ALPHA
+"Alphabet"
+"\x00"
 
 
 #MSG_SORTING c=20 r=1
 #MSG_SORTING c=20 r=1
 "Sorting files"
 "Sorting files"

+ 19 - 15
lang/lang_en_it.txt

@@ -866,13 +866,13 @@
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Se avvi il Wizard perderai la calibrazione preesistente e dovrai ricominciare dall'inizio. Continuare?"
 "Se avvi il Wizard perderai la calibrazione preesistente e dovrai ricominciare dall'inizio. Continuare?"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1
-"SD card  [normal]"
-"Mem. SD [normale]"
+#MSG_SD_CARD
+"SD card"
+"Mem. SD"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1
-"SD card [flshAir]"
-"Mem. SD [flshAir]"
+#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY
+"FlashAir"
+"\x00"
 
 
 #
 #
 "Right"
 "Right"
@@ -938,21 +938,25 @@
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Alcuni file non saranno ordinati. Il numero massimo di file in una cartella e 100 perche siano ordinati."
 "Alcuni file non saranno ordinati. Il numero massimo di file in una cartella e 100 perche siano ordinati."
 
 
-#MSG_SORT_NONE c=17 r=1
-"Sort       [none]"
-"Ordina     [none]"
+#MSG_SORT
+"Sort"
+"Ordina"
+
+#MSG_NONE
+"None"
+"\x00"
 
 
-#MSG_SORT_TIME c=17 r=1
-"Sort       [time]"
-"Ordina     [time]"
+#MSG_SORT_TIME
+"Time"
+"\x00"
 
 
 #
 #
 "Severe skew"
 "Severe skew"
 "Disassamento grave"
 "Disassamento grave"
 
 
-#MSG_SORT_ALPHA c=17 r=1
-"Sort   [alphabet]"
-"Ordine  [alfabet]"
+#MSG_SORT_ALPHA
+"Alphabet"
+"Alfabet"
 
 
 #MSG_SORTING c=20 r=1
 #MSG_SORTING c=20 r=1
 "Sorting files"
 "Sorting files"

+ 19 - 15
lang/lang_en_pl.txt

@@ -866,13 +866,13 @@
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Running Wizard will delete current calibration results and start from the beginning. Continue?"
 "Wlaczenie Asystenta usunie obecne dane kalibracyjne i zacznie od poczatku. Kontynuowac?"
 "Wlaczenie Asystenta usunie obecne dane kalibracyjne i zacznie od poczatku. Kontynuowac?"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF c=19 r=1
-"SD card  [normal]"
-"Karta SD [normal]"
+#MSG_SD_CARD
+"SD card"
+"Karta SD"
 
 
-#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON c=19 r=1
-"SD card [flshAir]"
-"Karta SD[FlshAir]"
+#MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY
+"FlashAir"
+"\x00"
 
 
 #
 #
 "Right"
 "Right"
@@ -938,21 +938,25 @@
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
 "Niektore pliki nie zostana posortowane. Max. liczba plikow w 1 folderze = 100."
 "Niektore pliki nie zostana posortowane. Max. liczba plikow w 1 folderze = 100."
 
 
-#MSG_SORT_NONE c=17 r=1
-"Sort       [none]"
-"Sortuj     [brak]"
+#MSG_SORT
+"Sort"
+"Sortuj"
+
+#MSG_NONE
+"None"
+"Brak"
 
 
-#MSG_SORT_TIME c=17 r=1
-"Sort       [time]"
-"Sortuj     [czas]"
+#MSG_SORT_TIME
+"Time"
+"Czas"
 
 
 #
 #
 "Severe skew"
 "Severe skew"
 "Znaczny skos"
 "Znaczny skos"
 
 
-#MSG_SORT_ALPHA c=17 r=1
-"Sort   [alphabet]"
-"Sortuj  [alfabet]"
+#MSG_SORT_ALPHA
+"Alphabet"
+"Alfabet"
 
 
 #MSG_SORTING c=20 r=1
 #MSG_SORTING c=20 r=1
 "Sorting files"
 "Sorting files"