gpt4 book ai didi

android - AmazFit Bip watch - 心率

转载 作者:行者123 更新时间:2023-11-29 02:25:20 26 4
gpt4 key购买 nike

我想在我自己的应用程序中显示 AmazFit Bip Watch 的心率值。

UUID:

00002a37-0000-1000-8000-00805f9b34fb

示例字节数组:

byte[0] = 0
byte[1] = 70

字节数组的计算值:

if (value.length == 2 && value[0] == 0) {
final int hrValue = (value[1] & 0xff);
}

问题:无论我在 watch 上看到什么,我都没有得到正确的值。我希望在我的应用程序中获得我在 watch 中看到的精确值。我提到了Gadgetbridge项目。


我们将不胜感激任何帮助。

最佳答案

尝试以下任一代码:

Byte b = byte[1];
final int hrValue = b.intValue();

或者使用如下的 Byte 构造函数:

Byte b = new Byte(byte[1]);
final int hrValue = b.intValue();

感谢byte to int

关于android - AmazFit Bip watch - 心率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52566424/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com