Skip to content

Commit bb70da0

Browse files
committed
Fix slideshow examples
1 parent 5cdc4a3 commit bb70da0

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.pio
2+
.vscode/.browse.c_cpp.db*
3+
.vscode/c_cpp_properties.json
4+
.vscode/launch.json
5+
.vscode/ipch

Examples/Projects/Slideshow/1-Slideshow.ino

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
// https://github.com/TheNitek/XPT2046_Bitbang_Arduino_Library
2424

2525
#include <SPI.h>
26-
2726
#include <SdFat.h>
2827
// A library for accessing SD cards
2928
//
@@ -82,7 +81,7 @@ int JPEGDraw(JPEGDRAW *pDraw) {
8281

8382
void * myOpen(const char *filename, int32_t *size) {
8483
jpgFile = sd.open(filename);
85-
*size = jpgFile.size();
84+
*size = jpgFile.fileSize();
8685
return &jpgFile;
8786
}
8887
void myClose(void *handle) {
@@ -94,7 +93,7 @@ int32_t myRead(JPEGFILE *handle, uint8_t *buffer, int32_t length) {
9493
}
9594
int32_t mySeek(JPEGFILE *handle, int32_t position) {
9695
if (!jpgFile) return 0;
97-
return jpgFile.seek(position);
96+
return jpgFile.seekSet(position);
9897
}
9998

10099
void decodeJpeg(const char *name) {

Examples/Projects/Slideshow/platformio.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ platform = espressif32
77
board = esp32dev
88
framework = arduino
99
lib_deps =
10-
bodmer/TFT_eSPI@^2.5.33
11-
bitbank2/JPEGDEC@^1.2.8
12-
greiman/SdFat@^2.2.2
10+
bodmer/TFT_eSPI@^2.5.43
11+
bitbank2/JPEGDEC@^1.7.0
12+
greiman/SdFat@^2.3.0
1313
nitek/XPT2046_Bitbang_Slim@^2.0.0
1414
monitor_speed = 115200
1515
monitor_filters = esp32_exception_decoder

0 commit comments

Comments
 (0)