Browse Source

make sure we don't buffer the serial port, we need the packets to

be transmitted now.
irr_shared
John-Mark Gurney 3 years ago
parent
commit
f2325ec176
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      loraserv.py

+ 2
- 2
loraserv.py View File

@@ -78,7 +78,7 @@ async def main():
args = parser.parse_args() args = parser.parse_args()


# open up the gateway device # 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 # open up the listener
mr = await multicast.create_multicast_receiver(DEFAULT_MADDR) mr = await multicast.create_multicast_receiver(DEFAULT_MADDR)
@@ -197,7 +197,7 @@ class TestLoraServ(unittest.IsolatedAsyncioTestCase):
await main() await main()


# that open_dev is called with it # 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 # and that the multicast functions were called
cmt.assert_called_with(DEFAULT_MADDR) cmt.assert_called_with(DEFAULT_MADDR)


Loading…
Cancel
Save