From 0cb94aaff8ac17247fefcaa7af99d9f836d74a7f Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sat, 12 May 2018 17:14:52 +0200 Subject: [PATCH] BT stacksize configurable --- src/blecsan.cpp | 2 +- src/paxcounter.conf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blecsan.cpp b/src/blecsan.cpp index 51b6a563..41678a2f 100644 --- a/src/blecsan.cpp +++ b/src/blecsan.cpp @@ -235,7 +235,7 @@ void bt_loop(void * pvParameters) // Initialize BT controller to allocate task and other resource. ESP_LOGI(TAG, "Enabling Bluetooth Controller"); esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); - bt_cfg.controller_task_stack_size = 8192; // double BT stack size + bt_cfg.controller_task_stack_size = BLESTACKSIZE; // set BT stack size to value configured in paxcounter.conf if (esp_bt_controller_init(&bt_cfg) != ESP_OK) { diff --git a/src/paxcounter.conf b/src/paxcounter.conf index cc953b6b..8ab4da35 100644 --- a/src/paxcounter.conf +++ b/src/paxcounter.conf @@ -10,6 +10,7 @@ #define BLECOUNTER 1 // comment out if you don't want BLE count // BLE scan parameters +#define BLESTACKSIZE 8192 // stack size for esp_bt_controller #define BLESCANTIME 11 // [seconds] scan duration, see note below #define BLESCANWINDOW 10 // [milliseconds] scan window, see below, 3 .. 10240, default 10 #define BLESCANINTERVAL 10 // [milliseconds] how long to wait between scans, 3 .. 10240, default 10