create database when it does not exist
This commit is contained in:
parent
b176a7ac1b
commit
64c6bd683a
@ -49,7 +49,7 @@ bool WebApiDatabaseClass::write(float energy)
|
|||||||
d.tm_mday = timeinfo.tm_mday;
|
d.tm_mday = timeinfo.tm_mday;
|
||||||
d.energy = old_energy = energy;
|
d.energy = old_energy = energy;
|
||||||
|
|
||||||
File f = LittleFS.open(DATABASE_FILENAME, "a");
|
File f = LittleFS.open(DATABASE_FILENAME, "a", true);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user