File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,9 @@ class ManufacturerDataField:
215215 def __init__ (self , key , value_format , field_names = None ):
216216 self ._key = key
217217 self ._format = value_format
218- self .element_count = len (value_format .strip ("><!=@" ).replace ("x" , "" ))
218+ # TODO: Support format strings that use numbers to repeat a given type. For now, we strip
219+ # numbers because Radio specifies string length with it.
220+ self .element_count = len (value_format .strip ("><!=@0123456789" ).replace ("x" , "" ))
219221 if self .element_count > 1 and (not field_names or len (field_names ) != self .element_count ):
220222 raise ValueError ("Provide field_names when multiple values are in the format" )
221223 self ._entry_length = struct .calcsize (value_format )
You can’t perform that action at this time.
0 commit comments