1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 18:15:49 +01:00

Show the measured heart rate as a Toast, for now #178

This commit is contained in:
cpfeiffer 2016-02-27 23:27:15 +01:00
parent 540e008548
commit d7822d07a6

View File

@ -731,7 +731,8 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
public void logHeartrate(byte[] value) {
LOG.info("Got heartrate:");
if (value.length == 2 && value[0] == 6) {
LOG.info("Heartrate: " + (value[1] & 0xff));
int hrValue = (value[1] & 0xff);
GB.toast(getContext(), "Heart Rate measured: " + hrValue, Toast.LENGTH_LONG, GB.INFO);
} else {
logMessageContent(value);
}