Performance optimizations

pull/42/head
sh123 2022-06-20 17:40:06 +03:00
rodzic e40011cd46
commit a24c99b3ed
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -93,7 +93,7 @@ bool BLESerial::begin(const char* localName)
if (pRxCharacteristic == nullptr)
return false;
BLESerialCharacteristicCallbacks* bleSerialCharacteristicCallbacks = new BLESerialCharacteristicCallbacks();
BLESerialCharacteristicCallbacks* bleSerialCharacteristicCallbacks = new BLESerialCharacteristicCallbacks();
bleSerialCharacteristicCallbacks->bleSerial = this;
pRxCharacteristic->setCallbacks(bleSerialCharacteristicCallbacks);
@ -156,7 +156,7 @@ size_t BLESerial::write(uint8_t c)
uint8_t _c = c;
pTxCharacteristic->setValue(&_c, 1);
pTxCharacteristic->notify();
delay(10); // bluetooth stack will go into congestion, if too many packets are sent
delay(3); // bluetooth stack will go into congestion, if too many packets are sent
return 1;
}