diff options
author | Sven Gothel <[email protected]> | 2020-10-23 06:50:47 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-23 06:50:47 +0200 |
commit | fcbe2b39e5eb5bf2aafc876bdf5e6bf1a300f3ae (patch) | |
tree | c8344051089f2ba0c4ad77df65653558b448bf95 /src | |
parent | a698ecf7f3e24e8769bab12d80dcdbb36dab8b1d (diff) |
Better arg names and order for 'ScanType changeScanType(const ScanType current, const ScanType changeType, const bool changeEnable)'
Diffstat (limited to 'src')
-rw-r--r-- | src/direct_bt/DBTAdapter.cpp | 6 | ||||
-rw-r--r-- | src/direct_bt/HCIHandler.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/direct_bt/DBTAdapter.cpp b/src/direct_bt/DBTAdapter.cpp index 8c61eda6..7b5d5dc6 100644 --- a/src/direct_bt/DBTAdapter.cpp +++ b/src/direct_bt/DBTAdapter.cpp @@ -714,14 +714,14 @@ bool DBTAdapter::mgmtEvDeviceDiscoveringAny(std::shared_ptr<MgmtEvent> e, const ScanType nextMetaScanType; if( eventEnabled ) { - nextMetaScanType = changeScanType(currentMetaScanType, true, eventScanType); + nextMetaScanType = changeScanType(currentMetaScanType, eventScanType, true); } else if( !keep_le_scan_alive ) { - nextMetaScanType = changeScanType(currentMetaScanType, false, eventScanType); + nextMetaScanType = changeScanType(currentMetaScanType, eventScanType, false); } if( !hciSourced ) { // update HCIHandler's currentNativeScanType from other source - const ScanType nextNativeScanType = changeScanType(currentNativeScanType, eventEnabled, eventScanType); + const ScanType nextNativeScanType = changeScanType(currentNativeScanType, eventScanType, eventEnabled); DBG_PRINT("DBTAdapter::DeviceDiscovering: dev_id %d, keepDiscoveringAlive %d: scanType[native %s -> %s, meta %s -> %s]): %s - HCI Updated", dev_id, keep_le_scan_alive.load(), getScanTypeString(currentNativeScanType).c_str(), getScanTypeString(nextNativeScanType).c_str(), diff --git a/src/direct_bt/HCIHandler.cpp b/src/direct_bt/HCIHandler.cpp index 7b9b72b6..665dfbdb 100644 --- a/src/direct_bt/HCIHandler.cpp +++ b/src/direct_bt/HCIHandler.cpp @@ -736,7 +736,7 @@ HCIStatusCode HCIHandler::le_enable_scan(const bool enable, const bool filter_du } const std::lock_guard<std::recursive_mutex> lock(mtx_sendReply); // RAII-style acquire and relinquish via destructor - ScanType nextScanType = changeScanType(currentScanType, enable, ScanType::LE); + ScanType nextScanType = changeScanType(currentScanType, ScanType::LE, enable); DBG_PRINT("HCI Enable Scan: enable %s -> %s, filter_dup %d - %s", getScanTypeString(currentScanType).c_str(), getScanTypeString(nextScanType).c_str(), filter_dup, toString().c_str()); |