mirror of
https://github.com/esphome/esphome.git
synced 2026-10-04 18:11:29 +00:00
[api] Second cleanup pass over the decode generator
Repeated fields encode their elements through one encode_element() hook instead of two isinstance ladders, the fixed32 precomputed tag path owns its own guard, the generated switches drop the dead default case, StringRef takes the byte pointer directly, the three hand written tag expressions in proto.h go through proto_tag(), and stale comments about the previous decode design go. The compiled functions are unchanged.
This commit is contained in:
@@ -249,7 +249,7 @@ static APIBuffer build_infrared_rf_transmit_wire() {
|
||||
std::memcpy(bytes + len, packed, packed_len);
|
||||
len += packed_len;
|
||||
// field 6: modulation = 1 (non-zero so it's actually emitted and exercises
|
||||
// decode_varint for this field, matching the documented layout above).
|
||||
// decode_field for this field, matching the documented layout above).
|
||||
put_byte(0x30);
|
||||
put_varint(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user