Skip to content

Commit aa333a2

Browse files
update all packages, update usage
1 parent 6870659 commit aa333a2

File tree

3 files changed

+51
-47
lines changed

3 files changed

+51
-47
lines changed

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"recommendations": [
55
"ms-vscode.cpptools",
66
"platformio.platformio-ide"
7+
],
8+
"unwantedRecommendations": [
9+
"ms-vscode.cpptools-extension-pack"
710
]
811
}

platformio.ini

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
; PlatformIO Project Configuration File
2-
;
3-
; Build options: build flags, source filter
4-
; Upload options: custom upload port, speed and extra flags
5-
; Library options: dependencies, extra library storages
6-
; Advanced options: extra scripting
7-
;
8-
; Please visit documentation for the other options and examples
9-
; https://docs.platformio.org/page/projectconf.html
10-
11-
[env:esp32doit-devkit-v1]
12-
platform = espressif32
13-
framework = arduino
14-
board = esp32doit-devkit-v1
15-
board_build.filesystem = littlefs
16-
board_build.partitions = no_ota.csv
17-
18-
build_flags = -Wall
19-
20-
upload_speed = 921600
21-
22-
monitor_speed = 115200
23-
monitor_filters =
24-
esp32_exception_decoder
25-
;log2file
26-
time
27-
28-
lib_deps =
29-
lorol/LittleFS_esp32@^1.0.6 ; included in newest arduino core, eventually deprecated
30-
adafruit/Adafruit BusIO@^1.9.9
31-
adafruit/Adafruit GFX Library@^1.10.12
32-
mrfaptastic/ESP32 HUB75 LED MATRIX PANEL DMA Display@^2.0.6
33-
SPI
34-
Wire
35-
fastled/FastLED@^3.4.0
36-
https://github.com/tzapu/WiFiManager
37-
https://github.com/marian-craciunescu/ESP32Ping@^1.6
38-
me-no-dev/ESP Async WebServer@^1.2.3
39-
ArduinoJson@^6.18.5
40-
nickgammon/Regexp@^0.1.0
41-
;witnessmenow/UniversalTelegramBot@^1.3.0
42-
;powerbroker2/SafeString@^4.1.13
1+
; PlatformIO Project Configuration File
2+
;
3+
; Build options: build flags, source filter
4+
; Upload options: custom upload port, speed and extra flags
5+
; Library options: dependencies, extra library storages
6+
; Advanced options: extra scripting
7+
;
8+
; Please visit documentation for the other options and examples
9+
; https://docs.platformio.org/page/projectconf.html
10+
11+
[env:esp32doit-devkit-v1]
12+
platform = espressif32 @ 6.4.0
13+
framework = arduino
14+
board = esp32doit-devkit-v1
15+
board_build.filesystem = littlefs
16+
board_build.partitions = no_ota.csv
17+
18+
build_flags = -Wall
19+
20+
upload_speed = 921600
21+
22+
monitor_speed = 115200
23+
monitor_filters =
24+
esp32_exception_decoder
25+
;log2file
26+
time
27+
28+
lib_deps =
29+
; lorol/LittleFS_esp32@^1.0.6 ; included in newest arduino core, eventually deprecated
30+
adafruit/Adafruit BusIO@^1.14.5
31+
adafruit/Adafruit GFX Library@^1.11.9
32+
mrfaptastic/ESP32 HUB75 LED MATRIX PANEL DMA Display@^3.0.9
33+
SPI
34+
Wire
35+
fastled/FastLED@^3.6.0
36+
https://github.com/tzapu/WiFiManager
37+
https://github.com/marian-craciunescu/ESP32Ping@^1.6
38+
https://github.com/me-no-dev/ESPAsyncWebServer
39+
ArduinoJson@^6.21.3
40+
nickgammon/Regexp@^0.1.0
41+
;witnessmenow/UniversalTelegramBot@^1.3.0
42+
;powerbroker2/SafeString@^4.1.13

src/shared/fileServer.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#include <Arduino.h>
4-
#include <LITTLEFS.h>
4+
#include <LittleFS.h> // https://github.com/espressif/arduino-esp32/blob/master/libraries/LittleFS/examples/LITTLEFS_test/LITTLEFS_test.ino
55

66
#include "serialWrapper.h"
77

@@ -12,7 +12,8 @@ const bool fileExists(String path);
1212
const File getFile(String path);
1313

1414
void setup() {
15-
if (!LITTLEFS.begin()) logWarning(F("An Error has occurred while mounting LittleFS."));
15+
if (!LittleFS.begin(true))
16+
logWarning(F("An Error has occurred while mounting LittleFS."));
1617
}
1718

1819
// map file name to content type
@@ -33,16 +34,16 @@ const String getContentType(String filename) {
3334
// includes a check for a .gz variant
3435
const bool fileExists(String path) {
3536
String pathWithGz = path + ".gz";
36-
return (LITTLEFS.exists(pathWithGz) || LITTLEFS.exists(path));
37+
return (LittleFS.exists(pathWithGz) || LittleFS.exists(path));
3738
}
3839

3940
// get the original file or a .gz variant
4041
const File getFile(String path) {
4142
String pathWithGz = path + ".gz";
42-
if (LITTLEFS.exists(pathWithGz)) path += ".gz";
43+
if (LittleFS.exists(pathWithGz)) path += ".gz";
4344
print(F("Getting file from path: "));
4445
printlnRaw(path);
45-
return LITTLEFS.open(path, "r");
46+
return LittleFS.open(path, "r");
4647
}
4748

4849
} // namespace FileServer

0 commit comments

Comments
 (0)