Add const to NimBLEAdvertisedDevice* in NimBLEClient::connect overload

Fixes an issue where the wrong connect overload is called if the NimBLEAdvertisedDevice* passed is const.
This commit is contained in:
h2zero
2024-11-24 16:17:01 -07:00
parent 1b0abd273f
commit 41a7aa8eb5
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -44,10 +44,10 @@ struct NimBLETaskData;
*/
class NimBLEClient {
public:
bool connect(NimBLEAdvertisedDevice* device,
bool deleteAttributes = true,
bool asyncConnect = false,
bool exchangeMTU = true);
bool connect(const NimBLEAdvertisedDevice* device,
bool deleteAttributes = true,
bool asyncConnect = false,
bool exchangeMTU = true);
bool connect(const NimBLEAddress& address, bool deleteAttributes = true, bool asyncConnect = false, bool exchangeMTU = true);
bool connect(bool deleteAttributes = true, bool asyncConnect = false, bool exchangeMTU = true);
bool disconnect(uint8_t reason = BLE_ERR_REM_USER_CONN_TERM);