mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
bc35d616dd53aa252cb538da173732f6879c676f
Switch from FixedVector (runtime-sized, heap allocated) to StaticVector (compile-time sized, stack allocated) for better memory efficiency: **Changes:** - Replace FixedVector with StaticVector in bthome.h - Use cg.add_define to set sizes at compile time before creating component - Remove runtime init() calls (StaticVector doesn't need them) - Add default defines to esphome/core/defines.h for static analysis **Benefits:** - All memory allocated on stack at compile time - Zero runtime allocation overhead - Better for embedded systems with limited heap - StaticVector allocates all N slots upfront (no dynamic growth) **Defines added:** - BTHOME_MAX_MEASUREMENTS: Max number of sensor measurements - BTHOME_MAX_BINARY_MEASUREMENTS: Max number of binary sensor measurements - BTHOME_MAX_ADV_PACKETS: Max advertisement packets for cycling Sizes are calculated from YAML config and set via cg.add_define before component instantiation, ensuring compile-time type safety.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
545 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
