From 2cbb86a9140d3bead71dd44115af870cf95aba10 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 10 Sep 2026 19:23:54 -0500 Subject: [PATCH] Regenerate api_pb2 for SerialProxySetModeRequest after merging dev --- esphome/components/api/api_pb2.cpp | 9 ++++++--- esphome/components/api/api_pb2.h | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/esphome/components/api/api_pb2.cpp b/esphome/components/api/api_pb2.cpp index 59bfbd6740..9e4000b55b 100644 --- a/esphome/components/api/api_pb2.cpp +++ b/esphome/components/api/api_pb2.cpp @@ -4148,14 +4148,16 @@ uint32_t SerialProxyRequestResponse::calc_size_msg(const void *self) { size += ProtoSize::calc_length(1, msg.error_message.size()); return size; } -void SerialProxySetModeRequest::decode_field(uint32_t tag, const uint8_t *data, proto_varint_value_t scalar) { +void SerialProxySetModeRequest::decode_field(void *self, uint32_t tag, const uint8_t *data, + proto_varint_value_t scalar) { + auto &msg = *static_cast(self); const ProtoFieldValue value(data, scalar); switch (tag) { case proto_tag(1, WIRE_TYPE_VARINT): - this->instance = value.as_varint(); + msg.instance = value.as_varint(); break; case proto_tag(2, WIRE_TYPE_VARINT): - this->mode = static_cast(value.as_varint()); + msg.mode = static_cast(value.as_varint()); break; } } @@ -4319,6 +4321,7 @@ static_assert(!std::is_polymorphic_v, "decodable messag static_assert(!std::is_polymorphic_v, "decodable messages carry no vtable"); static_assert(!std::is_polymorphic_v, "decodable messages carry no vtable"); static_assert(!std::is_polymorphic_v, "decodable messages carry no vtable"); +static_assert(!std::is_polymorphic_v, "decodable messages carry no vtable"); #endif #ifdef USE_BLUETOOTH_PROXY_CONNECTIONS static_assert(!std::is_polymorphic_v, "decodable messages carry no vtable"); diff --git a/esphome/components/api/api_pb2.h b/esphome/components/api/api_pb2.h index 4c4ce7dd6e..5b3683a1ab 100644 --- a/esphome/components/api/api_pb2.h +++ b/esphome/components/api/api_pb2.h @@ -3930,12 +3930,15 @@ class SerialProxySetModeRequest final : public ProtoDecodableMessage { #endif uint32_t instance{0}; enums::SerialProxyMode mode{}; + void decode(const uint8_t *buffer, size_t length) { + ProtoDecodableMessage::decode_fields(this, buffer, length, &decode_field); + } #ifdef HAS_PROTO_MESSAGE_DUMP const char *dump_to(DumpBuffer &out) const override; #endif protected: - void decode_field(uint32_t tag, const uint8_t *data, proto_varint_value_t scalar) override; + static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar); }; #endif #ifdef USE_BLUETOOTH_PROXY_CONNECTIONS