Skip to content

Commit

Permalink
移除多余的发射功率调整代码
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-kirisame committed Apr 7, 2020
1 parent 0d77262 commit 992d000
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions application/main/src/ble/ble_services.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,11 +828,6 @@ static void ble_evt_handler(ble_evt_t const* p_ble_evt, void* p_context)
err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle);
APP_ERROR_CHECK(err_code);
ble_conn_handle_change(m_conn_handle, p_ble_evt->evt.gap_evt.conn_handle);
#ifdef HIGH_TX_POWER
//更改发射功率到+4dBm
err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_CONN, m_conn_handle, 4);
APP_ERROR_CHECK(err_code);
#endif
break;

case BLE_GAP_EVT_DISCONNECTED:
Expand Down Expand Up @@ -966,9 +961,6 @@ static void advertising_init(void)
uint32_t err_code;
uint8_t adv_flags;
ble_advertising_init_t init;
#ifdef HIGH_TX_POWER
int8_t tx_power_level = 4; //更改发射功率到+4dBm
#endif

memset(&init, 0, sizeof(init));

Expand All @@ -978,9 +970,6 @@ static void advertising_init(void)
init.advdata.flags = adv_flags;
init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
init.advdata.uuids_complete.p_uuids = m_adv_uuids;
#ifdef HIGH_TX_POWER
init.advdata.p_tx_power_level = &tx_power_level;
#endif

advertising_config_get(&init.config);

Expand Down

0 comments on commit 992d000

Please sign in to comment.