Take anycubic's approach to implement power outage support. SD card wearing can be prevented by disabling it via POWER_OUTAGE_TEST flag.

This commit is contained in:
Knutwurst
2020-06-11 15:36:23 +02:00
parent a52dc3c7e9
commit d090049594
7 changed files with 134 additions and 32 deletions

View File

@@ -153,6 +153,7 @@ public:
static inline int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); }
static inline int16_t read(void* buf, uint16_t nbyte) { return file.isOpen() ? file.read(buf, nbyte) : -1; }
static inline int16_t write(void* buf, uint16_t nbyte) { return file.isOpen() ? file.write(buf, nbyte) : -1; }
static inline long GetLastSDpos() { return sdpos; };
static Sd2Card& getSd2Card() { return sd2card; }