From 19cf3e54bc1a81459efda7c74cd6e3544efd11ba Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 8 Apr 2022 02:22:16 +0200 Subject: DBG_PRINT: Show BTManager::readDefaultSysParam() @ pre/post BTManager::initializeAdapter() and BTAdapter::startAdvertising() --- src/direct_bt/BTAdapter.cpp | 8 +++++++- src/direct_bt/BTManager.cpp | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/direct_bt/BTAdapter.cpp b/src/direct_bt/BTAdapter.cpp index b3fd105d..51504a02 100644 --- a/src/direct_bt/BTAdapter.cpp +++ b/src/direct_bt/BTAdapter.cpp @@ -1410,7 +1410,13 @@ HCIStatusCode BTAdapter::startAdvertising(DBGattServerRef gattServerData_, WARN_PRINT("Not allowed (%d connections open/pending): %s", connCount, toString(true).c_str()); return HCIStatusCode::COMMAND_DISALLOWED; } - // FIXME?? std::this_thread::sleep_for(std::chrono::milliseconds(100)); // wait a little (FIXME: Fast restart of advertising error) + if( jau::environment::get().debug ) { + std::vector params = mgmt.readDefaultSysParam(dev_id); + DBG_PRINT("BTAdapter::startAdvertising[%d]: SysParam: %zd", dev_id, params.size()); + for(size_t i=0; i params = readDefaultSysParam(dev_id); + DBG_PRINT("BTManager::initializeAdapter[%d]: SysParam-Pre: %zd", dev_id, params.size()); + for(size_t i=0; i params = readDefaultSysParam(dev_id); + DBG_PRINT("BTManager::initializeAdapter[%d]: SysParam-Post: %zd", dev_id, params.size()); + for(size_t i=0; i