From 8a23fbd95d4f6622a5c624fc4e39a26ce1d4594a Mon Sep 17 00:00:00 2001 From: Shay Levy Date: Sat, 2 Mar 2024 19:38:11 +0200 Subject: [PATCH] chore: apply suggestions from code review Co-authored-by: Ernst Klamer --- src/bthome_ble/parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bthome_ble/parser.py b/src/bthome_ble/parser.py index e1fe970..3e3172b 100644 --- a/src/bthome_ble/parser.py +++ b/src/bthome_ble/parser.py @@ -379,10 +379,10 @@ def _skip_old_or_duplicated_advertisement( Detect duplicated or older packets Devices may send duplicated advertisements or advertisements order can change - when passthing through a proxy. If more than 4 seconds pass since the last + when passing through a proxy. If more than 4 seconds pass since the last advertisement assume it is a new packet even if it has the same packet id. - Packet id rollover at 255 to 0, validate that the difference between last packet - and new packet is less than 64. This assumes device is not sending more than 16 + Packet id rollover at 255 to 0, validate that the difference between last packet id + and new packet id is less than 64. This assumes device is not sending more than 16 advertisements per second. """ last_packet_id = self.packet_id