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

here
cpfeiffer 2016-02-27 23:27:15 +01:00
parent 540e008548
commit d7822d07a6
1 changed files with 2 additions and 1 deletions

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