mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-09 03:37:03 +01:00
Garmin: Allow HRV summary status to be null
We may have the averages, but not the status.
This commit is contained in:
parent
b33ab0b1c8
commit
b616cc8ff1
@ -190,10 +190,6 @@ public class FitImporter {
|
||||
timesInZone.add((FitTimeInZone) record);
|
||||
} else if (record instanceof FitHrvSummary) {
|
||||
final FitHrvSummary hrvSummary = (FitHrvSummary) record;
|
||||
final FieldDefinitionHrvStatus.HrvStatus status = hrvSummary.getStatus();
|
||||
if (status == null) {
|
||||
continue;
|
||||
}
|
||||
LOG.trace("HRV summary at {}: {}", ts, record);
|
||||
final GarminHrvSummarySample sample = new GarminHrvSummarySample( );
|
||||
sample.setTimestamp(ts * 1000L);
|
||||
@ -203,7 +199,10 @@ public class FitImporter {
|
||||
sample.setBaselineLowUpper(hrvSummary.getBaselineLowUpper());
|
||||
sample.setBaselineBalancedLower(hrvSummary.getBaselineBalancedLower());
|
||||
sample.setBaselineBalancedUpper(hrvSummary.getBaselineBalancedUpper());
|
||||
sample.setStatusNum(status.getId());
|
||||
final FieldDefinitionHrvStatus.HrvStatus status = hrvSummary.getStatus();
|
||||
if (status != null) {
|
||||
sample.setStatusNum(status.getId());
|
||||
}
|
||||
hrvSummarySamples.add(sample);
|
||||
} else if (record instanceof FitHrvValue) {
|
||||
final FitHrvValue hrvValue = (FitHrvValue) record;
|
||||
|
Loading…
Reference in New Issue
Block a user