Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode fix #202

Merged
3 commits merged into from Oct 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/emokit/__init__.py
Expand Up @@ -11,8 +11,8 @@
"""

__title__ = "emokit"
__version__ = "0.0.6"
__build__ = 0x000006
__version__ = "0.0.7"
__build__ = 0x000007
__author__ = "Cody Brocious / Kyle Machulis"
__license__ = "Public Domain, See LICENSE"
__copyright__ = "Copyright (c) 2010-2012, Cody Brocious, Kyle Machulis/Nonpolynomial Labs," \
Expand Down
14 changes: 8 additions & 6 deletions python/emokit/util.py
Expand Up @@ -146,19 +146,21 @@ def device_is_emotiv(device, platform):
try:
if platform != 'Windows':
product_name = unicode(device.product_string)
vendor_name = unicode(device.manufacturer_string)
else:
product_name = unicode(device.product_name)
if "Emotiv" in device.vendor_name:
vendor_name = unicode(device.vendor_name)
if u"emotiv" in vendor_name.lower():
is_emotiv = True
if "Emotiv" in product_name:
if u"emotiv" in product_name.lower():
is_emotiv = True
if "EPOC" in product_name:
if u"epoc" in product_name.lower():
is_emotiv = True
if "Brain Waves" in product_name:
if u"brain waves" in product_name.lower():
is_emotiv = True
if product_name == '00000000000':
if product_name == u'00000000000':
is_emotiv = True
if "EEG Signals" in product_name:
if u"eeg signals" in product_name.lower():
is_emotiv = True
except Exception as ex:
print("Emotiv IsEmotivError ", sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2], " : ", ex)
Expand Down