Battery charging in python

edited January 2019 in Python

Is it possible to access to battery charging with python library? I'm currently unable to do so.

from mbientlab.metawear import MetaWear, libmetawear

device = MetaWear('E6:0D:75:07:25:43')
device.connect()

print("Connected to " + device.address)

board = device.board

libmetawear.mbl_mw_settings_get_charge_status_data_signal(board)

Gives me as output:

error 1547120460.383735: Error on line: 296 (src/blestatemachine.cc): Operation now in progress
Connected to E6:0D:75:07:25:43
Traceback (most recent call last):
  File "/home/Macro_Mbientlab/MetaWear-SDK-Python-master/examples/battery_charging.py", line 10, in <module>
    print(libmetawear.mbl_mw_settings_get_charge_status_data_signal(board))
  File "/usr/lib/python3.5/ctypes/__init__.py", line 360, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.5/ctypes/__init__.py", line 365, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/python3.5/dist-packages/mbientlab/metawear/libmetawear.so: undefined symbol: mbl_mw_settings_get_charge_status_data_signal

pip freeze gives me metawear==0.6.2

Thanks

Comments

  • edited January 2019

    You will in the best release.

  • Any idea on when this may happen?

  • No hard date, it will be sometime in January.

    If you need the features now, do a dummy commit with the C++ submodule updated to v0.18.0, then install from the updated Git repo.

Sign In or Register to comment.