From 1f5ae02390678ec2b7bfa7b2d234d299d6a3c34a Mon Sep 17 00:00:00 2001 From: eadmaster <925171+eadmaster@users.noreply.github.com> Date: Fri, 26 Jul 2024 01:47:57 +0200 Subject: [PATCH] added optional file extension filter in the filepicker --- src/core/sd_functions.cpp | 10 +++++----- src/core/sd_functions.h | 4 ++-- src/modules/others/TV-B-Gone.cpp | 3 +-- src/modules/rf/rf.cpp | 3 +-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/core/sd_functions.cpp b/src/core/sd_functions.cpp index 67e53d8f..d4aa796c 100644 --- a/src/core/sd_functions.cpp +++ b/src/core/sd_functions.cpp @@ -302,7 +302,7 @@ void sortList(String fileList[][3], int fileListCount) { ** Function name: sortList ** Description: sort files for name ***************************************************************************************/ -void readFs(FS fs, String folder, String result[][3]) { +void readFs(FS fs, String folder, String result[][3], String allowed_ext) { int allFilesCount = 0; while(allFilesCountopen(filepath, FILE_READ); drawMainBorder(); pinMode(IrTx, OUTPUT); diff --git a/src/modules/rf/rf.cpp b/src/modules/rf/rf.cpp index caa3c345..f9e7b328 100644 --- a/src/modules/rf/rf.cpp +++ b/src/modules/rf/rf.cpp @@ -393,8 +393,7 @@ void otherRFcodes() { // no need to proceed, go back } - //filepath = loopSD(*fs, true, "SUB"); - filepath = loopSD(*fs, true); + filepath = loopSD(*fs, true, "SUB"); databaseFile = fs->open(filepath, FILE_READ); drawMainBorder();