From f2325ec1762cc43944ccc1d617a78f2350937d80 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Wed, 5 May 2021 18:31:37 -0700 Subject: [PATCH] make sure we don't buffer the serial port, we need the packets to be transmitted now. --- loraserv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loraserv.py b/loraserv.py index 38c3747..e60b3b0 100644 --- a/loraserv.py +++ b/loraserv.py @@ -78,7 +78,7 @@ async def main(): args = parser.parse_args() # open up the gateway device - reader, writer = await open_dev(args.serdev, 'w+b') + reader, writer = await open_dev(args.serdev, 'w+b', buffering=0) # open up the listener mr = await multicast.create_multicast_receiver(DEFAULT_MADDR) @@ -197,7 +197,7 @@ class TestLoraServ(unittest.IsolatedAsyncioTestCase): await main() # that open_dev is called with it - od.assert_called_with(serdev, 'w+b') + od.assert_called_with(serdev, 'w+b', buffering=0) # and that the multicast functions were called cmt.assert_called_with(DEFAULT_MADDR)