Skip to content

Commit

Permalink
Merge pull request #17 from kinemic/fix_mag_lower
Browse files Browse the repository at this point in the history
Bugfix: _get_power_preset was missing a .lower()
  • Loading branch information
hbldh committed Sep 13, 2016
1 parent c46edd5 commit c4b6bf6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pymetawear/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
from pymetawear.utils import IS_64_BIT

# Version information.
__version__ = '0.5.0a1'
__version__ = '0.5.0a2'
version = __version__ # backwards compatibility name
version_info = (0, 5, 0, 'a1')
version_info = (0, 5, 0, 'a2')

if os.environ.get('METAWEAR_LIB_SO_NAME') is not None:
libmetawear = cdll.LoadLibrary(os.environ["METAWEAR_LIB_SO_NAME"])
Expand Down
2 changes: 1 addition & 1 deletion pymetawear/modules/magnetometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def data_signal(self):

def _get_power_preset(self, value):
if value.lower() in self.power_presets:
return self.power_presets.get(value)
return self.power_presets.get(value.lower())
else:
raise ValueError("Requested power preset ({0}) was not part of "
"possible values: {1}".format(value.lower(), [self.power_presets.keys()]))
Expand Down

0 comments on commit c4b6bf6

Please sign in to comment.