mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
9498c554bfe8ec103ff0f549b10298492bee7329
The notify_state_deferred_ lambda captured [this, state, progress, error] (16 bytes on 32-bit), exceeding std::function SBO and forcing a heap allocation on every OTA progress update. Pack the three values into a single uint32_t: - state (8 bits) + error (8 bits) + progress as fixed-point (16 bits) The lambda now captures [this, packed] (8 bytes), fitting in SBO. Progress resolution of 0.01% is more than adequate for OTA reporting.
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
546 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
