Delayed sleep for BLE companions if BLE read is busy. Reduced sleep period from 50 sticks to 10 sticks

This commit is contained in:
Kevin Le committed 2026-05-04 22:04:11 +07:00
1 parent e608503aa0
commit 7f02cbe80b
4 files changed
+8 -2

No files matched your search

+4
View File
@@ -182,6 +182,10 @@ size_t SerialBLEInterface::writeFrame(const uint8_t src[], size_t len) {
#define BLE_WRITE_MIN_INTERVAL 60
bool SerialBLEInterface::isReadBusy() const {
return (recv_queue_len > 0);
}
bool SerialBLEInterface::isWriteBusy() const {
return millis() < _last_write + BLE_WRITE_MIN_INTERVAL; // still too soon to start another write?
}