miband2-python-test
miband2-python-test copied to clipboard
Heart Rate Limit
There is a problem in lines:
if arg.heart:
print("Cont. HRM start")
band.hrmStopContinuous()
band.hrmStartContinuous()
for i in range(30):
band.waitForNotifications(1.0)
More specifically:
for i in range(30):
band.waitForNotifications(1.0)
There are only ten requests that come. After that, the heart rate monitoring stops.
I fixed it easily by editing this into this code:
while True:
band.hrmStopContinuous()
band.hrmStartContinuous()
for i in range(10):
band.waitForNotifications(1.0)