diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..66e04f9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "extlibs/jReadWrite"] + path = extlibs/jReadWrite + url = https://github.com/userbogd/jReadWrite.git +[submodule "extlibs/libespfs"] + path = extlibs/libespfs + url = https://github.com/userbogd/libespfs.git diff --git a/CMakeLists.txt b/CMakeLists.txt index b8445e3..57d9e77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,16 @@ +include(${CMAKE_CURRENT_LIST_DIR}/extlibs/jReadWrite/include.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/extlibs/libespfs/cmake/include.cmake) + idf_component_register( + + SRCS ${jreadwrite_SRCS} + INCLUDE_DIRS ${jreadwrite_INCLUDE_DIRS} + + SRCS ${libespfs_SRCS} + INCLUDE_DIRS ${libespfs_INCLUDE_DIRS} + PRIV_INCLUDE_DIRS ${libespfs_PRIV_INCLUDE_DIRS} + PRIV_REQUIRES ${libespfs_PRIV_REQUIRES} + SRCS "src/SystemConfiguration.c" "src/romfs.c" "src/spifs.c" @@ -20,11 +32,12 @@ idf_component_register( INCLUDE_DIRS "." "include" "src" + "extlibs/jReadWrite" EMBED_FILES "upload_script.html" REQUIRES nvs_flash - libespfs + #libespfs spiffs esp_http_server mbedtls @@ -33,6 +46,6 @@ idf_component_register( esp_modem esp_https_ota app_update - jReadWrite + #jReadWrite ttn-esp32 ) \ No newline at end of file diff --git a/Kconfig b/Kconfig index 327f2d0..a8b1b06 100644 --- a/Kconfig +++ b/Kconfig @@ -692,5 +692,44 @@ menu "WebGUIApp" endmenu endif + + menu "libespfs" + + choice + prompt "Log level" + default ESPFS_LOG_LEVEL_WARNING + + config ESPFS_LOG_LEVEL_NONE + bool "None" + + config ESPFS_LOG_LEVEL_ERROR + bool "Error" + + config ESPFS_LOG_LEVEL_WARNING + bool "Warning" + + config ESPFS_LOG_LEVEL_INFO + bool "Info" + + config ESPFS_LOG_LEVEL_DEBUG + bool "Debug" + + config ESPFS_LOG_LEVEL_VERBOSE + bool "Verbose" + + endchoice # "Log level" + + config ESPFS_MAX_PARTITIONS + int "Maximum Number of Partitions" + default 1 + range 1 10 + help + Define maximum number of partitions that can be mounted. + + config ESPFS_USE_HEATSHRINK + bool "Use heatshrink decompressor" + default y + + endmenu endmenu \ No newline at end of file diff --git a/extlibs/jReadWrite b/extlibs/jReadWrite new file mode 160000 index 0000000..8bbe1c2 --- /dev/null +++ b/extlibs/jReadWrite @@ -0,0 +1 @@ +Subproject commit 8bbe1c28dc69b8adadc1ab3aed989a38e1dc8996 diff --git a/extlibs/libespfs b/extlibs/libespfs new file mode 160000 index 0000000..a646e3e --- /dev/null +++ b/extlibs/libespfs @@ -0,0 +1 @@ +Subproject commit a646e3ee0594ec2301e9b3fe6373ea274eb39e39 diff --git a/src/MQTTSysHandler.c b/src/MQTTSysHandler.c index 91d9ace..dd4776c 100644 --- a/src/MQTTSysHandler.c +++ b/src/MQTTSysHandler.c @@ -40,6 +40,7 @@ #include "romfs.h" #include "HTTPServer.h" + #define PANEL_MESSAGE_LENGTH 32 //base message length, mainly depended by radio requirements #define MAX_JSON_MESSAGE 256 //max size of mqtt message to publish #define MAX_FILE_PUBLISH 4096 //bufer for mqtt data publish