SensESP
3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
filesystem.cpp
Go to the documentation of this file.
1
#include "
sensesp.h
"
2
3
#include "
filesystem.h
"
4
5
#include "SPIFFS.h"
6
7
namespace
sensesp
{
8
9
Filesystem::Filesystem
() :
Resettable
(-100) {
10
if
(!SPIFFS.begin(
true
)) {
11
ESP_LOGE(__FILENAME__,
"FATAL: Filesystem initialization failed."
);
12
ESP.restart();
13
}
14
ESP_LOGI(__FILENAME__,
"Filesystem initialized"
);
15
}
16
17
Filesystem::~Filesystem
() {
18
SPIFFS.end();
19
}
20
21
void
Filesystem::reset
() {
22
ESP_LOGI(__FILENAME__,
"Formatting filesystem"
);
23
SPIFFS.format();
24
}
25
26
}
// namespace sensesp
sensesp::Filesystem::~Filesystem
~Filesystem()
Definition
filesystem.cpp:17
sensesp::Filesystem::Filesystem
Filesystem()
Definition
filesystem.cpp:9
sensesp::Filesystem::reset
virtual void reset() override
Definition
filesystem.cpp:21
sensesp::Resettable
Automatic calling of the reset() method when the device needs to be reset.
Definition
resettable.h:20
filesystem.h
sensesp
Definition
sensesp.cpp:7
sensesp.h
src
sensesp
system
filesystem.cpp
Generated by
1.12.0