From fb6c87fe1ea005e201cde04174012ca626c85ab9 Mon Sep 17 00:00:00 2001 From: roshan Date: Sun, 22 Sep 2024 14:06:11 +0530 Subject: [PATCH] feat[Issue: #12]: recv_size is required if package is included of DATA --- r503.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/r503.py b/r503.py index a401903..c96fd84 100644 --- a/r503.py +++ b/r503.py @@ -40,6 +40,8 @@ # eliminate 'R503.rcv _size' # ****************************************************************** +# Revision: + # - Recv_size required to be specified in-order receive expected number of bytes # - Confirmation codes can be changed as the sensor version, so it's more convenient to change the confirmation_codes.json # file rather than changing the code base @@ -78,6 +80,7 @@ def __init__(self, port, baud=57600, pw=0, addr=0xFFFFFFFF, timeout=1, recv_size pw (int): The password, default 0 addr (int): The module address, default 0xFFFFFFFF timeout (int): The serial timeout in seconds, default 1 + recv_size (int): The receive buffer size, default 128 This initializes the R503 instance attributes like pw, addr etc. It opens the serial port with the given parameters. """