mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-17 21:06:48 +01:00
Add logging of heartrate values #318
This commit is contained in:
parent
cb4dcf9fa6
commit
2b6ee41970
@ -853,6 +853,9 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
|
|||||||
private void handleHeartrate(byte[] value) {
|
private void handleHeartrate(byte[] value) {
|
||||||
if (value.length == 2 && value[0] == 6) {
|
if (value.length == 2 && value[0] == 6) {
|
||||||
int hrValue = (value[1] & 0xff);
|
int hrValue = (value[1] & 0xff);
|
||||||
|
if (LOG.isDebugEnabled()) {
|
||||||
|
LOG.debug("heart rate: " + hrValue);
|
||||||
|
}
|
||||||
Intent intent = new Intent(DeviceService.ACTION_HEARTRATE_MEASUREMENT)
|
Intent intent = new Intent(DeviceService.ACTION_HEARTRATE_MEASUREMENT)
|
||||||
.putExtra(DeviceService.EXTRA_HEART_RATE_VALUE, hrValue)
|
.putExtra(DeviceService.EXTRA_HEART_RATE_VALUE, hrValue)
|
||||||
.putExtra(DeviceService.EXTRA_TIMESTAMP, System.currentTimeMillis());
|
.putExtra(DeviceService.EXTRA_TIMESTAMP, System.currentTimeMillis());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user