mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
Xiaomi: Further sleep parsing fix
This commit is contained in:
parent
b0ff9eae88
commit
cf0e8be816
@ -85,7 +85,10 @@ public class SleepDetailsParser extends XiaomiActivityParser {
|
||||
final int count = buf.getShort();
|
||||
|
||||
if (count > 0) {
|
||||
// If version is less than 2 firstRecordTime is bedTime
|
||||
if (fileId.getVersion() >= 2) {
|
||||
final int firstRecordTime = buf.getInt();
|
||||
}
|
||||
|
||||
// Skip count samples - each sample is a u8
|
||||
// timestamp of each sample is firstRecordTime + (unit * index)
|
||||
@ -99,7 +102,10 @@ public class SleepDetailsParser extends XiaomiActivityParser {
|
||||
final int count = buf.getShort();
|
||||
|
||||
if (count > 0) {
|
||||
// If version is less than 2 firstRecordTime is bedTime
|
||||
if (fileId.getVersion() >= 2) {
|
||||
final int firstRecordTime = buf.getInt();
|
||||
}
|
||||
|
||||
// Skip count samples - each sample is a u8
|
||||
// timestamp of each sample is firstRecordTime + (unit * index)
|
||||
@ -113,7 +119,10 @@ public class SleepDetailsParser extends XiaomiActivityParser {
|
||||
final int count = buf.getShort();
|
||||
|
||||
if (count > 0) {
|
||||
// If version is less than 2 firstRecordTime is bedTime
|
||||
if (fileId.getVersion() >= 2) {
|
||||
final int firstRecordTime = buf.getInt();
|
||||
}
|
||||
|
||||
// Skip count samples - each sample is a float
|
||||
// timestamp of each sample is firstRecordTime + (unit * index)
|
||||
|
Loading…
Reference in New Issue
Block a user