mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-12 01:51:58 +01:00
Added Request
This commit is contained in:
parent
57e28c2dd0
commit
8775255d69
@ -1,6 +1,7 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests;
|
||||
|
||||
import android.bluetooth.BluetoothGattCharacteristic;
|
||||
import android.util.Log;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
@ -17,9 +18,20 @@ public class GetCountdownSettingsRequest extends Request {
|
||||
return;
|
||||
}
|
||||
ByteBuffer buffer = ByteBuffer.wrap(value);
|
||||
int startTime = buffer.getInt(3);
|
||||
int endTime = buffer.getInt(7);
|
||||
long startTime = j(buffer.getInt(3));
|
||||
long endTime = j(buffer.getInt(7));
|
||||
byte progress = buffer.get(13);
|
||||
short offset = buffer.getShort(11);
|
||||
short progress = buffer.getShort(13);
|
||||
|
||||
Log.d("countdown", "progress: " + progress);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static long j(final int n) {
|
||||
if (n < 0) {
|
||||
return 4294967296L + n;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user