Skip to content

Commit

Permalink
Merge pull request #55 from pupil-labs/rm_warn_bump_version
Browse files Browse the repository at this point in the history
Remove "devices of different protocol found" warning
  • Loading branch information
papr authored Feb 20, 2020
2 parents e69ba7b + f9b1798 commit 0000402
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion ndsi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, message):
from ndsi.formatter import DataFormat


__version__ = "1.1"
__version__ = "1.2"
__protocol_version__ = str(DataFormat.latest().version_major)


Expand Down
19 changes: 0 additions & 19 deletions ndsi/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ def __init__(
self._context = context or zmq.Context()
self._sensors_by_host = {}
self._callbacks = [self._on_event] + list(callbacks)
self._warned_once_older_version = False
self._warned_once_newer_version = False

# Public NetworkInterface API

Expand Down Expand Up @@ -233,23 +231,6 @@ def handle_event(self):
group_version = event.group.split("-v")
group = group_version[0]
version = group_version[1] if len(group_version) > 1 else "0"
if group == "pupil-mobile":
if (
not self._warned_once_older_version
and version < __protocol_version__
):
logger.warning(
"Devices with outdated NDSI version found. Please update these devices."
)
self._warned_once_older_version = True
elif (
not self._warned_once_newer_version
and version > __protocol_version__
):
logger.warning(
"Devices with newer NDSI version found. You should update."
)
self._warned_once_newer_version = True

elif event.type == "EXIT":
gone_peer = event.peer_uuid.hex
Expand Down

0 comments on commit 0000402

Please sign in to comment.