mirror of
https://github.com/esphome/esphome.git
synced 2026-08-27 16:29:29 +00:00
17589d10b428dfeb7caccb33e81806c4b190d4c8
esp_now_send built the outbound frame into a function-static buffer before request() took g_req_mutex, so two tasks calling the public esp_now_send symbol could overwrite each other's frame. It also meant every transmit copied the body twice: once into that buffer, then again into request()'s own buffer. request() now takes an optional tail chunk that it writes straight after the payload, under the mutex. esp_now_send builds only the 9-byte header on the stack and hands the caller's frame over as the tail. That removes the race, drops a full-frame copy per transmit, and frees the 1479-byte static buffer. The wire format is unchanged: the same header bytes followed by the same frame bytes, with the same payload_len.
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
580 MiB
Languages
C++
57.4%
Python
42%
C
0.3%
JavaScript
0.2%
