Add an optional filter for invalid (0 bpm) heart rate readings

This commit is contained in:
frazou
2025-11-16 22:04:02 +01:00
parent c259f9b8bd
commit a3407ccbea
4 changed files with 11 additions and 3 deletions
@@ -161,7 +161,7 @@ class VoiceAnnouncementUtils {
}
Pair<HeartRate, String> heartrate = sensorDataSet.getHeartRate();
if (shouldVoiceAnnounceHeartRateCurrent() && heartrate != null && heartrate.first != null) { //TODO Check has an announcable value?
if (shouldVoiceAnnounceHeartRateCurrent() && heartrate != null && heartrate.first != null && heartrate.first.isValid()) { //TODO Check has an announcable value?
int averageHeartRate = Math.round(heartrate.first.getBPM());
builder.append(" ")