1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-31 03:59:56 +02:00

Fix typo (data is in little endian format)

This commit is contained in:
Erik Johansson
2018-07-06 07:01:21 +02:00
parent 269cbae1cc
commit 273c347426

View File

@@ -137,7 +137,7 @@ public class BluetoothOneByone extends BluetoothCommunication {
}
private void parseBytesOld(byte[] weightBytes) {
float weight = Converters.fromUnsignedInt16Be(weightBytes, 3) / 100.0f;
float weight = Converters.fromUnsignedInt16Le(weightBytes, 3) / 100.0f;
boolean done = (weightBytes[9] & 0xff) == 0;
Timber.d("weight: %.2f%s", weight, done ? " (done)" : "");