Skip to content

Commit

Permalink
feat[Issue: #12]: recv_size is required if package is included of DATA
Browse files Browse the repository at this point in the history
  • Loading branch information
rshcs committed Sep 22, 2024
1 parent cc6a3ea commit fb6c87f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions r503.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
"""
Expand Down

0 comments on commit fb6c87f

Please sign in to comment.