It computes the average for heart rate, cadence, and power (duration-based average) and the maximum for heart rate and cadence.

This commit is contained in:
Román Martínez
2021-02-20 18:32:47 +01:00
parent d90258294f
commit edf4ccc941
7 changed files with 490 additions and 25 deletions
@@ -16,7 +16,7 @@ public class SensorStatistics {
}
public boolean hasHeartRate() {
return maxHr != null;
return avgHr != null && maxHr != null;
}
public float getMaxHeartRate() {
@@ -28,7 +28,7 @@ public class SensorStatistics {
}
public boolean hasCadence() {
return maxCadence != null;
return avgCadence != null && maxCadence != null;
}
public float getMaxCadence() {