mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-07-03 11:33:19 +02:00
Charts: Ignore heart rate data if sample indicates that the device was not worn
Closes #1005
This commit is contained in:
parent
238bacde9f
commit
0ea5c3dee1
|
@ -509,7 +509,7 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
|
|||
}
|
||||
activityEntries.add(createLineEntry(value, ts));
|
||||
}
|
||||
if (hr && isValidHeartRateValue(sample.getHeartRate())) {
|
||||
if (hr && sample.getKind() != ActivityKind.TYPE_NOT_WORN && isValidHeartRateValue(sample.getHeartRate())) {
|
||||
if (lastHrSampleIndex > -1 && ts - lastHrSampleIndex > 1800*HeartRateUtils.MAX_HR_MEASUREMENTS_GAP_MINUTES) {
|
||||
heartrateEntries.add(createLineEntry(0, lastHrSampleIndex + 1));
|
||||
heartrateEntries.add(createLineEntry(0, ts - 1));
|
||||
|
|
Loading…
Reference in New Issue
Block a user