From f88cc33cfc784ff9565a82740bed16ee8290a46e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 18 Oct 2025 12:01:57 -1000 Subject: [PATCH] fix --- script/api_protobuf/api_protobuf.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/script/api_protobuf/api_protobuf.py b/script/api_protobuf/api_protobuf.py index 0f3505f657..075efe88f9 100755 --- a/script/api_protobuf/api_protobuf.py +++ b/script/api_protobuf/api_protobuf.py @@ -1472,15 +1472,9 @@ class RepeatedTypeInfo(TypeInfo): if self._use_pointer: return None if self._use_bitmask: - # For bitmask fields, decode enum value and set corresponding bit, with bounds checking - content = self._ti.decode_varint - if content is None: - return None - return ( - f"case {self.number}: " - f"if (static_cast({content}) < 32) " - f"this->{self.field_name} |= (1U << static_cast({content})); " - f"break;" + # Bitmask fields don't support decoding (only used for device->client messages) + raise RuntimeError( + f"enum_as_bitmask fields do not support decoding: {self.field_name}" ) content = self._ti.decode_varint if content is None: