miband2-python-test icon indicating copy to clipboard operation
miband2-python-test copied to clipboard

Heart Rate Limit

Open jasperan opened this issue 7 years ago • 0 comments

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)

jasperan avatar Sep 12 '18 11:09 jasperan