use of nodomain.freeyourgadget.gadgetbridge.service.devices.sonyswr12.util.ByteArrayWriter in project Gadgetbridge by Freeyourgadget.
the class ControlPointWithValue method toByteArray.
public final byte[] toByteArray() {
final ByteArrayWriter byteArrayWriter = this.getValueWriter();
byteArrayWriter.appendUint16(this.value);
return byteArrayWriter.getByteArray();
}
use of nodomain.freeyourgadget.gadgetbridge.service.devices.sonyswr12.util.ByteArrayWriter in project Gadgetbridge by Freeyourgadget.
the class ControlPointLowVibration method toByteArray.
public final byte[] toByteArray() {
final UIntBitWriter uIntBitWriter = new UIntBitWriter(16);
uIntBitWriter.append(13, 0);
uIntBitWriter.appendBoolean(this.smartWakeUp);
uIntBitWriter.appendBoolean(this.incomingCall);
uIntBitWriter.appendBoolean(this.notification);
final ByteArrayWriter byteArrayWriter = this.getValueWriter();
byteArrayWriter.appendUint16((int) uIntBitWriter.getValue());
return byteArrayWriter.getByteArray();
}
Aggregations