1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-12 16:34:04 +02:00

Add logging of heartrate values #318

This commit is contained in:
cpfeiffer 2016-06-05 22:37:42 +02:00
parent cb4dcf9fa6
commit 2b6ee41970

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());