From 5fd4d53922d7b142a8032f449611960d9d5f0606 Mon Sep 17 00:00:00 2001 From: lly Date: Fri, 16 Oct 2020 18:52:32 +0800 Subject: [PATCH] ble_mesh: example: Fix fast provisioning compile error --- .../fast_provisioning/ble_mesh_fast_prov_client_model.c | 4 ++++ .../fast_provisioning/ble_mesh_fast_prov_operation.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/ble_mesh_fast_prov_client_model.c b/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/ble_mesh_fast_prov_client_model.c index b04f5becd1..677c2425a6 100644 --- a/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/ble_mesh_fast_prov_client_model.c +++ b/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/ble_mesh_fast_prov_client_model.c @@ -33,8 +33,10 @@ static struct k_delayed_work get_all_node_addr_timer; #endif +#if !defined(CONFIG_BLE_MESH_FAST_PROV) /* Unicast address of the Primary Provisioner */ static uint16_t prim_prov_addr; +#endif /* Note: these variables are used by ble_mesh_fast_prov_server demo */ @@ -370,6 +372,7 @@ esp_err_t example_fast_prov_client_recv_status(esp_ble_mesh_model_t *model, } case ESP_BLE_MESH_VND_MODEL_OP_FAST_PROV_NODE_ADDR_STATUS: { ESP_LOG_BUFFER_HEX("Node address", data, len); +#if CONFIG_BLE_MESH_GENERIC_ONOFF_CLI esp_ble_mesh_model_t *cli_model = NULL; example_node_info_t *node = NULL; esp_err_t err; @@ -396,6 +399,7 @@ esp_err_t example_fast_prov_client_recv_status(esp_ble_mesh_model_t *model, ESP_LOGE(TAG, "%s: Failed to send Generic OnOff Set Unack message", __func__); return ESP_FAIL; } +#endif /* CONFIG_BLE_MESH_GENERIC_ONOFF_CLI */ break; } default: diff --git a/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/ble_mesh_fast_prov_operation.c b/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/ble_mesh_fast_prov_operation.c index 5f1f0a89b5..726b561750 100644 --- a/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/ble_mesh_fast_prov_operation.c +++ b/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/ble_mesh_fast_prov_operation.c @@ -387,6 +387,7 @@ esp_err_t example_send_generic_onoff_get(esp_ble_mesh_model_t *model, return esp_ble_mesh_generic_client_get_state(&common, &get); } +#if CONFIG_BLE_MESH_GENERIC_ONOFF_CLI esp_err_t example_send_generic_onoff_set(esp_ble_mesh_model_t *model, example_msg_common_info_t *info, uint8_t onoff, uint8_t tid, bool need_ack) @@ -418,6 +419,7 @@ esp_err_t example_send_generic_onoff_set(esp_ble_mesh_model_t *model, return esp_ble_mesh_generic_client_set_state(&common, &set); } +#endif /* CONFIG_BLE_MESH_GENERIC_ONOFF_CLI */ esp_err_t example_send_fast_prov_info_set(esp_ble_mesh_model_t *model, example_msg_common_info_t *info,