@@ -127,33 +127,39 @@ size_t NimBLEClient::deleteService(const NimBLEUUID &uuid) {
127127} // deleteServices
128128
129129
130- bool NimBLEClient::connect (bool refreshServices) {
131- return connect (m_peerAddress, 0 , refreshServices);
130+ /* *
131+ * @brief Connect to the BLE Server.
132+ * @param [in] deleteAttibutes If true this will delete any attribute objects this client may already\n
133+ * have created and clears the vectors after successful connection.
134+ * @return True on success.
135+ */
136+ bool NimBLEClient::connect (bool deleteAttibutes) {
137+ return connect (m_peerAddress, 0 , deleteAttibutes);
132138}
133139
134140/* *
135141 * @brief Connect to an advertising device.
136142 * @param [in] device The device to connect to.
137- * @param [in] refreshServices If true this will delete any attribute objects this client may already\n
143+ * @param [in] deleteAttibutes If true this will delete any attribute objects this client may already\n
138144 * have created and clears the vectors after successful connection.
139145 * @return True on success.
140146 */
141- bool NimBLEClient::connect (NimBLEAdvertisedDevice* device, bool refreshServices ) {
147+ bool NimBLEClient::connect (NimBLEAdvertisedDevice* device, bool deleteAttibutes ) {
142148 NimBLEAddress address (device->getAddress ());
143149 uint8_t type = device->getAddressType ();
144- return connect (address, type, refreshServices );
150+ return connect (address, type, deleteAttibutes );
145151}
146152
147153
148154/* *
149155 * @brief Connect to the BLE Server.
150156 * @param [in] address The address of the server.
151157 * @param [in] type The address type of the server (Random/public/other)
152- * @param [in] refreshServices If true this will delete any attribute objects this client may already\n
158+ * @param [in] deleteAttibutes If true this will delete any attribute objects this client may already\n
153159 * have created and clears the vectors after successful connection.
154160 * @return True on success.
155161 */
156- bool NimBLEClient::connect (const NimBLEAddress &address, uint8_t type, bool refreshServices ) {
162+ bool NimBLEClient::connect (const NimBLEAddress &address, uint8_t type, bool deleteAttibutes ) {
157163 NIMBLE_LOGD (LOG_TAG, " >> connect(%s)" , address.toString ().c_str ());
158164
159165 if (!NimBLEDevice::m_synced) {
@@ -212,7 +218,7 @@ bool NimBLEClient::connect(const NimBLEAddress &address, uint8_t type, bool refr
212218 return false ;
213219 }
214220
215- if (refreshServices ) {
221+ if (deleteAttibutes ) {
216222 NIMBLE_LOGD (LOG_TAG, " Refreshing Services for: (%s)" , address.toString ().c_str ());
217223 deleteServices ();
218224 }
0 commit comments