Add logging of heartrate values #318

here
cpfeiffer 2016-06-05 22:37:42 +02:00
parent cb4dcf9fa6
commit 2b6ee41970
1 changed files with 3 additions and 0 deletions

View File

@ -853,6 +853,9 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
private void handleHeartrate(byte[] value) {
if (value.length == 2 && value[0] == 6) {
int hrValue = (value[1] & 0xff);
if (LOG.isDebugEnabled()) {
LOG.debug("heart rate: " + hrValue);
}
Intent intent = new Intent(DeviceService.ACTION_HEARTRATE_MEASUREMENT)
.putExtra(DeviceService.EXTRA_HEART_RATE_VALUE, hrValue)
.putExtra(DeviceService.EXTRA_TIMESTAMP, System.currentTimeMillis());