File tree 1 file changed +2
-11
lines changed
examples/Settings/MultiWiFi
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,7 @@ void SinricProWiFiSettings::printSettings() const {
46
46
}
47
47
48
48
void SinricProWiFiSettings::saveToFile () {
49
-
50
- #if defined(ESP8266)
51
- File file = fs.open (configFileName, " w" );
52
- #elif defined(ESP32)
53
- File file = fs.open (configFileName, FILE_WRITE);
54
- #endif
49
+ File file = fs.open (configFileName, " w" );
55
50
56
51
if (file) {
57
52
file.write (reinterpret_cast <const uint8_t *>(&wifiSettings), sizeof (wifiSettings));
@@ -60,11 +55,7 @@ void SinricProWiFiSettings::saveToFile() {
60
55
}
61
56
62
57
bool SinricProWiFiSettings::loadFromFile () {
63
- #if defined(ESP8266)
64
- File file = fs.open (configFileName, " r" );
65
- #elif defined(ESP32)
66
- File file = fs.open (configFileName, FILE_READ);
67
- #endif
58
+ File file = fs.open (configFileName, " r" );
68
59
69
60
if (file && file.size () == sizeof (wifiSettings)) {
70
61
file.read (reinterpret_cast <uint8_t *>(&wifiSettings), sizeof (wifiSettings));
You can’t perform that action at this time.
0 commit comments