mirror of
https://github.com/esphome/esphome.git
synced 2025-08-06 02:17:45 +00:00
Optimize Bluetooth proxy batching and increase scan buffer capacity
This commit is contained in:
parent
4e9e48e2e7
commit
bc33b44648
@ -52,7 +52,7 @@ bool BluetoothProxy::parse_device(const esp32_ble_tracker::ESPBTDevice &device)
|
||||
return true;
|
||||
}
|
||||
|
||||
static constexpr size_t FLUSH_BATCH_SIZE = 8;
|
||||
static constexpr size_t FLUSH_BATCH_SIZE = 16;
|
||||
static std::vector<api::BluetoothLERawAdvertisement> &get_batch_buffer() {
|
||||
static std::vector<api::BluetoothLERawAdvertisement> batch_buffer;
|
||||
return batch_buffer;
|
||||
|
@ -26,9 +26,9 @@ namespace esp32_ble {
|
||||
|
||||
// Maximum number of BLE scan results to buffer
|
||||
#ifdef USE_PSRAM
|
||||
static constexpr uint8_t SCAN_RESULT_BUFFER_SIZE = 32;
|
||||
static constexpr uint8_t SCAN_RESULT_BUFFER_SIZE = 36;
|
||||
#else
|
||||
static constexpr uint8_t SCAN_RESULT_BUFFER_SIZE = 20;
|
||||
static constexpr uint8_t SCAN_RESULT_BUFFER_SIZE = 24;
|
||||
#endif
|
||||
|
||||
// Maximum size of the BLE event queue - must be power of 2 for lock-free queue
|
||||
|
Loading…
x
Reference in New Issue
Block a user