mirror of
https://github.com/esphome/esphome.git
synced 2026-02-25 21:43:14 -07:00
Replace the heap-allocated tx_buffer_ (new char[]) with a compile-time sized inline array using ESPHOME_LOGGER_TX_BUFFER_SIZE define. This eliminates a heap allocation during Logger construction, saving ~513 bytes of heap on memory-constrained devices like BK72xx. Changes: - Add ESPHOME_LOGGER_TX_BUFFER_SIZE define set from Python config - Change tx_buffer_ from char* to char[ESPHOME_LOGGER_TX_BUFFER_SIZE+1] - Remove tx_buffer_size_ member field - Update constructor to no longer take tx_buffer_size parameter - Update all references to use the compile-time constant
1.0 KiB
1.0 KiB