From 5ad1d19384ba3ea8a1e6c33babc63de1d28acf31 Mon Sep 17 00:00:00 2001 From: Bernhard Kubicek Date: Sat, 19 Nov 2011 20:18:54 +0100 Subject: [PATCH] make it compile without sd_support --- Marlin/cardreader.h | 14 +++++++------- Marlin/cardreader.pde | 6 +----- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Marlin/cardreader.h b/Marlin/cardreader.h index d96715807f..653f59452e 100644 --- a/Marlin/cardreader.h +++ b/Marlin/cardreader.h @@ -20,17 +20,15 @@ public: void closefile(); void release(); void startFileprint(); - //void startFilewrite(char *name); void pauseSDPrint(); void getStatus(); - void cd(char * absolutPath); - //void selectFile(char* name); + void getfilename(const uint8_t nr); uint16_t getnrfilenames(); void ls(); - void lsDive(char *prepend,SdFile parent); + inline bool eof() { return sdpos>=filesize ;}; inline int16_t get() { sdpos = file.curPosition();return (int16_t)file.read();}; @@ -57,10 +55,13 @@ private: LsAction lsAction; //stored for recursion. int16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory. char* diveDirName; + void lsDive(char *prepend,SdFile parent); }; #else + +#define dir_t bool class CardReader { public: @@ -71,6 +72,7 @@ public: inline static void checkautostart(bool x) {}; + inline static void openFile(char* name,bool read){}; inline static void closefile() {}; inline static void release(){}; inline static void startFileprint(){}; @@ -87,9 +89,7 @@ public: inline static bool eof() {return true;}; inline static char get() {return 0;}; inline static void setIndex(){}; + inline uint8_t percentDone(){return 0;}; }; #endif //SDSUPPORT - - - #endif \ No newline at end of file diff --git a/Marlin/cardreader.pde b/Marlin/cardreader.pde index 2771668a46..bab87834ec 100644 --- a/Marlin/cardreader.pde +++ b/Marlin/cardreader.pde @@ -1,5 +1,5 @@ -#ifdef SDSUPPORT #include "cardreader.h" +#ifdef SDSUPPORT CardReader::CardReader() { @@ -378,9 +378,5 @@ uint16_t CardReader::getnrfilenames() return nrFiles; } -void CardReader::cd(char * absolutPath) -{ - -} #endif //SDSUPPORT \ No newline at end of file