From 6599adc184b9561777159397c0f477549070ccba Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 6 Dec 2014 03:40:39 -0800 Subject: [PATCH] Polish up a little... --- Marlin/Configuration_adv.h | 2 +- Marlin/cardreader.h | 11 +++++++---- .../example_configurations/SCARA/Configuration_adv.h | 1 + .../example_configurations/delta/Configuration_adv.h | 1 + .../makibox/Configuration_adv.h | 1 + 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 219bebf23..b916d9297 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -292,7 +292,7 @@ #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. -#define SDCARD_SORT_ALPHA // Sort in ASCII order by pre-reading the folder and making a lookup table! +#define SDCARD_SORT_ALPHA // Sort SD file listings in ASCII order. Find additional options in cardreader.h #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. // using: diff --git a/Marlin/cardreader.h b/Marlin/cardreader.h index fd8635a5b..f3af6da5b 100644 --- a/Marlin/cardreader.h +++ b/Marlin/cardreader.h @@ -4,10 +4,13 @@ #ifdef SDSUPPORT #define MAX_DIR_DEPTH 10 // Maximum folder depth -#define SORT_USES_RAM false // Buffer while sorting, else re-read from SD -#define SORT_USES_MORE_RAM false // Always keep the directory in RAM -#define SORT_LIMIT 64 // Maximum number of sorted items -#define FOLDER_SORTING -1 // -1=above 0=none 1=below + +#ifdef SDCARD_SORT_ALPHA + #define SORT_USES_RAM false // Buffer while sorting, else re-read from SD + #define SORT_USES_MORE_RAM false // Always keep the directory in RAM + #define SORT_LIMIT 256 // Maximum number of sorted items + #define FOLDER_SORTING -1 // -1=above 0=none 1=below +#endif #include "SdFile.h" enum LsAction {LS_SerialPrint,LS_Count,LS_GetFilename}; diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 7a01bccb6..199809200 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -295,6 +295,7 @@ #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. +#define SDCARD_SORT_ALPHA // Sort SD file listings in ASCII order. Find additional options in cardreader.h #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. // using: diff --git a/Marlin/example_configurations/delta/Configuration_adv.h b/Marlin/example_configurations/delta/Configuration_adv.h index ee42481be..3c2eecacf 100644 --- a/Marlin/example_configurations/delta/Configuration_adv.h +++ b/Marlin/example_configurations/delta/Configuration_adv.h @@ -287,6 +287,7 @@ #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. +#define SDCARD_SORT_ALPHA // Sort SD file listings in ASCII order. Find additional options in cardreader.h #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the filesystem block order. // if a file is deleted, it frees a block. hence, the order is not purely cronological. To still have auto0.g accessible, there is again the option to do that. // using: diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 7883c7999..7151459d0 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -291,6 +291,7 @@ #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. +#define SDCARD_SORT_ALPHA // Sort SD file listings in ASCII order. Find additional options in cardreader.h #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. // using: