Skip to content

Commit b608b1e

Browse files
committed
feat(team_comm): add debug message showing protobu msg size
to find out if we are within the allowed budge of 512B for the new `game_controller`.
1 parent 21dad8a commit b608b1e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ def is_still_valid(time: Optional[TimeMsg]) -> bool:
261261
return (time is not None) and (now - Time.from_msg(time) < Duration(seconds=self.lifetime))
262262

263263
message = self.protocol_converter.convert_to_message(self, msg, is_still_valid)
264-
self.socket_communication.send_message(message.SerializeToString())
264+
proto_msg = message.SerializeToString()
265+
self.logger.debug(f"Sending msg with size {len(proto_msg)} bytes")
266+
self.socket_communication.send_message(proto_msg)
265267

266268
def create_empty_message(self, now: Time) -> Proto.Message:
267269
message = Proto.Message()

0 commit comments

Comments
 (0)