mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Require minimum 7 days of overnight HRV data before calculating baseline status to prevent unreliable POOR status in first few days
This commit is contained in:
+3
-1
@@ -227,7 +227,9 @@ public class ComputedHrvSummarySampleProvider implements TimeSampleProvider<HrvS
|
|||||||
cal.add(Calendar.DATE, -1);
|
cal.add(Calendar.DATE, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overnightAverages.isEmpty()) {
|
// Require at least 7 days of overnight data before calculating a baseline
|
||||||
|
// This prevents unreliable status calculations in the first few days
|
||||||
|
if (overnightAverages.size() < 7) {
|
||||||
return new BaselineValues(0, 0, 0);
|
return new BaselineValues(0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user