Skip to content

Commit

Permalink
removed rfu field from EddystoneUIDFrame. fixes #39 (#50)
Browse files Browse the repository at this point in the history
* removed rfu field from EddystoneUIDFrame. fixes #39
  • Loading branch information
citruz authored Aug 25, 2020
1 parent 3f845b4 commit d213dc0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ Changelog
---------
Beacontools follows the `semantic versioning <https://semver.org/>`__ scheme.

* 2.0.1
* Removed (unused) rfu field from the Eddystone UID packet, fixes #39
* 2.0.0
* Dropped support for Python 2.7 and 3.4
* Added support for COVID-19 Exposure Notifications
Expand Down
16 changes: 8 additions & 8 deletions beacontools/device_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CJMonitorFilter(DeviceFilter):

def __init__(self, company_id=CJ_MANUFACTURER_ID, beacon_type=CJ_TEMPHUM_TYPE):
"""Initialize filter."""
super(CJMonitorFilter, self).__init__()
super().__init__()
if company_id is None and beacon_type is None:
raise ValueError("CJMonitorFilter needs at least one argument set")
if company_id is not None:
Expand All @@ -48,7 +48,7 @@ class IBeaconFilter(DeviceFilter):

def __init__(self, uuid=None, major=None, minor=None):
"""Initialize filter."""
super(IBeaconFilter, self).__init__()
super().__init__()
if uuid is None and major is None and minor is None:
raise ValueError("IBeaconFilter needs at least one argument set")
if uuid is not None:
Expand All @@ -64,7 +64,7 @@ class EddystoneFilter(DeviceFilter):

def __init__(self, namespace=None, instance=None):
"""Initialize filter."""
super(EddystoneFilter, self).__init__()
super().__init__()
if namespace is None and instance is None:
raise ValueError("EddystoneFilter needs at least one argument set")
if namespace is not None:
Expand All @@ -78,7 +78,7 @@ class EstimoteFilter(DeviceFilter):

def __init__(self, identifier=None, protocol_version=None):
"""Initialize filter."""
super(EstimoteFilter, self).__init__()
super().__init__()
if identifier is None and protocol_version is None:
raise ValueError("EstimoteFilter needs at least one argument set")
if identifier is not None:
Expand All @@ -92,7 +92,7 @@ class ExposureNotificationFilter(DeviceFilter):

def __init__(self, identifier):
"""Initialize filter."""
super(ExposureNotificationFilter, self).__init__()
super().__init__()
if identifier is None:
raise ValueError("ExposureNotificationFilter needs identifier to be set")
self.properties['identifier'] = identifier
Expand All @@ -103,11 +103,11 @@ class BtAddrFilter(DeviceFilter):

def __init__(self, bt_addr):
"""Initialize filter."""
super(BtAddrFilter, self).__init__()
super().__init__()
try:
bt_addr = bt_addr.lower()
except AttributeError:
raise ValueError("bt_addr({}) wasn't a string".format(bt_addr))
except AttributeError as exc:
raise ValueError("bt_addr({}) wasn't a string".format(bt_addr)) from exc
if not is_valid_mac(bt_addr):
raise ValueError("Invalid bluetooth MAC address given,"
" format should match aa:bb:cc:dd:ee:ff")
Expand Down
4 changes: 3 additions & 1 deletion beacontools/structs/eddystone.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"tx_power" / Int8sl,
"namespace" / Array(10, Byte),
"instance" / Array(6, Byte),
"rfu" / Array(2, Byte)
# commented out because it is not used anyway and there seem to be beacons which
# don't send it at all (see https://github.com/citruz/beacontools/issues/39)
# "rfu" / Array(2, Byte)
)

EddystoneURLFrame = Struct(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
setup(
name='beacontools',

version='2.0.0',
version='2.0.1',

description='A Python library for working with various types of Bluetooth LE Beacons.',
long_description=long_description,
Expand Down

0 comments on commit d213dc0

Please sign in to comment.