mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
Merge branch 'bugfix/btdm_fix_ble_throughput_demo_fail' into 'master'
Component/bt: fix throughput_demo_fail See merge request idf/esp-idf!2467
This commit is contained in:
@@ -482,14 +482,16 @@ static void throughput_client_task(void *param)
|
||||
while(1) {
|
||||
#if (CONFIG_GATTS_NOTIFY_THROUGHPUT)
|
||||
vTaskDelay(2000 / portTICK_PERIOD_MS);
|
||||
uint32_t bit_rate = 0;
|
||||
if (start_time) {
|
||||
current_time = esp_timer_get_time();
|
||||
bit_rate = notify_len * SECOND_TO_USECOND / (current_time - start_time);
|
||||
ESP_LOGI(GATTC_TAG, "Notify Bit rate = %d Btye/s, = %d bit/s, time = %ds",
|
||||
bit_rate, bit_rate<<3, (int)((current_time - start_time) / SECOND_TO_USECOND));
|
||||
} else {
|
||||
ESP_LOGI(GATTC_TAG, "Notify Bit rate = 0 Btye/s, = 0 bit/s");
|
||||
if(is_connecet){
|
||||
uint32_t bit_rate = 0;
|
||||
if (start_time) {
|
||||
current_time = esp_timer_get_time();
|
||||
bit_rate = notify_len * SECOND_TO_USECOND / (current_time - start_time);
|
||||
ESP_LOGI(GATTC_TAG, "Notify Bit rate = %d Btye/s, = %d bit/s, time = %ds",
|
||||
bit_rate, bit_rate<<3, (int)((current_time - start_time) / SECOND_TO_USECOND));
|
||||
} else {
|
||||
ESP_LOGI(GATTC_TAG, "Notify Bit rate = 0 Btye/s, = 0 bit/s");
|
||||
}
|
||||
}
|
||||
#endif /* #if (CONFIG_GATTS_NOTIFY_THROUGHPUT) */
|
||||
#if (CONFIG_GATTC_WRITE_THROUGHPUT)
|
||||
|
@@ -2,3 +2,4 @@
|
||||
# by default in this example
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_GATTS_NOTIFY_THROUGHPUT=y
|
||||
CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=n
|
||||
|
@@ -611,7 +611,6 @@ void throughput_server_task(void *param)
|
||||
while(1) {
|
||||
#if (CONFIG_GATTS_NOTIFY_THROUGHPUT)
|
||||
if (!can_send_notify) {
|
||||
ESP_LOGI(GATTS_TAG, "===");
|
||||
int res = xSemaphoreTake(gatts_semaphore, portMAX_DELAY);
|
||||
assert(res == pdTRUE);
|
||||
} else {
|
||||
|
@@ -2,3 +2,4 @@
|
||||
# by default in this example
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_GATTS_NOTIFY_THROUGHPUT=y
|
||||
CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=n
|
||||
|
Reference in New Issue
Block a user