Skip to content

Commit 8c60085

Browse files
brping: pingmessage: Fix payload_length check
This should be zero and not one, the error was introduced in a rework on #110: https://github.com/bluerobotics/ping-python/pull/110/files#diff-ed2c04d88418d534a1ae078d8a994d08848d370ca71de0d0af5ab5f7b6f19d99R345 Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent 2e687b2 commit 8c60085

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

brping/pingmessage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def wait_src_id(self, msg_byte):
350350
def wait_dst_id(self, msg_byte):
351351
self.buf.append(msg_byte)
352352
self.state += 1
353-
if self.payload_length == 1: # no payload bytes -> skip waiting
353+
if self.payload_length == 0: # no payload bytes -> skip waiting
354354
self.state += 1
355355

356356
def wait_payload(self, msg_byte):

0 commit comments

Comments
 (0)