Delayed sleep for BLE companions if BLE read is busy. Reduced sleep period from 50 sticks to 10 sticks
This commit is contained in:
1 parent
e608503aa0
commit
7f02cbe80b
4 files changed
+8
-2
No files matched your search
@@ -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?
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user