diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c1c4323 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "components/littlefs"] + path = components/littlefs + url = https://github.com/littlefs-project/littlefs.git +[submodule "components/esp_littlefs"] + path = components/esp_littlefs + url = https://github.com/joltwallet/esp_littlefs.git diff --git a/.vscode/settings.json b/.vscode/settings.json index 826b555..10b3089 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,12 @@ "esp_log.h": "c", "esp_wifi.h": "c", "esp_lvgl_port.h": "c", - "mqtt.h": "c" + "mqtt.h": "c", + "stdio.h": "c", + "locale.h": "c", + "obtain_time.h": "c", + "i2c.h": "c", + "lv_global.h": "c", + "cstdint": "c" } } \ No newline at end of file diff --git a/components/esp_littlefs b/components/esp_littlefs new file mode 160000 index 0000000..28639dd --- /dev/null +++ b/components/esp_littlefs @@ -0,0 +1 @@ +Subproject commit 28639dd469af0b33df55d481da8383347e88067e diff --git a/components/image_downloader/CMakeLists.txt b/components/image_downloader/CMakeLists.txt index c89003a..e4bf1a5 100644 --- a/components/image_downloader/CMakeLists.txt +++ b/components/image_downloader/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRCS "image_downloader.c" INCLUDE_DIRS "include" - REQUIRES json esp_http_client esp-tls esp_timer fatfs sdmmc vfs) + REQUIRES json esp_http_client esp-tls esp_timer ) diff --git a/components/image_downloader/image_downloader.c b/components/image_downloader/image_downloader.c index 7b23616..5b6b8f2 100644 --- a/components/image_downloader/image_downloader.c +++ b/components/image_downloader/image_downloader.c @@ -52,7 +52,7 @@ static const char *TAG = "ImgDwn"; #define IMGDWN_WIDTH 600 #define IMGDWN_HEIGHT 460 #define IMGDWN_URL2 ("http://vps-edf71efa.vps.ovh.net:3000/render/d-solo/7BtRMrv4k/temperatures?orgId=1&var-emplacement=entree_ECS&var-emplacement=entree_reseauSol&panelId=4&width=650&height=460&scale=1&tz=Europe%2FParis/") -#define IMGDWN_URL ("http://vps-edf71efa.vps.ovh.net:3000/render/d-solo/bOcPeysGz/hauteur-cuve?orgId=1&from=now-2d&refresh=1m&panelId=4&width=650&height=460&scale=1&tz=Europe%2FParis") +#define IMGDWN_URL ("http://vps-edf71efa.vps.ovh.net:3000/render/d-solo/bOcPeysGz/hauteur-cuve?orgId=1&from=now-2d&refresh=1m&panelId=4&width=300&height=200&scale=1&tz=Europe%2FParis") // 650 460 // As default is 512 without setting buffer_size property in esp_http_client_config_t #define HTTP_RECEIVE_BUFFER_SIZE 1938 diff --git a/components/littlefs b/components/littlefs new file mode 160000 index 0000000..d01280e --- /dev/null +++ b/components/littlefs @@ -0,0 +1 @@ +Subproject commit d01280e64934a09ba16cac60cf9d3a37e228bb66 diff --git a/components/meteofrance/meteofrance.c b/components/meteofrance/meteofrance.c index f870228..53dd0f6 100644 --- a/components/meteofrance/meteofrance.c +++ b/components/meteofrance/meteofrance.c @@ -385,7 +385,7 @@ void initialise_weather_data_retrieval(unsigned long retreival_period) // http_client_on_process_chunk(&http_client, process_chunk); // http_client_on_disconnected(&http_client, disconnected); TaskHandle_t xHandle = NULL; - BaseType_t ret1 = xTaskCreate(&http_request_task, "http_request_task", 8 * 1024, NULL, 5, &xHandle); + BaseType_t ret1 = xTaskCreate(&http_request_task, "http_request_task", 5 * 1024, NULL, 5, &xHandle); if(ret1!=pdPASS ){ ESP_LOGE(TAG, "Impossible de creer la tache %i", ret1); } diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 53f3361..348fe82 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,8 +1,14 @@ idf_component_register(SRC_DIRS . fonts INCLUDE_DIRS "." - REQUIRES heap esp_wifi nvs_flash mqtt meteofrance esp_netif image_downloader) -lvgl_port_create_c_image("images/p13bisj.png" "images/" "ARGB8888" "NONE") -#lvgl_port_create_c_image("images/esp_logo.png" "images/" "ARGB8888" "NONE") + REQUIRES heap esp_wifi nvs_flash mqtt meteofrance esp_netif image_downloader fatfs sdmmc vfs littlefs + PRIV_REQUIRES littlefs) + +lvgl_port_create_c_image("images/wifi_ok.png" "images/" "ARGB8888" "NONE") +lvgl_port_create_c_image("images/wifi_ko.png" "images/" "ARGB8888" "NONE") +lvgl_port_create_c_image("images/mqtt_ok.png" "images/" "AUTO" "NONE") +lvgl_port_create_c_image("images/mqtt_ko.png" "images/" "ARGB8888" "NONE") +# lvgl_port_create_c_image("images/p13bisj.png" "images/" "ARGB8888" "NONE") +# lvgl_port_create_c_image("images/esp_logo.png" "images/" "ARGB8888" "NONE") # lvgl_port_create_c_image("images/p10j.png" "images/" "ARGB8888" "NONE") # lvgl_port_create_c_image("images/p10n.png" "images/" "ARGB8888" "NONE") # lvgl_port_create_c_image("images/p11j.png" "images/" "ARGB8888" "NONE") @@ -74,6 +80,9 @@ lvgl_port_create_c_image("images/p13bisj.png" "images/" "ARGB8888" "NONE") lvgl_port_add_images(${COMPONENT_LIB} "images/") +littlefs_create_partition_image(littlefs images_meteo FLASH_IN_PROJECT) + + set_source_files_properties( PROPERTIES COMPILE_OPTIONS "-DLV_LVGL_H_INCLUDE_SIMPLE;-Wno-format;-DLV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(montserrat_medium_12) LV_FONT_DECLARE(montserrat_medium_18) LV_FONT_DECLARE(montserrat_medium_24)" diff --git a/main/idf_component.yml b/main/idf_component.yml index 9b7ef01..8343ec4 100644 --- a/main/idf_component.yml +++ b/main/idf_component.yml @@ -1,4 +1,5 @@ dependencies: + joltwallet/littlefs: ^1.14.8 esp_lcd_touch_gt911: version: ^1 esp_lvgl_port: diff --git a/main/images/mqtt_ko.png b/main/images/mqtt_ko.png new file mode 100644 index 0000000..b926476 Binary files /dev/null and b/main/images/mqtt_ko.png differ diff --git a/main/images/mqtt_ok.png b/main/images/mqtt_ok.png new file mode 100644 index 0000000..77ae13a Binary files /dev/null and b/main/images/mqtt_ok.png differ diff --git a/main/images/wifi_ko.png b/main/images/wifi_ko.png new file mode 100644 index 0000000..30fd494 Binary files /dev/null and b/main/images/wifi_ko.png differ diff --git a/main/images/wifi_ko_orig.png b/main/images/wifi_ko_orig.png new file mode 100644 index 0000000..6e513d5 Binary files /dev/null and b/main/images/wifi_ko_orig.png differ diff --git a/main/images/wifi_ok.png b/main/images/wifi_ok.png new file mode 100644 index 0000000..9205a9d Binary files /dev/null and b/main/images/wifi_ok.png differ diff --git a/main/images/wifi_ok_orig.png b/main/images/wifi_ok_orig.png new file mode 100644 index 0000000..44c56fe Binary files /dev/null and b/main/images/wifi_ok_orig.png differ diff --git a/main/images/p10j.png b/main/images_meteo/p10j.png similarity index 100% rename from main/images/p10j.png rename to main/images_meteo/p10j.png diff --git a/main/images/p10n.png b/main/images_meteo/p10n.png similarity index 100% rename from main/images/p10n.png rename to main/images_meteo/p10n.png diff --git a/main/images/p11j.png b/main/images_meteo/p11j.png similarity index 100% rename from main/images/p11j.png rename to main/images_meteo/p11j.png diff --git a/main/images/p11n.png b/main/images_meteo/p11n.png similarity index 100% rename from main/images/p11n.png rename to main/images_meteo/p11n.png diff --git a/main/images/p12bisj.png b/main/images_meteo/p12bisj.png similarity index 100% rename from main/images/p12bisj.png rename to main/images_meteo/p12bisj.png diff --git a/main/images/p12j.png b/main/images_meteo/p12j.png similarity index 100% rename from main/images/p12j.png rename to main/images_meteo/p12j.png diff --git a/main/images/p12n.png b/main/images_meteo/p12n.png similarity index 100% rename from main/images/p12n.png rename to main/images_meteo/p12n.png diff --git a/main/images/p13bisj.png b/main/images_meteo/p13bisj.png similarity index 100% rename from main/images/p13bisj.png rename to main/images_meteo/p13bisj.png diff --git a/main/images/p13j.png b/main/images_meteo/p13j.png similarity index 100% rename from main/images/p13j.png rename to main/images_meteo/p13j.png diff --git a/main/images/p13n.png b/main/images_meteo/p13n.png similarity index 100% rename from main/images/p13n.png rename to main/images_meteo/p13n.png diff --git a/main/images/p14bisj.png b/main/images_meteo/p14bisj.png similarity index 100% rename from main/images/p14bisj.png rename to main/images_meteo/p14bisj.png diff --git a/main/images/p14j.png b/main/images_meteo/p14j.png similarity index 100% rename from main/images/p14j.png rename to main/images_meteo/p14j.png diff --git a/main/images/p14n.png b/main/images_meteo/p14n.png similarity index 100% rename from main/images/p14n.png rename to main/images_meteo/p14n.png diff --git a/main/images/p15j.png b/main/images_meteo/p15j.png similarity index 100% rename from main/images/p15j.png rename to main/images_meteo/p15j.png diff --git a/main/images/p15n.png b/main/images_meteo/p15n.png similarity index 100% rename from main/images/p15n.png rename to main/images_meteo/p15n.png diff --git a/main/images/p16bisj.png b/main/images_meteo/p16bisj.png similarity index 100% rename from main/images/p16bisj.png rename to main/images_meteo/p16bisj.png diff --git a/main/images/p16j.png b/main/images_meteo/p16j.png similarity index 100% rename from main/images/p16j.png rename to main/images_meteo/p16j.png diff --git a/main/images/p16n.png b/main/images_meteo/p16n.png similarity index 100% rename from main/images/p16n.png rename to main/images_meteo/p16n.png diff --git a/main/images/p17j.png b/main/images_meteo/p17j.png similarity index 100% rename from main/images/p17j.png rename to main/images_meteo/p17j.png diff --git a/main/images/p17n.png b/main/images_meteo/p17n.png similarity index 100% rename from main/images/p17n.png rename to main/images_meteo/p17n.png diff --git a/main/images/p18j.png b/main/images_meteo/p18j.png similarity index 100% rename from main/images/p18j.png rename to main/images_meteo/p18j.png diff --git a/main/images/p18n.png b/main/images_meteo/p18n.png similarity index 100% rename from main/images/p18n.png rename to main/images_meteo/p18n.png diff --git a/main/images/p19j.png b/main/images_meteo/p19j.png similarity index 100% rename from main/images/p19j.png rename to main/images_meteo/p19j.png diff --git a/main/images/p19n.png b/main/images_meteo/p19n.png similarity index 100% rename from main/images/p19n.png rename to main/images_meteo/p19n.png diff --git a/main/images/p1j.png b/main/images_meteo/p1j.png similarity index 100% rename from main/images/p1j.png rename to main/images_meteo/p1j.png diff --git a/main/images/p1n.png b/main/images_meteo/p1n.png similarity index 100% rename from main/images/p1n.png rename to main/images_meteo/p1n.png diff --git a/main/images/p20j.png b/main/images_meteo/p20j.png similarity index 100% rename from main/images/p20j.png rename to main/images_meteo/p20j.png diff --git a/main/images/p20n.png b/main/images_meteo/p20n.png similarity index 100% rename from main/images/p20n.png rename to main/images_meteo/p20n.png diff --git a/main/images/p21j.png b/main/images_meteo/p21j.png similarity index 100% rename from main/images/p21j.png rename to main/images_meteo/p21j.png diff --git a/main/images/p21n.png b/main/images_meteo/p21n.png similarity index 100% rename from main/images/p21n.png rename to main/images_meteo/p21n.png diff --git a/main/images/p22j.png b/main/images_meteo/p22j.png similarity index 100% rename from main/images/p22j.png rename to main/images_meteo/p22j.png diff --git a/main/images/p22n.png b/main/images_meteo/p22n.png similarity index 100% rename from main/images/p22n.png rename to main/images_meteo/p22n.png diff --git a/main/images/p23j.png b/main/images_meteo/p23j.png similarity index 100% rename from main/images/p23j.png rename to main/images_meteo/p23j.png diff --git a/main/images/p23n.png b/main/images_meteo/p23n.png similarity index 100% rename from main/images/p23n.png rename to main/images_meteo/p23n.png diff --git a/main/images/p24j.png b/main/images_meteo/p24j.png similarity index 100% rename from main/images/p24j.png rename to main/images_meteo/p24j.png diff --git a/main/images/p24n.png b/main/images_meteo/p24n.png similarity index 100% rename from main/images/p24n.png rename to main/images_meteo/p24n.png diff --git a/main/images/p25j.png b/main/images_meteo/p25j.png similarity index 100% rename from main/images/p25j.png rename to main/images_meteo/p25j.png diff --git a/main/images/p25n.png b/main/images_meteo/p25n.png similarity index 100% rename from main/images/p25n.png rename to main/images_meteo/p25n.png diff --git a/main/images/p26j.png b/main/images_meteo/p26j.png similarity index 100% rename from main/images/p26j.png rename to main/images_meteo/p26j.png diff --git a/main/images/p26n.png b/main/images_meteo/p26n.png similarity index 100% rename from main/images/p26n.png rename to main/images_meteo/p26n.png diff --git a/main/images/p27j.png b/main/images_meteo/p27j.png similarity index 100% rename from main/images/p27j.png rename to main/images_meteo/p27j.png diff --git a/main/images/p27n.png b/main/images_meteo/p27n.png similarity index 100% rename from main/images/p27n.png rename to main/images_meteo/p27n.png diff --git a/main/images/p28j.png b/main/images_meteo/p28j.png similarity index 100% rename from main/images/p28j.png rename to main/images_meteo/p28j.png diff --git a/main/images/p28n.png b/main/images_meteo/p28n.png similarity index 100% rename from main/images/p28n.png rename to main/images_meteo/p28n.png diff --git a/main/images/p29j.png b/main/images_meteo/p29j.png similarity index 100% rename from main/images/p29j.png rename to main/images_meteo/p29j.png diff --git a/main/images/p29n.png b/main/images_meteo/p29n.png similarity index 100% rename from main/images/p29n.png rename to main/images_meteo/p29n.png diff --git a/main/images/p2j.png b/main/images_meteo/p2j.png similarity index 100% rename from main/images/p2j.png rename to main/images_meteo/p2j.png diff --git a/main/images/p2n.png b/main/images_meteo/p2n.png similarity index 100% rename from main/images/p2n.png rename to main/images_meteo/p2n.png diff --git a/main/images/p30j.png b/main/images_meteo/p30j.png similarity index 100% rename from main/images/p30j.png rename to main/images_meteo/p30j.png diff --git a/main/images/p30n.png b/main/images_meteo/p30n.png similarity index 100% rename from main/images/p30n.png rename to main/images_meteo/p30n.png diff --git a/main/images/p31j.png b/main/images_meteo/p31j.png similarity index 100% rename from main/images/p31j.png rename to main/images_meteo/p31j.png diff --git a/main/images/p31n.png b/main/images_meteo/p31n.png similarity index 100% rename from main/images/p31n.png rename to main/images_meteo/p31n.png diff --git a/main/images/p32j.png b/main/images_meteo/p32j.png similarity index 100% rename from main/images/p32j.png rename to main/images_meteo/p32j.png diff --git a/main/images/p32n.png b/main/images_meteo/p32n.png similarity index 100% rename from main/images/p32n.png rename to main/images_meteo/p32n.png diff --git a/main/images/p3j.png b/main/images_meteo/p3j.png similarity index 100% rename from main/images/p3j.png rename to main/images_meteo/p3j.png diff --git a/main/images/p3n.png b/main/images_meteo/p3n.png similarity index 100% rename from main/images/p3n.png rename to main/images_meteo/p3n.png diff --git a/main/images/p4j.png b/main/images_meteo/p4j.png similarity index 100% rename from main/images/p4j.png rename to main/images_meteo/p4j.png diff --git a/main/images/p4n.png b/main/images_meteo/p4n.png similarity index 100% rename from main/images/p4n.png rename to main/images_meteo/p4n.png diff --git a/main/images/p5bisj.png b/main/images_meteo/p5bisj.png similarity index 100% rename from main/images/p5bisj.png rename to main/images_meteo/p5bisj.png diff --git a/main/images/p5j.png b/main/images_meteo/p5j.png similarity index 100% rename from main/images/p5j.png rename to main/images_meteo/p5j.png diff --git a/main/images/p5n.png b/main/images_meteo/p5n.png similarity index 100% rename from main/images/p5n.png rename to main/images_meteo/p5n.png diff --git a/main/images/p6j.png b/main/images_meteo/p6j.png similarity index 100% rename from main/images/p6j.png rename to main/images_meteo/p6j.png diff --git a/main/images/p6n.png b/main/images_meteo/p6n.png similarity index 100% rename from main/images/p6n.png rename to main/images_meteo/p6n.png diff --git a/main/images/p7j.png b/main/images_meteo/p7j.png similarity index 100% rename from main/images/p7j.png rename to main/images_meteo/p7j.png diff --git a/main/images/p7n.png b/main/images_meteo/p7n.png similarity index 100% rename from main/images/p7n.png rename to main/images_meteo/p7n.png diff --git a/main/images/p8j.png b/main/images_meteo/p8j.png similarity index 100% rename from main/images/p8j.png rename to main/images_meteo/p8j.png diff --git a/main/images/p8n.png b/main/images_meteo/p8n.png similarity index 100% rename from main/images/p8n.png rename to main/images_meteo/p8n.png diff --git a/main/images/p9j.png b/main/images_meteo/p9j.png similarity index 100% rename from main/images/p9j.png rename to main/images_meteo/p9j.png diff --git a/main/images/p9n.png b/main/images_meteo/p9n.png similarity index 100% rename from main/images/p9n.png rename to main/images_meteo/p9n.png diff --git a/main/main.c b/main/main.c index 01a8922..e2b428f 100644 --- a/main/main.c +++ b/main/main.c @@ -1,5 +1,3 @@ -#include "wifi.h" -#include "mqtt.h" #include "misc/lv_types.h" #include "freertos/FreeRTOS.h" #include "freertos/event_groups.h" @@ -10,18 +8,24 @@ #include "esp_lcd_panel_io.h" #include "esp_lcd_panel_ops.h" #include "esp_lcd_panel_rgb.h" +#include "esp_lcd_touch_gt911.h" #include "esp_lvgl_port.h" #include "esp_event.h" #include "nvs_flash.h" -#include "meteofrance.h" -#include "image_downloader.h" #include -#include "fatfs.h" -#define DIR FF_DIR /* ESP IDF typedefs `DIR` as `FF_DIR` in its version of ff.h. Use `FF_DIR` in LVGL too */ #include "esp_vfs_fat.h" #include "sdmmc_cmd.h" #include + +// Includes personnels #include "obtain_time.h" +#include "fatfs.h" +#include "meteofrance.h" +#include "image_downloader.h" +#include "wifi.h" +#include "mqtt.h" + +#include "esp_littlefs.h" #define MOUNT_POINT "/sdcard" // Pin assignments can be set in menuconfig, see "SD SPI Example Configuration" menu. @@ -32,7 +36,6 @@ #define PIN_NUM_CS 10 -#include "esp_lcd_touch_gt911.h" #include "main.h" LV_FONT_DECLARE(montserrat_medium_12) LV_FONT_DECLARE(montserrat_medium_18) @@ -299,8 +302,6 @@ static void _app_button_cb(lv_event_t *e) } } -lv_subject_t wifiStatus; -lv_subject_t mqttStatus; lv_subject_t meteoStatus; static lv_style_t no_padding; @@ -313,6 +314,9 @@ static void app_main_display(void) lv_style_init(&no_padding); lv_style_set_pad_all(&no_padding, 0); + lv_style_init(&style_font_18); + lv_style_set_text_font(&style_font_18, &montserrat_medium_18); + lv_obj_t *cont_status = lv_obj_create(lv_layer_top()); lv_obj_add_style(cont_status,&no_padding,0); lv_obj_align(cont_status,LV_ALIGN_TOP_RIGHT,0,0); @@ -332,23 +336,25 @@ static void app_main_display(void) sprintf(strftime_buf,"%s %d %s", days[timeinfo.tm_wday], timeinfo.tm_mday, months[timeinfo.tm_mon]); lv_label_set_text(jour,strftime_buf); - lv_obj_align(jour, LV_ALIGN_CENTER,0,0); + + lv_obj_refr_size(cont_status); + //lv_obj_align(jour, LV_ALIGN_CENTER,0,0); lv_obj_t *meteoR = lv_label_create(cont_status); lv_label_set_text(meteoR,"--"); lv_label_bind_text(meteoR, &meteoStatus, "Meteo %d"); - lv_obj_t *wifi = lv_label_create(cont_status); - lv_obj_set_style_bg_color(wifi, lv_palette_darken(LV_PALETTE_GREY, 3), 0); - lv_obj_set_style_border_width(wifi,1,0); - lv_obj_set_style_border_color(wifi,lv_palette_darken(LV_PALETTE_GREY, 3),0); - lv_label_set_text(wifi,"Wifi Ok"); - lv_label_bind_text(wifi, &wifiStatus, "Wifi %d"); + lv_obj_t *wifi = lv_image_create(cont_status); + //lv_obj_set_style_bg_color(wifi, lv_palette_darken(LV_PALETTE_GREY, 3), 0); + //lv_obj_set_style_border_width(wifi,1,0); + //lv_obj_set_style_border_color(wifi,lv_palette_darken(LV_PALETTE_GREY, 3),0); + //lv_label_set_text(wifi,"Wifi Ok"); + //lv_label_bind_text(wifi, &wifiStatus, "Wifi %d"); - lv_obj_t *mqtt = lv_label_create(cont_status); - lv_label_set_text(mqtt,"Mqtt Ok"); - lv_label_bind_text(mqtt, &mqttStatus, "Mqtt %d"); + lv_image_create(cont_status); + //lv_label_set_text(mqtt,"Mqtt Ok"); + //lv_label_bind_text(mqtt, &mqttStatus, "Mqtt %d"); lv_obj_t *scr = lv_scr_act(); @@ -426,7 +432,7 @@ static void event_handler(lv_event_t *e) } LV_IMAGE_DECLARE(plan_rdc); LV_IMAGE_DECLARE(plan_etage); - +/* LV_IMAGE_DECLARE(p1j); LV_IMAGE_DECLARE(p2j); LV_IMAGE_DECLARE(p3j); @@ -443,6 +449,7 @@ LV_IMAGE_DECLARE(p26j); LV_IMAGE_DECLARE(p27j); LV_IMAGE_DECLARE(p28j); LV_IMAGE_DECLARE(p29j); +*/ struct lv_observer_t { lv_subject_t * subject; /**< The observed value */ @@ -511,6 +518,11 @@ static void weatherdataH_obs_cb(lv_observer_t *observer, lv_subject_t *subject) void showMeteoIcon(const char *icon, lv_obj_t *desc_icon, int childNr) { lv_obj_t* img = lv_obj_get_child(desc_icon, childNr); + char *str1= "A:/littlefs/"; + char* result = malloc(strlen(str1) + strlen(icon) + 6); + sprintf(result, "%s%s.png", str1, icon); + lv_image_set_src(img, result); + /* if (strcmp(icon, "p1j") == 0) { lv_image_set_src(img, &p1j); @@ -579,6 +591,7 @@ void showMeteoIcon(const char *icon, lv_obj_t *desc_icon, int childNr) { ESP_LOGE(TAG, "Image %s non connue", icon); } + */ } /* ------------------------------------------------------------ */ /* Fragment meteo journaliere (date,icone, min et max) */ @@ -1026,10 +1039,7 @@ void draw_ihm() // keys.clear(); lv_obj_clean(lv_scr_act()); - - - - /*Create a Tab view object*/ + /*Create a Tab view object*/ lv_obj_t * tabview; tabview = lv_tabview_create(lv_screen_active()); lv_tabview_set_tab_bar_position(tabview, LV_DIR_LEFT); @@ -1061,8 +1071,6 @@ void draw_ihm() static lv_style_t style_btn; lv_style_init(&style_btn); - lv_style_init(&style_font_18); - lv_style_set_text_font(&style_font_18, &montserrat_medium_18); lv_style_init(&style_font_24); lv_style_set_text_font(&style_font_24, &montserrat_medium_24); @@ -1303,19 +1311,39 @@ void mount_sd_card(){ } void app_main(void){ - esp_log_level_set("wifi", ESP_LOG_ERROR); + printf("Minimum free heap size: %" PRIu32 " bytes\n", esp_get_minimum_free_heap_size()); + printf("Free heap size: %" PRIu32 " bytes\n", esp_get_free_heap_size()); + + printf("1- Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); + + esp_log_level_set("wifi", ESP_LOG_ERROR); + + printf("2- Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); mount_sd_card(); + + esp_vfs_littlefs_conf_t conf = { + .base_path = "/littlefs", + .partition_label = "littlefs", + .format_if_mount_failed = true, + .dont_mount = false, + }; + + printf("3 - Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); /* LCD HW initialization */ ESP_ERROR_CHECK(app_lcd_init()); + printf("4 - Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); /* Touch initialization */ ESP_ERROR_CHECK(app_touch_init()); + printf("5 - Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); /* LVGL initialization */ ESP_ERROR_CHECK(app_lvgl_init()); + printf("6 - Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); + /* On affiche au plus tot l'ecran de démarrage */ if(lvgl_port_lock(0)){ //ESP_ERROR_CHECK(esp_lcd_panel_mirror(lcd_panel,true,true)); @@ -1324,6 +1352,7 @@ void app_main(void){ } + printf("7 - Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); // Initialize NVS esp_err_t ret = nvs_flash_init(); if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) @@ -1333,15 +1362,16 @@ void app_main(void){ } ESP_ERROR_CHECK(ret); - lv_subject_init_int(&wifiStatus,-1); - lv_subject_init_int(&mqttStatus,-1); lv_subject_init_int(&meteoStatus,-1); + printf("8 - Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); ESP_LOGI(TAG, "ESP_WIFI_MODE_STA"); wifi_init_sta(); - //mqtt_app_start(); + printf("8b - Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); + mqtt_app_start(); - time_t now; + printf("9 - Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); + time_t now; struct tm timeinfo; time(&now); localtime_r(&now, &timeinfo); @@ -1361,24 +1391,26 @@ void app_main(void){ localtime_r(&now, &timeinfo); strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo); - printf("Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); - heap_caps_print_heap_info(MALLOC_CAP_DEFAULT); + printf("10. Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); + heap_caps_print_heap_info(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); on_weather_data_retrieval(weather_data_retreived); on_weather_data_retrieval_start(weather_data_retreived_start); - initialise_weather_data_retrieval(60000); + initialise_weather_data_retrieval(600000); ESP_LOGW(TAG, "Weather data retrieval initialized"); + printf("11. Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); ESP_LOGW(TAG, "On telecharge l'image cuve"); TaskHandle_t xHandle = NULL; - BaseType_t ret1 = xTaskCreate(&imgdwn, "imageDownload_task", 5 * 1024, NULL, 5, &xHandle); + BaseType_t ret1 = xTaskCreate(&imgdwn, "imageDownload_task", 3 * 1024, NULL, 5, &xHandle); if(ret1!=pdPASS ){ ESP_LOGE(TAG, "Impossiblke de creer la tache %i", ret1); } + printf("12. Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); /* Show LVGL objects */ if(lvgl_port_lock(0)){ draw_ihm(); @@ -1386,6 +1418,81 @@ void app_main(void){ lvgl_port_unlock(); } + printf("13. Free heap after buffers allocation: %d\n", xPortGetFreeHeapSize()); + printf("Minimum free heap size: %" PRIu32 " bytes\n", esp_get_minimum_free_heap_size()); + printf("Free heap size: %" PRIu32 " bytes\n", esp_get_free_heap_size()); +LV_ASSERT_MEM_INTEGRITY(); + +lv_mem_monitor_t mon; +lv_mem_monitor(&mon); +printf("used: %6d (%3d %%), frag: %3d %%, biggest free: %6d\n", + (int)mon.total_size - mon.free_size, mon.used_pct, mon.frag_pct, + (int)mon.free_biggest_size); + + ESP_LOGI(TAG, "Initializing LittleFS"); + + esp_vfs_littlefs_conf_t conflfs = { + .base_path = "/littlefs", + .partition_label = "littlefs", + .format_if_mount_failed = true, + .dont_mount = false, + }; + + // Use settings defined above to initialize and mount LittleFS filesystem. + // Note: esp_vfs_littlefs_register is an all-in-one convenience function. + ret = esp_vfs_littlefs_register(&conflfs); + + if (ret != ESP_OK) + { + if (ret == ESP_FAIL) + { + ESP_LOGE(TAG, "Failed to mount or format filesystem"); + } + else if (ret == ESP_ERR_NOT_FOUND) + { + ESP_LOGE(TAG, "Failed to find LittleFS partition"); + } + else + { + ESP_LOGE(TAG, "Failed to initialize LittleFS (%s)", esp_err_to_name(ret)); + } + return; + } + + size_t total = 0, used = 0; + ret = esp_littlefs_info(conflfs.partition_label, &total, &used); + if (ret != ESP_OK) + { + ESP_LOGE(TAG, "Failed to get LittleFS partition information (%s)", esp_err_to_name(ret)); + } + else + { + ESP_LOGI(TAG, "Partition size: total: %d, used: %d", total, used); + } + + ESP_LOGI(TAG, "Reading file"); + FILE *f = fopen("/littlefs/p1j.png", "r"); + if (f == NULL) + { + ESP_LOGE(TAG, "Failed to open file for reading"); + return; + } + + char line[128]; + char *pos; + + fgets(line, sizeof(line), f); + fclose(f); + // strip newline + pos = strchr(line, '\n'); + if (pos) + { + *pos = '\0'; + } + ESP_LOGI(TAG, "Read from file: '%s'", line); + } + + diff --git a/main/mqtt.c b/main/mqtt.c index 5fc056c..45ade4e 100644 --- a/main/mqtt.c +++ b/main/mqtt.c @@ -4,7 +4,8 @@ #include "mqtt_client.h" esp_mqtt_client_handle_t client; -extern lv_subject_t mqttStatus; +lv_subject_t mqttStatus; + extern lv_subject_t tempIntSubj; extern lv_subject_t tempExtSubj; extern lv_subject_t hauteurCuveSubj; @@ -19,6 +20,50 @@ char *topicTempExt = "house/temp/282A802600008059"; char *topicHauteurCuve = "house/cuve/hauteur"; char *topicTempInt = "house/temp/287DCF1E00008020"; char *topicHauteurCuveEvol = "house/cuve/hauteurEvol"; +char *topicTest = "test"; + +LV_IMAGE_DECLARE(mqtt_ok); +LV_IMAGE_DECLARE(mqtt_ko); + +static void mqttStatus_obs_cb(lv_observer_t * observer, lv_subject_t * subject); + +static void mqttStatus_obs_cb(lv_observer_t * observer, lv_subject_t * subject) +{ + ESP_LOGE(TAG, "On passe dans le callback de chgt de statut; %li", lv_subject_get_int(subject)); + if(lvgl_port_lock(0)){ + lv_obj_t * wifiSt = lv_obj_get_child(lv_obj_get_child(lv_layer_top(), 0),3); + if(lv_obj_check_type(wifiSt, &lv_image_class)){ + switch (lv_subject_get_int(subject)) + { + case 0: + lv_image_set_src(wifiSt,&mqtt_ko); + break; + case 1: + lv_image_set_src(wifiSt,&mqtt_ok); + break; + case 2: + lv_color_t color = lv_color_make(255, 0, 0); + lv_obj_set_style_image_recolor_opa(wifiSt, 125, 0); + lv_obj_set_style_image_recolor(wifiSt, color, 0); + vTaskDelay(2000 / portTICK_PERIOD_MS); + + break; + case 3: + lv_obj_set_style_image_recolor_opa(wifiSt, 0, 0); + break; + default: + break; + } + }else{ + ESP_LOGE(TAG, "L'objet recuip en semble pas etre du bon type"); + } + lvgl_port_unlock(); + } + //int32_t prev_v = lv_subject_get_previous_int(subject); + //int32_t cur_v = lv_subject_get_int(subject); + + //lv_obj_t * btn = lv_observer_get_target(observer); +} static void log_error_if_nonzero(const char *message, int error_code) { @@ -91,7 +136,10 @@ static void mqtt_event_handler(void *handler_args, esp_event_base_t base, int32_ msg_id = esp_mqtt_client_subscribe(client, topicHauteurCuveEvol, 0); ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id); - //msg_id = esp_mqtt_client_subscribe(client, "/topic/qos1", 1); + msg_id = esp_mqtt_client_subscribe(client, topicTest, 0); + ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id); + + //msg_id = esp_mqtt_client_subscribe(client, "/topic/qos1", 1); //ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id); //msg_id = esp_mqtt_client_unsubscribe(client, "/topic/qos1"); @@ -118,6 +166,7 @@ static void mqtt_event_handler(void *handler_args, esp_event_base_t base, int32_ ESP_LOGI(TAG, "MQTT_EVENT_PUBLISHED, msg_id=%d", event->msg_id); break; case MQTT_EVENT_DATA: + lv_subject_set_int(&mqttStatus,2); ESP_LOGI(TAG, "MQTT_EVENT_DATA"); printf("TOPIC=%.*s\r\n", event->topic_len, event->topic); printf("DATA=%.*s\r\n", event->data_len, event->data); @@ -166,11 +215,15 @@ static void mqtt_event_handler(void *handler_args, esp_event_base_t base, int32_ lv_subject_copy_string(&hauteurCuveSubj, datas); free(datas); lvgl_port_unlock(); + }else if (strncmp(event->topic, topicTest, 4) == 0){ + ESP_LOGE(TAG,"Msg reecu sur test"); } + else { ESP_LOGE(TAG, "None match :-("); } + lv_subject_set_int(&mqttStatus,3); break; case MQTT_EVENT_ERROR: ESP_LOGI(TAG, "MQTT_EVENT_ERROR"); @@ -189,6 +242,11 @@ static void mqtt_event_handler(void *handler_args, esp_event_base_t base, int32_ } void mqtt_app_start(void) { + + lv_subject_init_int(&mqttStatus,-1); + lv_subject_add_observer_obj(&mqttStatus, mqttStatus_obs_cb, NULL, NULL); + + esp_mqtt_client_config_t mqtt_cfg = { .broker.address.uri = "mqtt://192.168.0.10", .network.timeout_ms = 1000}; diff --git a/main/wifi.c b/main/wifi.c index 8ed2e53..4189b16 100644 --- a/main/wifi.c +++ b/main/wifi.c @@ -24,7 +24,37 @@ static const char *TAG = "wifi"; static int s_retry_num = 0; -extern lv_subject_t wifiStatus; +static lv_subject_t wifiStatus; +LV_IMAGE_DECLARE(wifi_ok); +LV_IMAGE_DECLARE(wifi_ko); + +static void wifiStatus_obs_cb(lv_observer_t * observer, lv_subject_t * subject); + + +static void wifiStatus_obs_cb(lv_observer_t * observer, lv_subject_t * subject) +{ + ESP_LOGE(TAG, "On passe dans le callback de chgt de statut; %li", lv_subject_get_int(subject)); + lv_obj_t * wifiSt = lv_obj_get_child(lv_obj_get_child(lv_layer_top(), 0),2); + if(lv_obj_check_type(wifiSt, &lv_image_class)){ + switch (lv_subject_get_int(subject)) + { + case 0: + lv_image_set_src(wifiSt,&wifi_ko); + break; + case 1: + lv_image_set_src(wifiSt,&wifi_ok); + break; + default: + break; + } + }else{ + ESP_LOGE(TAG, "L'objet recuip en semble pas etre du bon type"); + } + //int32_t prev_v = lv_subject_get_previous_int(subject); + //int32_t cur_v = lv_subject_get_int(subject); + + //lv_obj_t * btn = lv_observer_get_target(observer); +} static void wifi_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data) { @@ -108,6 +138,9 @@ void wifi_init_sta(void) ESP_ERROR_CHECK(esp_wifi_start()); ESP_LOGI(TAG, "wifi_init_sta finished."); + lv_subject_init_int(&wifiStatus,0); + lv_subject_add_observer_obj(&wifiStatus, wifiStatus_obs_cb, NULL, NULL); + /* Waiting until either the connection is established (WIFI_CONNECTED_BIT) or connection failed for the maximum * number of re-tries (WIFI_FAIL_BIT). The bits are set by event_handler() (see above) */ diff --git a/partition_table/partitionTable.bin b/partition_table/partitionTable.bin deleted file mode 100644 index 0fdd7d8..0000000 Binary files a/partition_table/partitionTable.bin and /dev/null differ diff --git a/partition_table/partitionTable.csv b/partition_table/partitionTable.csv index 84c1cb9..852aebf 100644 --- a/partition_table/partitionTable.csv +++ b/partition_table/partitionTable.csv @@ -6,4 +6,4 @@ phy_init,data,phy,0x11000,4K, factory,app,factory,0x20000,3M, ota_0,app,ota_0,0x320000,3M, ota_1,app,ota_1,0x620000,3M, -datas,data,spiffs,0x920000,1M, +littlefs,data,littlefs,0x920000,1M, diff --git a/partitions.csv b/partitions.csv index ff26b22..b37897a 100644 --- a/partitions.csv +++ b/partitions.csv @@ -6,4 +6,4 @@ phy_init,data,phy,,0x1000,, factory,app,factory,,3M,, ota_0,app,ota_0,,3M,, ota_1,app,ota_1,,3M,, -datas,data,spiffs,,1M,, +littlefs,data,littlefs,,1M,, diff --git a/sdkconfig b/sdkconfig index 010fd51..33b9e7b 100644 --- a/sdkconfig +++ b/sdkconfig @@ -680,6 +680,7 @@ CONFIG_ESP_COEX_ENABLED=y # Common ESP-related # CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +CONFIG_ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y # end of Common ESP-related # @@ -952,14 +953,13 @@ CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y CONFIG_SPIRAM_CLK_IO=30 CONFIG_SPIRAM_CS_IO=26 # CONFIG_SPIRAM_XIP_FROM_PSRAM is not set -CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y -CONFIG_SPIRAM_RODATA=y +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set CONFIG_SPIRAM_SPEED_80M=y # CONFIG_SPIRAM_SPEED_40M is not set CONFIG_SPIRAM_SPEED=80 # CONFIG_SPIRAM_ECC_ENABLE is not set CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set # CONFIG_SPIRAM_USE_MEMMAP is not set # CONFIG_SPIRAM_USE_CAPS_ALLOC is not set CONFIG_SPIRAM_USE_MALLOC=y @@ -967,7 +967,7 @@ CONFIG_SPIRAM_MEMTEST=y CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384 # CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP is not set CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768 -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y # end of SPI RAM config # end of ESP PSRAM @@ -1040,7 +1040,7 @@ CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4608 -CONFIG_ESP_MAIN_TASK_STACK_SIZE=40000 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=30000 CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y # CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set # CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set @@ -1139,9 +1139,9 @@ CONFIG_ESP_WIFI_TASK_PINNED_TO_CORE_0=y # CONFIG_ESP_WIFI_TASK_PINNED_TO_CORE_1 is not set CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN=752 CONFIG_ESP_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP_WIFI_IRAM_OPT=y +# CONFIG_ESP_WIFI_IRAM_OPT is not set # CONFIG_ESP_WIFI_EXTRA_IRAM_OPT is not set -CONFIG_ESP_WIFI_RX_IRAM_OPT=y +# CONFIG_ESP_WIFI_RX_IRAM_OPT is not set CONFIG_ESP_WIFI_ENABLE_WPA3_SAE=y CONFIG_ESP_WIFI_ENABLE_SAE_PK=y CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT=y @@ -1646,25 +1646,21 @@ CONFIG_MBEDTLS_ERROR_STRINGS=y # CONFIG_MQTT_PROTOCOL_311=y # CONFIG_MQTT_PROTOCOL_5 is not set -CONFIG_MQTT_TRANSPORT_SSL=y -CONFIG_MQTT_TRANSPORT_WEBSOCKET=y -CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y +# CONFIG_MQTT_TRANSPORT_SSL is not set +# CONFIG_MQTT_TRANSPORT_WEBSOCKET is not set # CONFIG_MQTT_MSG_ID_INCREMENTAL is not set # CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED is not set # CONFIG_MQTT_REPORT_DELETED_MESSAGES is not set CONFIG_MQTT_USE_CUSTOM_CONFIG=y CONFIG_MQTT_TCP_DEFAULT_PORT=1883 -CONFIG_MQTT_SSL_DEFAULT_PORT=8883 -CONFIG_MQTT_WS_DEFAULT_PORT=80 -CONFIG_MQTT_WSS_DEFAULT_PORT=443 -CONFIG_MQTT_BUFFER_SIZE=1024 -CONFIG_MQTT_TASK_STACK_SIZE=6144 +CONFIG_MQTT_BUFFER_SIZE=100 +CONFIG_MQTT_TASK_STACK_SIZE=4096 # CONFIG_MQTT_DISABLE_API_LOCKS is not set CONFIG_MQTT_TASK_PRIORITY=5 CONFIG_MQTT_POLL_READ_TIMEOUT_MS=10000 CONFIG_MQTT_EVENT_QUEUE_SIZE=1 # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set -# CONFIG_MQTT_OUTBOX_DATA_ON_EXTERNAL_MEMORY is not set +CONFIG_MQTT_OUTBOX_DATA_ON_EXTERNAL_MEMORY=y # CONFIG_MQTT_CUSTOM_OUTBOX is not set CONFIG_MQTT_OUTBOX_EXPIRED_TIMEOUT_MS=30000 # end of ESP-MQTT Configurations @@ -1833,6 +1829,33 @@ CONFIG_ESP_LCD_TOUCH_MAX_POINTS=1 CONFIG_ESP_LCD_TOUCH_MAX_BUTTONS=1 # end of ESP LCD TOUCH +# +# LittleFS +# +# CONFIG_LITTLEFS_SDMMC_SUPPORT is not set +CONFIG_LITTLEFS_MAX_PARTITIONS=3 +CONFIG_LITTLEFS_PAGE_SIZE=256 +CONFIG_LITTLEFS_OBJ_NAME_LEN=64 +CONFIG_LITTLEFS_READ_SIZE=128 +CONFIG_LITTLEFS_WRITE_SIZE=128 +CONFIG_LITTLEFS_LOOKAHEAD_SIZE=128 +CONFIG_LITTLEFS_CACHE_SIZE=512 +CONFIG_LITTLEFS_BLOCK_CYCLES=512 +CONFIG_LITTLEFS_USE_MTIME=y +# CONFIG_LITTLEFS_USE_ONLY_HASH is not set +# CONFIG_LITTLEFS_HUMAN_READABLE is not set +CONFIG_LITTLEFS_MTIME_USE_SECONDS=y +# CONFIG_LITTLEFS_MTIME_USE_NONCE is not set +# CONFIG_LITTLEFS_SPIFFS_COMPAT is not set +# CONFIG_LITTLEFS_FLUSH_FILE_EVERY_WRITE is not set +# CONFIG_LITTLEFS_FCNTL_GET_PATH is not set +# CONFIG_LITTLEFS_MULTIVERSION is not set +# CONFIG_LITTLEFS_MALLOC_STRATEGY_DISABLE is not set +CONFIG_LITTLEFS_MALLOC_STRATEGY_DEFAULT=y +# CONFIG_LITTLEFS_MALLOC_STRATEGY_INTERNAL is not set +CONFIG_LITTLEFS_ASSERTS=y +# end of LittleFS + # # LVGL configuration # @@ -1853,8 +1876,8 @@ CONFIG_LV_COLOR_DEPTH=16 # # Memory Settings # -CONFIG_LV_USE_BUILTIN_MALLOC=y -# CONFIG_LV_USE_CLIB_MALLOC is not set +# CONFIG_LV_USE_BUILTIN_MALLOC is not set +CONFIG_LV_USE_CLIB_MALLOC=y # CONFIG_LV_USE_MICROPYTHON_MALLOC is not set # CONFIG_LV_USE_RTTHREAD_MALLOC is not set # CONFIG_LV_USE_CUSTOM_MALLOC is not set @@ -1864,9 +1887,6 @@ CONFIG_LV_USE_BUILTIN_STRING=y # CONFIG_LV_USE_BUILTIN_SPRINTF is not set CONFIG_LV_USE_CLIB_SPRINTF=y # CONFIG_LV_USE_CUSTOM_SPRINTF is not set -CONFIG_LV_MEM_SIZE_KILOBYTES=64 -CONFIG_LV_MEM_POOL_EXPAND_SIZE_KILOBYTES=0 -CONFIG_LV_MEM_ADR=0x0 # end of Memory Settings # @@ -2294,7 +2314,7 @@ CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ=240 CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=4608 -CONFIG_MAIN_TASK_STACK_SIZE=40000 +CONFIG_MAIN_TASK_STACK_SIZE=30000 CONFIG_CONSOLE_UART_DEFAULT=y # CONFIG_CONSOLE_UART_CUSTOM is not set # CONFIG_CONSOLE_UART_NONE is not set @@ -2354,8 +2374,8 @@ CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y # CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +# CONFIG_ESP32_WIFI_IRAM_OPT is not set +# CONFIG_ESP32_WIFI_RX_IRAM_OPT is not set CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y CONFIG_ESP32_WIFI_ENABLE_WPA3_OWE_STA=y CONFIG_WPA_MBEDTLS_CRYPTO=y