From 8bf8994fbf5497b4607e3b7f60942765093a94be Mon Sep 17 00:00:00 2001 From: Marko Durkovic Date: Thu, 6 Jan 2022 12:50:40 +0100 Subject: [PATCH] Fix documentation code samples --- docs/topics/rosbag1.rst | 1 + docs/topics/rosbag2.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/topics/rosbag1.rst b/docs/topics/rosbag1.rst index bbae2eb4..0e9b7c94 100644 --- a/docs/topics/rosbag1.rst +++ b/docs/topics/rosbag1.rst @@ -22,6 +22,7 @@ Instances of the :py:class:`Writer ` class can create an # serialize and write message message = String('hello world') + timestamp = 42 writer.write(connection, timestamp, cdr_to_ros1(serialize_cdr(message, msgtype), msgtype)) Reading rosbag1 diff --git a/docs/topics/rosbag2.rst b/docs/topics/rosbag2.rst index 3e788bb3..1f3fbe57 100644 --- a/docs/topics/rosbag2.rst +++ b/docs/topics/rosbag2.rst @@ -37,6 +37,7 @@ Instances of the :py:class:`Writer ` class can create an connection = writer.add_connection(topic, msgtype, 'cdr', '') # serialize and write message + timestamp = 42 message = String('hello world') writer.write(connection, timestamp, serialize_cdr(message, msgtype))