mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-07 11:53:07 +02:00
Add an optional filter for invalid (0 bpm) heart rate readings
This commit is contained in:
+1
-1
@@ -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(" ")
|
||||
|
||||
Reference in New Issue
Block a user