made cardreader more selfsustained
This commit is contained in:
@ -18,26 +18,38 @@ public:
|
||||
void checkautostart(bool x);
|
||||
|
||||
void closefile();
|
||||
void release();
|
||||
void startFileprint();
|
||||
void startFilewrite(char *name);
|
||||
void pauseSDPrint();
|
||||
void getStatus();
|
||||
|
||||
void selectFile(char* name);
|
||||
void getfilename(const uint8_t nr);
|
||||
uint8_t getnrfilenames();
|
||||
|
||||
|
||||
inline void ls() {root.ls();};
|
||||
inline bool eof() { sdpos = file.curPosition();return sdpos>=filesize ;};
|
||||
inline char get() { int16_t n = file.read(); return (n!=-1)?(char)n:'\n';};
|
||||
inline void setIndex(long index) {sdpos = index;file.seekSet(index);};
|
||||
|
||||
public:
|
||||
bool savetosd;
|
||||
SdFile file;
|
||||
uint32_t filesize;
|
||||
uint32_t sdpos ;
|
||||
bool sdmode ;
|
||||
SdFile root;
|
||||
bool sdactive ;
|
||||
bool saving;
|
||||
bool sdprinting ;
|
||||
bool cardOK ;
|
||||
char filename[11];
|
||||
private:
|
||||
Sd2Card card;
|
||||
SdVolume volume;
|
||||
SdFile root;
|
||||
Sd2Card card;
|
||||
SdVolume volume;
|
||||
SdFile file;
|
||||
uint32_t filesize;
|
||||
//int16_t n;
|
||||
unsigned long autostart_atmillis;
|
||||
uint32_t sdpos ;
|
||||
|
||||
//int16_t n;
|
||||
unsigned long autostart_atmillis;
|
||||
|
||||
bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
|
||||
bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
|
||||
};
|
||||
|
||||
#endif //SDSUPPORT
|
||||
|
Reference in New Issue
Block a user