Skip to content

Commit

Permalink
simplified config
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Jan 11, 2023
1 parent 9a8e8c4 commit 49e5f2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ config ESP_MQTT_ENABLED
This is currently only used to enforce the selection of LWIP_SO_RCVBUF.
Disabling the component does not actually disable something.

config ESP_MQTT_TASK_STACK_SIZE
int "MQTT background process task stack size"
config ESP_MQTT_TASK_STACK
int "MQTT background process task stack"
depends on ESP_MQTT_ENABLED
default 9216
help
Specify at least 9216 if TLS is used and at least 4096 otherwise.

config ESP_MQTT_TASK_STACK_PRIORITY
config ESP_MQTT_TASK_PRIORITY
int "MQTT background process task priority"
depends on ESP_MQTT_ENABLED
default 5
Expand Down
4 changes: 2 additions & 2 deletions esp_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ bool esp_mqtt_start(const char *host, const char *port, const char *client_id, c

// create mqtt thread
ESP_LOGI(ESP_MQTT_LOG_TAG, "esp_mqtt_start: create task");
BaseType_t ret = xTaskCreatePinnedToCore(esp_mqtt_run, "esp_mqtt", CONFIG_ESP_MQTT_TASK_STACK_SIZE, NULL,
CONFIG_ESP_MQTT_TASK_STACK_PRIORITY, &esp_mqtt_task, CONFIG_ESP_MQTT_TASK_CORE);
BaseType_t ret = xTaskCreatePinnedToCore(esp_mqtt_run, "esp_mqtt", CONFIG_ESP_MQTT_TASK_STACK, NULL,
CONFIG_ESP_MQTT_TASK_PRIORITY, &esp_mqtt_task, CONFIG_ESP_MQTT_TASK_CORE);
if (ret != pdPASS) {
ESP_LOGW(ESP_MQTT_LOG_TAG, "esp_mqtt_start: failed to create task");
ESP_MQTT_UNLOCK_MAIN();
Expand Down
4 changes: 2 additions & 2 deletions test/sdkconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1212,8 +1212,8 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# esp-mqtt
#
CONFIG_ESP_MQTT_ENABLED=y
CONFIG_ESP_MQTT_TASK_STACK_SIZE=9216
CONFIG_ESP_MQTT_TASK_STACK_PRIORITY=5
CONFIG_ESP_MQTT_TASK_STACK=9216
CONFIG_ESP_MQTT_TASK_PRIORITY=5
CONFIG_ESP_MQTT_TASK_CORE=1
CONFIG_ESP_MQTT_EVENT_QUEUE_SIZE=64
CONFIG_ESP_MQTT_TLS_ENABLE=y
Expand Down

0 comments on commit 49e5f2e

Please sign in to comment.