mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 12:44:33 +02:00
ble_mesh: Remove useless implementation in transport.c
This commit is contained in:
@@ -1001,10 +1001,6 @@ static inline s32_t ack_timeout(struct seg_rx *rx)
|
||||
return MAX(to, K_MSEC(400));
|
||||
}
|
||||
|
||||
#if CONFIG_BLE_MESH_PROV_TEST
|
||||
uint16_t addr_need_ack = 0xffff;
|
||||
#endif
|
||||
|
||||
int bt_mesh_ctl_send(struct bt_mesh_net_tx *tx, u8_t ctl_op, void *data,
|
||||
size_t data_len, u64_t *seq_auth,
|
||||
const struct bt_mesh_send_cb *cb, void *cb_data)
|
||||
@@ -1039,18 +1035,7 @@ int bt_mesh_ctl_send(struct bt_mesh_net_tx *tx, u8_t ctl_op, void *data,
|
||||
}
|
||||
}
|
||||
|
||||
#if !CONFIG_BLE_MESH_PROV_TEST
|
||||
return bt_mesh_net_send(tx, buf, cb, cb_data);
|
||||
#else
|
||||
if (addr_need_ack == tx->ctx->addr){
|
||||
BT_DBG("src 0x%04x dst 0x%04x ttl 0x%02x ctl 0x%02x", tx->src,
|
||||
tx->ctx->addr, tx->ctx->send_ttl, ctl_op);
|
||||
return bt_mesh_net_send(tx, buf, cb, cb_data);
|
||||
}
|
||||
|
||||
net_buf_unref(buf);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int send_ack(struct bt_mesh_subnet *sub, u16_t src, u16_t dst,
|
||||
|
@@ -31,10 +31,6 @@
|
||||
#define TRANS_CTL_OP_FRIEND_SUB_CFM 0x09
|
||||
#define TRANS_CTL_OP_HEARTBEAT 0x0a
|
||||
|
||||
#if CONFIG_BLE_MESH_PROV_TEST
|
||||
extern uint16_t addr_need_ack;
|
||||
#endif
|
||||
|
||||
struct bt_mesh_ctl_friend_poll {
|
||||
u8_t fsn;
|
||||
} __packed;
|
||||
|
@@ -55,7 +55,6 @@
|
||||
|
||||
#define SD_STORE 0
|
||||
#define TEST_COUNT_MAX 100
|
||||
extern uint16_t addr_need_ack ;
|
||||
char file_path[] = "/sdcard/hello.txt";
|
||||
// This example can use SDMMC and SPI peripherals to communicate with SD card.
|
||||
// By default, SDMMC peripheral is used.
|
||||
@@ -554,7 +553,6 @@ static void example_ble_mesh_config_client_cb(esp_ble_mesh_cfg_client_cb_event_t
|
||||
|
||||
ESP_LOGI(TAG, "%s, error_code = 0x%02x, event = 0x%02x, addr: 0x%04x, opcode: 0x%04x",
|
||||
__func__, param->error_code, event, param->params->ctx.addr, opcode);
|
||||
addr_need_ack = param->params->ctx.addr;
|
||||
|
||||
node = example_ble_mesh_get_node_info(addr);
|
||||
if (!node) {
|
||||
|
Reference in New Issue
Block a user