From b5c381982cb58131165e9fd8dc700778fd8a428a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 12 Aug 2025 19:23:44 -0500 Subject: [PATCH] fix --- esphome/components/bluetooth_proxy/bluetooth_connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp index 6d41b083d0..5d81f680d9 100644 --- a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp +++ b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp @@ -12,8 +12,8 @@ namespace esphome::bluetooth_proxy { static const char *const TAG = "bluetooth_proxy.connection"; -// This function allocates nothing and directly packs UUIDs into the output array -// The base UUID is stored in flash memory as constexpr +// This function is designed to be allocation-free and only called in the event loop (not thread-safe) +// It directly packs UUIDs into the output array with precalculated constants for the base UUID static void fill_128bit_uuid_array(std::array &out, esp_bt_uuid_t uuid_source) { // Bluetooth base UUID: 00000000-0000-1000-8000-00805F9B34FB // out[0] = bytes 8-15 (big-endian)