mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
[Wena3/BUG] BodyPropertiesSetting: height then weight on the wire, not the other way around
This commit is contained in:
parent
51fbdaaaab
commit
488af72341
@ -25,15 +25,15 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.wena3.protocol.
|
||||
public class BodyPropertiesSetting implements Wena3Packetable {
|
||||
public final GenderSetting gender;
|
||||
public final short yearOfBirth;
|
||||
public final short monthOfBirth;
|
||||
public final short monthOfBirthZeroIndexed;
|
||||
public final short dayOfBirth;
|
||||
public final short height;
|
||||
public final short weight;
|
||||
|
||||
public BodyPropertiesSetting(GenderSetting gender, short yearOfBirth, short monthOfBirth, short dayOfBirth, short height, short weight) {
|
||||
public BodyPropertiesSetting(GenderSetting gender, short yearOfBirth, short monthOfBirthZeroIndexed, short dayOfBirth, short height, short weight) {
|
||||
this.gender = gender;
|
||||
this.yearOfBirth = yearOfBirth;
|
||||
this.monthOfBirth = monthOfBirth;
|
||||
this.monthOfBirthZeroIndexed = monthOfBirthZeroIndexed;
|
||||
this.dayOfBirth = dayOfBirth;
|
||||
this.height = height;
|
||||
this.weight = weight;
|
||||
@ -46,7 +46,7 @@ public class BodyPropertiesSetting implements Wena3Packetable {
|
||||
.put((byte) 0x1D)
|
||||
.put((byte) gender.ordinal())
|
||||
.putShort(yearOfBirth)
|
||||
.put((byte) (monthOfBirth + 1)) // Java uses 0-indexed months
|
||||
.put((byte) (monthOfBirthZeroIndexed + 1)) // Java uses 0-indexed months
|
||||
.put((byte) dayOfBirth)
|
||||
.putShort((short) (height * 10))
|
||||
.putShort((short) (weight * 10))
|
||||
|
Loading…
Reference in New Issue
Block a user