mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 01:58:39 +00:00
[api] Fix HELPER_LOG format mismatch and remove unused is_varint64 codegen field
- Cast msg_size/type_varint.value to uint32_t in HELPER_LOG to match PRIu32 format (proto_varint_value_t is uint64_t on BLE builds) - Remove unused is_varint64 field from api_protobuf.py TypeInfo classes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
ce70c955c4
commit
9f57c2a9b6
@@ -193,7 +193,6 @@ class TypeInfo(ABC):
|
||||
return f"case {self.number}: this->{self.field_name} = {content}; break;"
|
||||
|
||||
decode_varint = None
|
||||
is_varint64 = False
|
||||
|
||||
@property
|
||||
def decode_length_content(self) -> str:
|
||||
@@ -463,7 +462,6 @@ class Int64Type(TypeInfo):
|
||||
cpp_type = "int64_t"
|
||||
default_value = "0"
|
||||
decode_varint = "static_cast<int64_t>(value)"
|
||||
is_varint64 = True
|
||||
encode_func = "encode_int64"
|
||||
wire_type = WireType.VARINT # Uses wire type 0
|
||||
|
||||
@@ -484,7 +482,6 @@ class UInt64Type(TypeInfo):
|
||||
cpp_type = "uint64_t"
|
||||
default_value = "0"
|
||||
decode_varint = "value"
|
||||
is_varint64 = True
|
||||
encode_func = "encode_uint64"
|
||||
wire_type = WireType.VARINT # Uses wire type 0
|
||||
|
||||
@@ -1286,7 +1283,6 @@ class SInt64Type(TypeInfo):
|
||||
cpp_type = "int64_t"
|
||||
default_value = "0"
|
||||
decode_varint = "decode_zigzag64(value)"
|
||||
is_varint64 = True
|
||||
encode_func = "encode_sint64"
|
||||
wire_type = WireType.VARINT # Uses wire type 0
|
||||
|
||||
@@ -1624,10 +1620,6 @@ class RepeatedTypeInfo(TypeInfo):
|
||||
"""
|
||||
return self._ti.wire_type
|
||||
|
||||
@property
|
||||
def is_varint64(self):
|
||||
return self._ti.is_varint64
|
||||
|
||||
@property
|
||||
def decode_varint_content(self) -> str:
|
||||
# Pointer fields don't support decoding
|
||||
|
||||
Reference in New Issue
Block a user