浏览代码

Merge branch 'bugfix/correct_cod_check' into 'master'

esp-idf: Corrected check of Class of Device for discovered devices

Closes IDF-6548

See merge request espressif/esp-idf!12391
Jiang Jiang Jian 5 年之前
父节点
当前提交
822cdd81ef
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c

+ 2 - 1
examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c

@@ -149,7 +149,8 @@ static void update_device_info(esp_bt_gap_cb_param_t *param)
     }
 
     if (!esp_bt_gap_is_valid_cod(cod) ||
-            !(esp_bt_gap_get_cod_major_dev(cod) == ESP_BT_COD_MAJOR_DEV_PHONE)) {
+	    (!(esp_bt_gap_get_cod_major_dev(cod) == ESP_BT_COD_MAJOR_DEV_PHONE) &&
+             !(esp_bt_gap_get_cod_major_dev(cod) == ESP_BT_COD_MAJOR_DEV_AV))) {
         return;
     }