From a457ffa0b7cae16ee629a045b024e4b89b9b6bb2 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Sun, 12 Jan 2020 14:32:47 -0800 Subject: [PATCH] Fix indentation in readme.md --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index dd98b6623d2bc0..ec0efc67621992 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,18 @@ cereal supports two backends, one based on [zmq](https://zeromq.org/), the other Example --- ```python - import cereal.messaging as messaging - - # in subscriber - sm = messaging.SubMaster(['sensorEvents']) - while 1: - sm.update() - print(sm['sensorEvents']) - - # in publisher - pm = messaging.PubMaster(['sensorEvents']) - dat = messaging.new_message() - dat.init('sensorEvents', 1) - dat.sensorEvents[0] = {"gyro": {"v": [0.1, -0.1, 0.1]}} - pm.send('sensorEvents', dat) +import cereal.messaging as messaging + +# in subscriber +sm = messaging.SubMaster(['sensorEvents']) +while 1: + sm.update() + print(sm['sensorEvents']) + +# in publisher +pm = messaging.PubMaster(['sensorEvents']) +dat = messaging.new_message() +dat.init('sensorEvents', 1) +dat.sensorEvents[0] = {"gyro": {"v": [0.1, -0.1, 0.1]}} +pm.send('sensorEvents', dat) ```