You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd suggest that the delay is reduced to 1 ms. By using much smaller delay, it can accomodate different kinds of serial data.
Describe alternatives you've considered
Currently I have no alternative approaches in mind that is as efficient and minimal in changes.
Additional context
When I try without using flush() for my project, typically the data is sent in its entirety in about 5 - 20 ms. However, when I try to use flush(), the data would be sent entirely in > 100 ms. For a bigger serial data, the loop in the function would cause other 100 ms of delay(s). To avoid the problem altogether, one can avoid using flush() at all. But then, there is no way to know and make sure that the transmission buffer is cleared.
I have checked existing list of Feature requests and the Contribution Guide
I confirm I have checked existing list of Feature requests and Contribution Guide.
Related area
Classic Bluetooth
Hardware specification
All ESP32 boards
Is your feature request related to a problem?
For a small but frequent Bluetooth serial data, using delay of 100 ms in
flush()
degrade the performance very much.https://github.com/espressif/arduino-esp32/blob/cbf1e94dd5f9ac8bdabaae9603611a3b81d8fbe4/libraries/BluetoothSerial/src/BluetoothSerial.cpp#L878-L884
Describe the solution you'd like
I'd suggest that the delay is reduced to 1 ms. By using much smaller delay, it can accomodate different kinds of serial data.
Describe alternatives you've considered
Currently I have no alternative approaches in mind that is as efficient and minimal in changes.
Additional context
When I try without using
flush()
for my project, typically the data is sent in its entirety in about 5 - 20 ms. However, when I try to useflush()
, the data would be sent entirely in > 100 ms. For a bigger serial data, the loop in the function would cause other 100 ms of delay(s). To avoid the problem altogether, one can avoid usingflush()
at all. But then, there is no way to know and make sure that the transmission buffer is cleared.I have checked existing list of Feature requests and the Contribution Guide
Originally posted by @vincadrn in espressif/arduino-esp32#9868
The text was updated successfully, but these errors were encountered: