From a24c99b3ed73363de1cb804e4f37b9ff3bd8406b Mon Sep 17 00:00:00 2001 From: sh123 Date: Mon, 20 Jun 2022 17:40:06 +0300 Subject: [PATCH] Performance optimizations --- ble_serial.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ble_serial.cpp b/ble_serial.cpp index 2c94b1c..3ce9ed4 100644 --- a/ble_serial.cpp +++ b/ble_serial.cpp @@ -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; }