1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-31 20:11:58 +02:00

Fix Senssun gender byte, remove unnecessary casts (#462)

This commit is contained in:
quthla
2019-05-03 09:14:18 +02:00
committed by OliE
parent 049e9698aa
commit ad850170fa

View File

@@ -233,7 +233,7 @@ public class BluetoothSenssun extends BluetoothCommunication {
byte message[] = new byte[]{(byte)0xA5, (byte)0x10, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00};
//message[2] = (byte)((selectedUser.getGender().isMale() ? (byte)0x80: (byte)0x00) + 1+selectedUser.getId());
message[2] = (byte) ((byte)(selectedUser.getGender().isMale()?(byte)0:(byte)8)*(byte)16 + (byte)selectedUser.getId());
message[2] = (byte) ((selectedUser.getGender().isMale() ? 15 : 0) * 16 + selectedUser.getId());
message[3] = (byte)selectedUser.getAge();
message[4] = (byte)selectedUser.getBodyHeight();