1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-21 07:51:46 +02:00

Log weight while measuring

This commit is contained in:
Erik Johansson
2018-04-30 00:19:32 +02:00
parent 85e738c8b2
commit 61649dec95

View File

@@ -471,15 +471,15 @@ public class BluetoothBeurerSanitas extends BluetoothCommunication {
} }
if ((data[0] & 0xFF) == startByte && (data[1] & 0xFF) == 0x58) { if ((data[0] & 0xFF) == startByte && (data[1] & 0xFF) == 0x58) {
Timber.d("Active measurement");
float weight = getKiloGram(data, 3); float weight = getKiloGram(data, 3);
if ((data[2] & 0xFF) != 0x00) { if ((data[2] & 0xFF) != 0x00) {
// temporary value; // temporary value;
Timber.d("Active measurement, weight: %.2f", weight);
sendMessage(R.string.info_measuring, weight); sendMessage(R.string.info_measuring, weight);
return; return;
} }
Timber.i("Got weight: %.2f", weight); Timber.i("Active measurement, stable weight: %.2f", weight);
writeBytes(new byte[]{ writeBytes(new byte[]{
(byte) startByte, (byte) 0xf1, (byte) (data[1] & 0xFF), (byte) startByte, (byte) 0xf1, (byte) (data[1] & 0xFF),