Skip to content

Commit 2a06b3d

Browse files
authored
Add len parameter to decode_bits. (#1062)
1 parent e9884d6 commit 2a06b3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymodbus/payload.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,9 @@ def decode_8bit_uint(self):
373373
handle = make_byte_string(handle)
374374
return unpack(fstring, handle)[0]
375375

376-
def decode_bits(self):
376+
def decode_bits(self, package_len=1):
377377
"""Decode a byte worth of bits from the buffer."""
378-
self._pointer += 1
378+
self._pointer += package_len
379379
# fstring = self._endian + "B"
380380
handle = self._payload[self._pointer - 1 : self._pointer]
381381
handle = make_byte_string(handle)

0 commit comments

Comments
 (0)