mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
Fix for bug 1087: (Voice Announcements for Pace in min/mi broken).
Voice announcements were always reporting 0 minutes 0 seconds if system was configured for Pace. Bug was caused by an incorrect cast of variable 'speed' to long (speed is a double). The casting was resulting in the variable 'speed' being changed to 0. http://code.google.com/p/mytracks/issues/detail?id=1087
This commit is contained in:
+1
-1
@@ -216,7 +216,7 @@ public class StatusAnnouncerTask implements PeriodicTask {
|
||||
} else {
|
||||
speed = speed == 0 ? 0.0 : 1 / speed;
|
||||
int paceId = metricUnits ? R.string.voice_pace_per_kilometer : R.string.voice_pace_per_mile;
|
||||
rate = context.getString(paceId, getAnnounceTime((long) speed * HOUR_TO_MILLISECOND));
|
||||
rate = context.getString(paceId, getAnnounceTime((long) (speed * HOUR_TO_MILLISECOND)));
|
||||
}
|
||||
|
||||
int totalDistanceId = metricUnits ? R.plurals.voiceTotalDistanceKilometers
|
||||
|
||||
Reference in New Issue
Block a user