Skip to content

Commit

Permalink
[bugfix] fix of cant get true packet type on python3
Browse files Browse the repository at this point in the history
  • Loading branch information
Shoji Imamura committed May 14, 2018
1 parent 42b61d8 commit 3d5f819
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ sudo pip3 install pygattlib
### 補遺2 インストール

```shell
sudo pip3 install https://github.com/isaaxug/omron_envsensor/archive/0.0.0.zip
sudo pip3 install https://github.com/isaaxug/omron_envsensor/archive/0.0.1.zip
```

2 changes: 1 addition & 1 deletion omron_envsensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
from __future__ import absolute_import

__version__ = '0.0.0'
__version__ = '0.0.1'

from logging import getLogger, NullHandler
logger = getLogger('omron_envsensor')
Expand Down
4 changes: 2 additions & 2 deletions omron_envsensor/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def get_companyid(pkt):

# classify beacon type sent from the sensor
def classify_beacon_packet(report):
if report["payload_binary"][29:31] in ['IM', u'IM']:
if report["payload_binary"][29:31] in ['IM', b'IM']:
return "IM"
elif report["payload_binary"][29:31] in ['EP', u'EP']:
elif report["payload_binary"][29:31] in ['EP', b'EP']:
return "EP"
return "UNKNOWN"

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name = "omron_envsensor",
version = omron_envsensor.__version__,
description = ("OMRON 2JCIE-BL01 SENSOR"),
packages = [""],
packages = ['pybluez', 'pygattlib'],
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit 3d5f819

Please sign in to comment.