Explicitly set transmit power
This commit is contained in:
parent
392675dd47
commit
3ffa59f5dc
@ -10,7 +10,7 @@ use embassy_time::Timer;
|
||||
use nrf_softdevice::ble::advertisement_builder::{
|
||||
Flag, LegacyAdvertisementBuilder, LegacyAdvertisementPayload, ServiceList, ServiceUuid16,
|
||||
};
|
||||
use nrf_softdevice::ble::{gatt_server, peripheral};
|
||||
use nrf_softdevice::ble::{gatt_server, peripheral, TxPower};
|
||||
use nrf_softdevice::{raw, Softdevice};
|
||||
|
||||
use defmt::*;
|
||||
@ -60,9 +60,11 @@ async fn ble_task(sd: &'static Softdevice, server: &'static Server) {
|
||||
.build();
|
||||
|
||||
loop {
|
||||
info!("Creating config");
|
||||
let config = peripheral::Config::default();
|
||||
info!("Creating adv object");
|
||||
let config = peripheral::Config {
|
||||
tx_power: TxPower::Plus4dBm,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let adv = peripheral::ConnectableAdvertisement::ScannableUndirected {
|
||||
adv_data: &ADV_DATA,
|
||||
scan_data: &SCAN_DATA,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user