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:
@@ -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)" : "");
|
||||
|
Reference in New Issue
Block a user