make use of fixed duration for non tracking statuses#1437
Merged
Conversation
…racking statuses. fixes #1404
danesfeder
approved these changes
Oct 18, 2018
Contributor
danesfeder
left a comment
There was a problem hiding this comment.
@kevinkreiser awesome thanks for taking care of this!
kevinkreiser
commented
Oct 18, 2018
|
|
||
| private static final int ONE_INDEX = 1; | ||
| private static final long ONE_SECOND_IN_MILLISECONDS = 1000L; | ||
| private static final double ONE_SECOND_IN_MILLISECONDS = 1000.0; |
Contributor
Author
There was a problem hiding this comment.
using double here so we dont truncate below. not sure if we really need subsecond accuracy, but its there if we need 😄
This was referenced Oct 19, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #1404
This uses the latest native release to fix the issue regarding ETA when the user isn't navigating on the route, either after having just loaded the road (initialized status), just having completed the route (complete status) or having gone off route (offroute status). The initialized status will hold a duration that is that of the entire loaded route leg and will update once you beging tracking on the route. For complete the duration will be 0 and for off route the duration should be the last duration you saw before you went off route.