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