Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send departure event with a valid distance traveled #789

Merged
merged 2 commits into from
Mar 22, 2018
Merged

Conversation

danesfeder
Copy link
Contributor

Forcing the first location update caused the departure event to fire without a valid location. So departure events were firing from null island 0,0. This PR adds a check to ensure we have a valid distance traveled before we send the event.

@danesfeder danesfeder added bug Defect to be fixed. navigation-core labels Mar 20, 2018
@danesfeder danesfeder self-assigned this Mar 20, 2018
if (navigationSessionState.startTimestamp() == null) {
boolean isValidDeparture = navigationSessionState.startTimestamp() == null
&& routeProgress.currentLegProgress().distanceTraveled() > 0;
if (isValidDeparture) {
// Set departure timestamp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary comment.

@danesfeder danesfeder merged commit e1dd605 into master Mar 22, 2018
@danesfeder danesfeder deleted the dan-telem-bug branch March 22, 2018 13:45
@danesfeder danesfeder mentioned this pull request Apr 3, 2018
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants