mirror of
				https://github.com/esphome/esphome.git
				synced 2025-11-04 09:01:49 +00:00 
			
		
		
		
	ble churn fix
This commit is contained in:
		@@ -67,13 +67,6 @@ bool BluetoothProxy::parse_device(const esp32_ble_tracker::ESPBTDevice &device)
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// Batch size for BLE advertisements to maximize WiFi efficiency
 | 
			
		||||
// Each advertisement is up to 80 bytes when packaged (including protocol overhead)
 | 
			
		||||
// Most advertisements are 20-30 bytes, allowing even more to fit per packet
 | 
			
		||||
// 16 advertisements × 80 bytes (worst case) = 1280 bytes out of ~1320 bytes usable payload
 | 
			
		||||
// This achieves ~97% WiFi MTU utilization while staying under the limit
 | 
			
		||||
static constexpr size_t FLUSH_BATCH_SIZE = 16;
 | 
			
		||||
 | 
			
		||||
bool BluetoothProxy::parse_devices(const esp32_ble::BLEScanResult *scan_results, size_t count) {
 | 
			
		||||
  if (!api::global_api_server->is_connected() || this->api_connection_ == nullptr)
 | 
			
		||||
    return false;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user