summaryrefslogtreecommitdiff
path: root/src/components/ble/NimbleController.cpp
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-03-25 00:07:50 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-03-25 00:07:50 (GMT)
commit2318c403017a6596869cc3f32adb02a97dbdb63b (patch)
treed860530479ca94a33cdab0fb3676b53f0a8cd95d /src/components/ble/NimbleController.cpp
parente78a9401ac707fe75da54fdc6ce6c3aa89032360 (diff)
One more step in the same direction...
Diffstat (limited to 'src/components/ble/NimbleController.cpp')
-rw-r--r--src/components/ble/NimbleController.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp
index ee9509b..79880e9 100644
--- a/src/components/ble/NimbleController.cpp
+++ b/src/components/ble/NimbleController.cpp
@@ -107,22 +107,8 @@ void NimbleController::Init() {
Pinetime::Controllers::Ble::BleAddress address;
rc = ble_hs_id_copy_addr(addrType, address.data(), nullptr);
ASSERT(rc == 0);
-
+ bleController.AddressType((addrType == 0) ? Ble::AddressTypes::Public : Ble::AddressTypes::Random);
bleController.Address(std::move(address));
- switch (addrType) {
- case BLE_OWN_ADDR_PUBLIC:
- bleController.AddressType(Ble::AddressTypes::Public);
- break;
- case BLE_OWN_ADDR_RANDOM:
- bleController.AddressType(Ble::AddressTypes::Random);
- break;
- case BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT:
- bleController.AddressType(Ble::AddressTypes::RPA_Public);
- break;
- case BLE_OWN_ADDR_RPA_RANDOM_DEFAULT:
- bleController.AddressType(Ble::AddressTypes::RPA_Random);
- break;
- }
rc = ble_gatts_start();
ASSERT(rc == 0);