SD file updates

This commit is contained in:
Scott Lahteine
2017-09-06 06:28:32 -05:00
parent 82fff87e16
commit 614a86a380
15 changed files with 233 additions and 226 deletions

View File

@@ -20,17 +20,20 @@
*
*/
#include <ctype.h>
#include "cardreader.h"
#include "ultralcd.h"
#include "stepper.h"
#include "language.h"
#include "Marlin.h"
#include "../inc/MarlinConfig.h"
#if ENABLED(SDSUPPORT)
#include "cardreader.h"
#include "../Marlin.h"
#include "../lcd/ultralcd.h"
#include "../module/stepper.h"
#include "../module/printcounter.h"
#include "../core/language.h"
#include <ctype.h>
#define LONGEST_FILENAME (longFilename[0] ? longFilename : filename)
CardReader::CardReader() {
@@ -77,7 +80,7 @@ char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
* LS_GetFilename - Get the filename of the file indexed by nrFile_index
* LS_SerialPrint - Print the full path and size of each file to serial output
*/
uint16_t nrFile_index;
void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
@@ -864,12 +867,15 @@ void CardReader::updir() {
#endif // SDCARD_SORT_ALPHA
#if (ENABLED(SDCARD_SORT_ALPHA) && SDSORT_USES_RAM && SDSORT_CACHE_NAMES)
// if true - don't need to access the SD card for file names
uint16_t CardReader::get_num_Files() {return nrFiles;}
#else
uint16_t CardReader::get_num_Files() {return getnrfilenames(); }
#endif
uint16_t CardReader::get_num_Files() {
return
#if ENABLED(SDCARD_SORT_ALPHA) && SDSORT_USES_RAM && SDSORT_CACHE_NAMES
nrFiles // no need to access the SD card for filenames
#else
getnrfilenames()
#endif
;
}
void CardReader::printingHasFinished() {
stepper.synchronize();