Skip to content

Commit 5df2ba4

Browse files
committed
Fixup client logs
1 parent d020683 commit 5df2ba4

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/NimBLEClient.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ size_t NimBLEClient::deleteService(const NimBLEUUID& uuid) {
135135
*/
136136
bool NimBLEClient::connect(bool deleteAttributes, bool asyncConnect, bool exchangeMTU) {
137137
return connect(m_peerAddress, deleteAttributes, asyncConnect, exchangeMTU);
138-
}
138+
} // connect
139139

140140
/**
141141
* @brief Connect to an advertising device.
@@ -151,7 +151,7 @@ bool NimBLEClient::connect(bool deleteAttributes, bool asyncConnect, bool exchan
151151
bool NimBLEClient::connect(const NimBLEAdvertisedDevice* device, bool deleteAttributes, bool asyncConnect, bool exchangeMTU) {
152152
NimBLEAddress address(device->getAddress());
153153
return connect(address, deleteAttributes, asyncConnect, exchangeMTU);
154-
}
154+
} // connect
155155

156156
/**
157157
* @brief Connect to a BLE Server by address.
@@ -601,15 +601,15 @@ int NimBLEClient::getRssi() const {
601601
*/
602602
std::vector<NimBLERemoteService*>::iterator NimBLEClient::begin() {
603603
return m_svcVec.begin();
604-
}
604+
} // begin
605605

606606
/**
607607
* @brief Get iterator to the end of the vector of remote service pointers.
608608
* @return An iterator to the end of the vector of remote service pointers.
609609
*/
610610
std::vector<NimBLERemoteService*>::iterator NimBLEClient::end() {
611611
return m_svcVec.end();
612-
}
612+
} // end
613613

614614
/**
615615
* @brief Get the service BLE Remote Service instance corresponding to the uuid.
@@ -771,7 +771,7 @@ int NimBLEClient::serviceDiscoveredCB(uint16_t connHandle,
771771
NimBLEClient* pClient = (NimBLEClient*)pTaskData->m_pInstance;
772772

773773
if (error->status == BLE_HS_ENOTCONN) {
774-
NIMBLE_LOGE(LOG_TAG, "<< Service Discovered; Not connected");
774+
NIMBLE_LOGE(LOG_TAG, "<< Service Discovered; Disconnected");
775775
NimBLEUtils::taskRelease(*pTaskData, error->status);
776776
return error->status;
777777
}
@@ -790,7 +790,7 @@ int NimBLEClient::serviceDiscoveredCB(uint16_t connHandle,
790790
NimBLEUtils::taskRelease(*pTaskData, error->status);
791791
NIMBLE_LOGD(LOG_TAG, "<< Service Discovered");
792792
return error->status;
793-
}
793+
} // serviceDiscoveredCB
794794

795795
/**
796796
* @brief Get the value of a specific characteristic associated with a specific service.
@@ -864,7 +864,7 @@ NimBLERemoteCharacteristic* NimBLEClient::getCharacteristic(uint16_t handle) {
864864
}
865865

866866
return nullptr;
867-
}
867+
} // getCharacteristic
868868

869869
/**
870870
* @brief Get the current mtu of this connection.
@@ -892,7 +892,7 @@ int NimBLEClient::exchangeMTUCb(uint16_t conn_handle, const ble_gatt_error* erro
892892
}
893893

894894
return 0;
895-
}
895+
} // exchangeMTUCb
896896

897897
/**
898898
* @brief Begin the MTU exchange process with the server.
@@ -919,7 +919,7 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event* event, void* arg) {
919919
int rc = 0;
920920
NimBLETaskData* pTaskData = pClient->m_pTaskData; // save a copy in case client is deleted
921921

922-
NIMBLE_LOGD(LOG_TAG, "Got Client event %s", NimBLEUtils::gapEventToString(event->type));
922+
NIMBLE_LOGD(LOG_TAG, ">> handleGapEvent %s", NimBLEUtils::gapEventToString(event->type));
923923

924924
switch (event->type) {
925925
case BLE_GAP_EVENT_DISCONNECT: {
@@ -1203,6 +1203,7 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event* event, void* arg) {
12031203
NimBLEUtils::taskRelease(*pTaskData, rc);
12041204
}
12051205

1206+
NIMBLE_LOGD(LOG_TAG, "<< handleGapEvent");
12061207
return 0;
12071208
} // handleGapEvent
12081209

0 commit comments

Comments
 (0)