File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1266,7 +1266,16 @@ def telemetryParser(in_message=None, debug: bool = False):
1266
1266
update_container .update ({"val" : update_msg .val .proto_bytes })
1267
1267
1268
1268
elif update_msg .val .HasField ("bytes_val" ):
1269
- update_container .update ({"val" : update_msg .val .bytes_val })
1269
+ val_binary = '' .join (format (byte , '08b' ) for byte in update_msg .val .bytes_val )
1270
+ val_decimal = struct .unpack ("f" , struct .pack ("I" , int (val_binary , 2 )))[0 ]
1271
+ update_container .update ({'val' : val_decimal })
1272
+
1273
+ elif update_msg .val .HasField ('leaflist_val' ):
1274
+ val_leaflist = update_msg .val
1275
+ element_str = ""
1276
+ for element in val_leaflist .leaflist_val .element :
1277
+ element_str += element
1278
+ update_container .update ({'val' : element_str })
1270
1279
1271
1280
response ["update" ]["update" ].append (update_container )
1272
1281
You can’t perform that action at this time.
0 commit comments