View Single Post
Posts: 78 | Thanked: 135 times | Joined on Jul 2012
#226
Originally Posted by sony123 View Post
Ouch, you're right. Thanks for catching this bug.

I found that the return value of Units.getReadableTime(duration) can be in "hr:min" format. This confuses the if (readableDuration.value > 0) loop. Commenting out the sanity checking makes the time display correctly.
Using duration (the raw ttd in seconds) instead of readableDuration.value works as well, and still displays "-" if there is e.g. no GPS lock, as is shows for distance (otherwise you get "-" for distance and "-1" or "0" for ttd, which looks odd).

Patch: http://paste.debian.net/180207/
 

The Following 6 Users Say Thank You to mbanck For This Useful Post: