Browse Source

Fixed ".." label when leaving a subdirectory.
Made the hidden and system files invisible when browsing the SD card.

bubnikv 8 years ago
parent
commit
08bf6acf1b

+ 2 - 0
Firmware/cardreader.cpp

@@ -99,6 +99,8 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
       if (lf0 == '.' || lf0 == '_') continue;
 
       if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
+      // Ignore the files and directories with hidden or system attribute.
+      if ((p.attributes & (DIR_ATT_HIDDEN | DIR_ATT_SYSTEM)) != 0) continue;
       filenameIsDir=DIR_IS_SUBDIR(&p);
       
       

+ 5 - 5
Firmware/language_all.cpp

@@ -2215,11 +2215,11 @@ const char * const MSG_RECTRACT_LANG_TABLE[LANG_NUM] PROGMEM = {
 	MSG_RECTRACT_PL
 };
 
-const char MSG_REFRESH_EN[] PROGMEM = "Refresh";
-const char MSG_REFRESH_CZ[] PROGMEM = "Obnovit";
-const char MSG_REFRESH_IT[] PROGMEM = "Refresh";
-const char MSG_REFRESH_ES[] PROGMEM = "Refresh";
-const char MSG_REFRESH_PL[] PROGMEM = "Obnovit";
+const char MSG_REFRESH_EN[] PROGMEM = "\xF8" "Refresh";
+const char MSG_REFRESH_CZ[] PROGMEM = "\xF8" "Obnovit";
+const char MSG_REFRESH_IT[] PROGMEM = "\xF8" "Refresh";
+const char MSG_REFRESH_ES[] PROGMEM = "\xF8" "Refresh";
+const char MSG_REFRESH_PL[] PROGMEM = "\xF8" "Obnovit";
 const char * const MSG_REFRESH_LANG_TABLE[LANG_NUM] PROGMEM = {
 	MSG_REFRESH_EN,
 	MSG_REFRESH_CZ,

+ 1 - 1
Firmware/language_cz.h

@@ -95,7 +95,7 @@
 #define MSG_STORE_EPROM                     "Store memory"
 #define MSG_LOAD_EPROM                      "Ulozit pamet"
 #define MSG_RESTORE_FAILSAFE                "Obnovit vychozi"
-#define MSG_REFRESH                         "Obnovit"
+#define MSG_REFRESH                         "\xF8" "Obnovit"
 #define MSG_WATCH                           "Informace"
 #define MSG_PREPARE                         "Priprava"
 #define MSG_TUNE                            "Ladit"

+ 1 - 1
Firmware/language_en.h

@@ -95,7 +95,7 @@
 #define MSG_STORE_EPROM                     "Store memory"
 #define MSG_LOAD_EPROM                      "Load memory"
 #define MSG_RESTORE_FAILSAFE                "Restore failsafe"
-#define MSG_REFRESH                         "Refresh"
+#define MSG_REFRESH                         "\xF8" "Refresh"
 #define MSG_WATCH                           "Info screen"
 #define MSG_PREPARE                         "Prepare"
 #define MSG_TUNE                            "Tune"

+ 2 - 2
Firmware/language_es.h

@@ -217,7 +217,7 @@
 #define MSG_STORE_EPROM                     "Store memory"
 #define MSG_LOAD_EPROM                      "Load memory"
 #define MSG_RESTORE_FAILSAFE                "Restore failsafe"
-#define MSG_REFRESH                         "Refresh"
+#define MSG_REFRESH                         "\xF8" "Refresh"
 #define MSG_PREPARE                         "Prepare"
 #define MSG_CONTROL_RETRACT                 "Retract mm"
 #define MSG_CONTROL_RETRACT_SWAP            "Swap Re.mm"
@@ -273,4 +273,4 @@
 #define MSG_USB_PRINTING                    "Impresion de USB "
 
 #endif // LANGUAGE_EN_H
-
+

+ 1 - 1
Firmware/language_it.h

@@ -216,7 +216,7 @@
 #define MSG_STORE_EPROM                     "Store memory"
 #define MSG_LOAD_EPROM                      "Load memory"
 #define MSG_RESTORE_FAILSAFE                "Restore failsafe"
-#define MSG_REFRESH                         "Refresh"
+#define MSG_REFRESH                         "\xF8" "Refresh"
 #define MSG_PREPARE                         "Prepare"
 #define MSG_CONTROL_RETRACT                 "Retract mm"
 #define MSG_CONTROL_RETRACT_SWAP            "Swap Re.mm"

+ 34 - 34
Firmware/language_pl.h

@@ -228,7 +228,7 @@
 #define MSG_STORE_EPROM                     "Store memory"
 #define MSG_LOAD_EPROM                      "Ulozit pamet"
 #define MSG_RESTORE_FAILSAFE                "Obnovit vychozi"
-#define MSG_REFRESH                         "Obnovit"
+#define MSG_REFRESH                         "\xF8" "Obnovit"
 
  #define MSG_PREPARE                         "Priprava"
 
@@ -253,39 +253,39 @@
 
  #define MSG_RECTRACT                        "Rectract"
 
-#define MSG_HOMEYZ                          "Kalibruj Z"
-#define MSG_HOMEYZ_PROGRESS                 "Kalibruje Z"
-#define MSG_HOMEYZ_DONE                     "Kalibracja OK"
-
-#define MSG_SELFTEST_ERROR                  "Selftest error !"
-#define MSG_SELFTEST_PLEASECHECK            "Skontroluj :"   
-#define MSG_SELFTEST_NOTCONNECTED           "Nie podlaczono   "
-#define MSG_SELFTEST_HEATERTHERMISTOR       "Heater/Thermistor"
-#define MSG_SELFTEST_BEDHEATER              "Bed / Heater"
-#define MSG_SELFTEST_WIRINGERROR            "Blad polaczenia"
-#define MSG_SELFTEST_ENDSTOPS               "Endstops"
-#define MSG_SELFTEST_MOTOR                  "Silnik"
-#define MSG_SELFTEST_ENDSTOP                "Endstop"
-#define MSG_SELFTEST_ENDSTOP_NOTHIT         "Endstop not hit"
-#define MSG_SELFTEST_OK                     "Self test OK"
-
-#define MSG_STATS_TOTALFILAMENT             "Filament lacznie :"
-#define MSG_STATS_TOTALPRINTTIME            "Czas calkowity :"
-#define MSG_STATS_FILAMENTUSED              "Filament :  "
-#define MSG_STATS_PRINTTIME                 "Czas druku :  "
-
-#define MSG_SELFTEST_START                  "Self test start  "
-#define MSG_SELFTEST_CHECK_ENDSTOPS         "Kontrola endstops"
-#define MSG_SELFTEST_CHECK_HOTEND           "Kontrola hotend  " 
-#define MSG_SELFTEST_CHECK_X                "Kontrola X axis  "
-#define MSG_SELFTEST_CHECK_Y                "Kontrola Y axis  "
-#define MSG_SELFTEST_CHECK_Z                "Kontrola Z axis  "
-#define MSG_SELFTEST_CHECK_BED              "Kontrola bed     "
-#define MSG_SELFTEST_CHECK_ALLCORRECT       "Wszystko OK      "
-#define MSG_SELFTEST                        "Selftest         "
-#define MSG_SELFTEST_FAILED                 "Selftest nieudany"
-
-#define MSG_STATISTICS                      "Statystyka  "
+#define MSG_HOMEYZ                          "Kalibruj Z"
+#define MSG_HOMEYZ_PROGRESS                 "Kalibruje Z"
+#define MSG_HOMEYZ_DONE                     "Kalibracja OK"
+
+#define MSG_SELFTEST_ERROR                  "Selftest error !"
+#define MSG_SELFTEST_PLEASECHECK            "Skontroluj :"   
+#define MSG_SELFTEST_NOTCONNECTED           "Nie podlaczono   "
+#define MSG_SELFTEST_HEATERTHERMISTOR       "Heater/Thermistor"
+#define MSG_SELFTEST_BEDHEATER              "Bed / Heater"
+#define MSG_SELFTEST_WIRINGERROR            "Blad polaczenia"
+#define MSG_SELFTEST_ENDSTOPS               "Endstops"
+#define MSG_SELFTEST_MOTOR                  "Silnik"
+#define MSG_SELFTEST_ENDSTOP                "Endstop"
+#define MSG_SELFTEST_ENDSTOP_NOTHIT         "Endstop not hit"
+#define MSG_SELFTEST_OK                     "Self test OK"
+
+#define MSG_STATS_TOTALFILAMENT             "Filament lacznie :"
+#define MSG_STATS_TOTALPRINTTIME            "Czas calkowity :"
+#define MSG_STATS_FILAMENTUSED              "Filament :  "
+#define MSG_STATS_PRINTTIME                 "Czas druku :  "
+
+#define MSG_SELFTEST_START                  "Self test start  "
+#define MSG_SELFTEST_CHECK_ENDSTOPS         "Kontrola endstops"
+#define MSG_SELFTEST_CHECK_HOTEND           "Kontrola hotend  " 
+#define MSG_SELFTEST_CHECK_X                "Kontrola X axis  "
+#define MSG_SELFTEST_CHECK_Y                "Kontrola Y axis  "
+#define MSG_SELFTEST_CHECK_Z                "Kontrola Z axis  "
+#define MSG_SELFTEST_CHECK_BED              "Kontrola bed     "
+#define MSG_SELFTEST_CHECK_ALLCORRECT       "Wszystko OK      "
+#define MSG_SELFTEST                        "Selftest         "
+#define MSG_SELFTEST_FAILED                 "Selftest nieudany"
+
+#define MSG_STATISTICS                      "Statystyka  "
 #define MSG_USB_PRINTING                    "Druk z USB  "
 
 

+ 2 - 2
Firmware/ultralcd.cpp

@@ -2036,10 +2036,10 @@ void lcd_sdcard_menu()
   if (card.filename[0] == '/')
   {
 #if SDCARDDETECT == -1
-    MENU_ITEM(function, LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh);
+    MENU_ITEM(function, MSG_REFRESH, lcd_sd_refresh);
 #endif
   } else {
-    MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir);
+    MENU_ITEM(function, PSTR(LCD_STR_FOLDER ".."), lcd_sd_updir);
   }
 
   for (uint16_t i = 0; i < fileCnt; i++)