mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 01:21:56 +01:00
Huami: Fix stress timestamp off by 1 minute
This commit is contained in:
parent
29bf03dceb
commit
ed3ce6fa9d
@ -56,8 +56,6 @@ public class FetchStressAutoOperation extends AbstractRepeatingFetchOperation {
|
|||||||
final List<HuamiStressSample> samples = new ArrayList<>();
|
final List<HuamiStressSample> samples = new ArrayList<>();
|
||||||
|
|
||||||
for (byte b : bytes) {
|
for (byte b : bytes) {
|
||||||
timestamp.add(Calendar.MINUTE, 1);
|
|
||||||
|
|
||||||
if (b == -1) {
|
if (b == -1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -75,8 +73,12 @@ public class FetchStressAutoOperation extends AbstractRepeatingFetchOperation {
|
|||||||
sample.setType(StressSample.Type.AUTOMATIC);
|
sample.setType(StressSample.Type.AUTOMATIC);
|
||||||
sample.setStress(stress);
|
sample.setStress(stress);
|
||||||
samples.add(sample);
|
samples.add(sample);
|
||||||
|
|
||||||
|
timestamp.add(Calendar.MINUTE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timestamp.add(Calendar.MINUTE, -1);
|
||||||
|
|
||||||
return persistSamples(samples);
|
return persistSamples(samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user