Revert #724e1a7 and replace with stack checks.

Replaces `NimBLEDevice::setConnectionInProgress` and `NimBLEDevice::isConnectionInProgress()` with lower level checks to avoid potential incorrect state reporting.
`NimBLEClient::connect` will instead call `NimBLEScan::stop` if it stopped the scan to release any resources waiting, the call the callback if set.
This commit is contained in:
h2zero authored and h2zero committed 2024-11-18 08:56:38 -07:00
1 parent fbbcfadc0c
commit 5f2730de02
4 files changed
+1 -38

No files matched your search

-6
View File
@@ -184,8 +184,6 @@ class NimBLEDevice {
static bool isBonded(const NimBLEAddress& address);
static bool deleteAllBonds();
static NimBLEAddress getBondedAddress(int index);
static void setConnectionInProgress(bool inProgress);
static bool isConnectionInProgress();
# endif
private:
@@ -197,10 +195,6 @@ class NimBLEDevice {
static uint8_t m_ownAddrType;
static std::vector<NimBLEAddress> m_whiteList;
# if defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL) || defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
static bool m_connectionInProgress;
# endif
# if defined(CONFIG_BT_NIMBLE_ROLE_OBSERVER)
static NimBLEScan* m_pScan;
# endif