mirror of
https://github.com/esphome/esphome.git
synced 2026-09-13 00:07:32 +00:00
ede8c1bba18766fb7b32cae8494e9770d037e0a6
Every message sent through send_message or the entity paths needed a proto_encode_msg<T> thunk (17 bytes on xtensa) and, for entity state and info messages, a calc_size<T> thunk, because the generated encode and calculate_size were member functions and the connection code wants plain function pointers over const void *. The generator now emits the bodies as static encode_msg(const void *) and calc_size_msg(const void *) functions, so &T::encode_msg is already a MessageEncodeFn and the thunks disappear. The member encode() and calculate_size() remain as inline forwarders for direct callers. ProtoMessage carries the same static defaults for messages without fields, which also removes the separate no-op encode thunk.
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
592 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
