Skip to content

Commit 29550d2

Browse files
committed
added flag to supress warnning messages
1 parent f9de9c6 commit 29550d2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/esp32FOTA.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,43 @@ extern "C" {
4545

4646
// inherit includes from sketch, detect SPIFFS first for legacy support
4747
#if __has_include(<SPIFFS.h>) || defined _SPIFFS_H_
48+
#if !defined(DISABLE_ALL_LIBRARY_WARNINGS)
4849
#pragma message "Using SPIFFS for certificate validation"
50+
#endif
4951
#include <SPIFFS.h>
5052
#define FOTA_FS &SPIFFS
5153
#elif __has_include(<LittleFS.h>) || defined _LiffleFS_H_
54+
#if !defined(DISABLE_ALL_LIBRARY_WARNINGS)
5255
#pragma message "Using LittleFS for certificate validation"
56+
#endif
5357
#include <LittleFS.h>
5458
#define FOTA_FS &LittleFS
5559
#elif __has_include(<SD.h>) || defined _SD_H_
60+
#if !defined(DISABLE_ALL_LIBRARY_WARNINGS)
5661
#pragma message "Using SD for certificate validation"
62+
#endif
5763
#include <SD.h>
5864
#define FOTA_FS &SD
5965
#elif __has_include(<SD_MMC.h>) || defined _SD_MMC_H_
66+
#if !defined(DISABLE_ALL_LIBRARY_WARNINGS)
6067
#pragma message "Using SD_MMC for certificate validation"
68+
#endif
6169
#include <SD_MMC.h>
6270
#define FOTA_FS &SD_MMC
6371
#elif defined _LIFFLEFS_H_ // older externally linked, hard to identify and unsupported versions of SPIFFS
72+
#if !defined(DISABLE_ALL_LIBRARY_WARNINGS)
6473
#pragma message "this version of LittleFS is unsupported, use #include <LittleFS.h> instead, if using platformio add LittleFS(esp32)@^2.0.0 to lib_deps"
74+
#endif
6575
#elif __has_include(<PSRamFS.h>) || defined _PSRAMFS_H_
76+
#if !defined(DISABLE_ALL_LIBRARY_WARNINGS)
6677
#pragma message "Using PSRamFS for certificate validation"
78+
#endif
6779
#include <PSRamFS.h>
6880
#define FOTA_FS &PSRamFS
6981
#else
82+
//#if !defined(DISABLE_ALL_LIBRARY_WARNINGS)
7083
// #pragma message "No filesystem provided, certificate validation will be unavailable (hint: include SD, SPIFFS or LittleFS before including this library)"
84+
//#endif
7185
#define FOTA_FS nullptr
7286
#endif
7387

0 commit comments

Comments
 (0)