Update ArduinoJSON, esp-nimble-cpp, Arduino Core, ESP-IDF (#448)
* ArduinoJSON 7.1.0 * Update nimble and arduino core * Update nuki_ble
This commit is contained in:
@@ -92,7 +92,7 @@ class scanCallbacks: public NimBLEScanCallbacks {
|
||||
void notifyCB(NimBLERemoteCharacteristic* pRemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify){
|
||||
std::string str = (isNotify == true) ? "Notification" : "Indication";
|
||||
str += " from ";
|
||||
str += pRemoteCharacteristic->getRemoteService()->getClient()->getPeerAddress().toString();
|
||||
str += pRemoteCharacteristic->getClient()->getPeerAddress().toString();
|
||||
str += ": Service = " + pRemoteCharacteristic->getRemoteService()->getUUID().toString();
|
||||
str += ", Characteristic = " + pRemoteCharacteristic->getUUID().toString();
|
||||
str += ", Value = " + std::string((char*)pData, length);
|
||||
@@ -109,7 +109,7 @@ bool connectToServer() {
|
||||
NimBLEClient* pClient = nullptr;
|
||||
|
||||
/** Check if we have a client we should reuse first **/
|
||||
if(NimBLEDevice::getClientListSize()) {
|
||||
if(NimBLEDevice::getCreatedClientCount()) {
|
||||
/** Special case when we already know this device, we send false as the
|
||||
* second argument in connect() to prevent refreshing the service database.
|
||||
* This saves considerable time and power.
|
||||
@@ -132,7 +132,7 @@ bool connectToServer() {
|
||||
|
||||
/** No client to reuse? Create a new one. */
|
||||
if(!pClient) {
|
||||
if(NimBLEDevice::getClientListSize() >= NIMBLE_MAX_CONNECTIONS) {
|
||||
if(NimBLEDevice::getCreatedClientCount() >= NIMBLE_MAX_CONNECTIONS) {
|
||||
printf("Max clients reached - no more connections available\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ void notifyTask(void * parameter){
|
||||
if(pSvc) {
|
||||
NimBLECharacteristic* pChr = pSvc->getCharacteristic("F00D");
|
||||
if(pChr) {
|
||||
pChr->notify(true);
|
||||
pChr->notify();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user