ble_mesh: example: Fix fast provisioning compile error

This commit is contained in:
lly 2020-10-16 18:52:32 +08:00 committed by bot
parent 7f1a0e1552
commit 5fd4d53922
2 changed files with 6 additions and 0 deletions

View File

@ -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:

View File

@ -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,