mirror of
https://github.com/okalachev/flix.git
synced 2026-08-16 00:38:56 +00:00
Fix prefs.h
This commit is contained in:
+2
-5
@@ -11,7 +11,7 @@ public:
|
|||||||
Preferences() = default;
|
Preferences() = default;
|
||||||
~Preferences() = default;
|
~Preferences() = default;
|
||||||
|
|
||||||
bool begin(const char *name, bool readOnly = false, const char *partition_label = NULL) {
|
bool begin(const char *name, bool readOnly = false, const char *partition_label = nullptr) {
|
||||||
(void)name;
|
(void)name;
|
||||||
(void)readOnly;
|
(void)readOnly;
|
||||||
(void)partition_label;
|
(void)partition_label;
|
||||||
@@ -128,9 +128,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int availableStorageSize() {
|
int availableStorageSize() {
|
||||||
int n = STORAGE_SIZE;
|
return STORAGE_SIZE;
|
||||||
if (EEPROM.length() > 0 && EEPROM.length() < n) n = EEPROM.length();
|
|
||||||
return n;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool save() {
|
bool save() {
|
||||||
@@ -187,7 +185,6 @@ private:
|
|||||||
for (int i = 0; i < storageSize; i++) {
|
for (int i = 0; i < storageSize; i++) {
|
||||||
EEPROM.write(i, buffer[i]);
|
EEPROM.write(i, buffer[i]);
|
||||||
}
|
}
|
||||||
EEPROM.commit();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user