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::{
|
use nrf_softdevice::ble::advertisement_builder::{
|
||||||
Flag, LegacyAdvertisementBuilder, LegacyAdvertisementPayload, ServiceList, ServiceUuid16,
|
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 nrf_softdevice::{raw, Softdevice};
|
||||||
|
|
||||||
use defmt::*;
|
use defmt::*;
|
||||||
@ -60,9 +60,11 @@ async fn ble_task(sd: &'static Softdevice, server: &'static Server) {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
info!("Creating config");
|
let config = peripheral::Config {
|
||||||
let config = peripheral::Config::default();
|
tx_power: TxPower::Plus4dBm,
|
||||||
info!("Creating adv object");
|
..Default::default()
|
||||||
|
};
|
||||||
|
|
||||||
let adv = peripheral::ConnectableAdvertisement::ScannableUndirected {
|
let adv = peripheral::ConnectableAdvertisement::ScannableUndirected {
|
||||||
adv_data: &ADV_DATA,
|
adv_data: &ADV_DATA,
|
||||||
scan_data: &SCAN_DATA,
|
scan_data: &SCAN_DATA,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user