summaryrefslogtreecommitdiffstats
path: root/src/direct_bt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-09-15 16:15:11 +0200
committerSven Gothel <[email protected]>2022-09-15 16:15:11 +0200
commit66d499469cf7173ef00b6441fc6c00a9c0b0cbe6 (patch)
tree99e6c1d453a7557f2729e088972d6076987800ec /src/direct_bt
parent116822ec8bd597127157c0837b12218fff18a2e2 (diff)
BTAdapter/HCIHandler::toString(): Show dev_id as 1st element w/o explicitly naming it.
Diffstat (limited to 'src/direct_bt')
-rw-r--r--src/direct_bt/BTAdapter.cpp5
-rw-r--r--src/direct_bt/HCIHandler.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/direct_bt/BTAdapter.cpp b/src/direct_bt/BTAdapter.cpp
index b76ff2dd..78e2de04 100644
--- a/src/direct_bt/BTAdapter.cpp
+++ b/src/direct_bt/BTAdapter.cpp
@@ -1559,9 +1559,8 @@ HCIStatusCode BTAdapter::stopAdvertising() noexcept {
std::string BTAdapter::toString(bool includeDiscoveredDevices) const noexcept {
std::string random_address_info = adapterInfo.addressAndType != visibleAddressAndType ? " ("+visibleAddressAndType.toString()+")" : "";
- std::string out("Adapter[BT "+std::to_string(getBTMajorVersion())+", BTMode "+to_string(getBTMode())+", "+to_string(getRole())+", "+adapterInfo.addressAndType.toString()+random_address_info+
- ", '"+getName()+"', id "+std::to_string(dev_id)+
- ", curSettings"+to_string(adapterInfo.getCurrentSettingMask())+
+ std::string out("Adapter["+std::to_string(dev_id)+", BT "+std::to_string(getBTMajorVersion())+", BTMode "+to_string(getBTMode())+", "+to_string(getRole())+", "+adapterInfo.addressAndType.toString()+random_address_info+
+ ", '"+getName()+"', curSettings"+to_string(adapterInfo.getCurrentSettingMask())+
", valid "+std::to_string(isValid())+
", adv "+std::to_string(hci.isAdvertising())+
", scanType[native "+to_string(hci.getCurrentScanType())+", meta "+to_string(currentMetaScanType)+"]"
diff --git a/src/direct_bt/HCIHandler.cpp b/src/direct_bt/HCIHandler.cpp
index 37a4b04f..41c8b3cf 100644
--- a/src/direct_bt/HCIHandler.cpp
+++ b/src/direct_bt/HCIHandler.cpp
@@ -960,7 +960,7 @@ void HCIHandler::close() noexcept {
}
std::string HCIHandler::toString() const noexcept {
- return "HCIHandler[dev_id "+std::to_string(dev_id)+", BTMode "+to_string(btMode)+", open "+std::to_string(isOpen())+
+ return "HCIHandler["+std::to_string(dev_id)+", BTMode "+to_string(btMode)+", open "+std::to_string(isOpen())+
", adv "+std::to_string(advertisingEnabled)+", scan "+to_string(currentScanType)+
", ext[init "+std::to_string(sup_commands_set)+", adv "+std::to_string(use_ext_adv())+", scan "+std::to_string(use_ext_scan())+", conn "+std::to_string(use_ext_conn())+
"], ring[entries "+std::to_string(hciEventRing.size())+"]]";