1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 13:26:50 +01:00

added SetCountdownSettings Request (with buff)

This commit is contained in:
dakhnod 2019-07-23 22:26:51 +02:00
parent 9d251d99d2
commit 57e28c2dd0

View File

@ -0,0 +1,26 @@
package nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests;
import java.nio.ByteBuffer;
public class SetCountdownSettings extends Request {
public SetCountdownSettings(int startTime, int endTime, short offset) {
ByteBuffer buffer = createBuffer();
buffer.putInt(startTime);
buffer.putInt(endTime);
buffer.putShort(offset);
// buff
this.data = buffer.array();
}
@Override
public byte[] getStartSequence() {
return new byte[]{2, 19, 1};
}
@Override
public int getPayloadLength() {
return 13;
}
}