Skip to content

Fix no announcements on first step after reroute - #478

Merged
danesfeder merged 3 commits into
masterfrom
dan-reroute-voice-fix
Nov 13, 2017
Merged

danesfeder merged 3 commits into
masterfrom
dan-reroute-voice-fix

Conversation

@danesfeder

Copy link
Copy Markdown
Contributor
  • Fixes issue with VoiceInstructionMilestone not detecting a new DirectionsRoute after a reroute.
    • The previous and current route progress have the same route geometries on the first update after a reroute
  • This PR caches the current LegStep and current DirectionsRoute and checks against them each update

@danesfeder danesfeder added the bug Defect to be fixed. label Nov 9, 2017
@danesfeder danesfeder self-assigned this Nov 9, 2017
private boolean newStep(RouteProgress previousRouteProgress, RouteProgress routeProgress) {
return previousRouteProgress.currentLegProgress().stepIndex()
< routeProgress.currentLegProgress().stepIndex();
private boolean newRoute(RouteProgress routeProgress) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Any reason for not adjusting this in RouteUtils instead?

* @param routeProgress provides updated step information
* @return true if new step, false if not
*/
private boolean newStep(RouteProgress routeProgress) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why not add this to RouteUtils?

@danesfeder danesfeder Nov 10, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@cammace both newRoute()and newStep() require a class field LegStep or DirectionsRoute that we wouldn't be able to cache in the Util class because it's static right?

@danesfeder
danesfeder merged commit ba61f23 into master Nov 13, 2017
@danesfeder
danesfeder deleted the dan-reroute-voice-fix branch November 13, 2017 16:22
@danesfeder danesfeder mentioned this pull request Nov 13, 2017
9 tasks done
Grsmto pushed a commit to Grsmto/mapbox-navigation-android that referenced this pull request Nov 14, 2017
…android into fix-build

* 'master' of https://github.com/mapbox/mapbox-navigation-android:
  Bumped version number to 0.7.0 in readme (mapbox#496)
  Release 0.7.0  (mapbox#497)
  Portrait / landscape layouts are different. Only cast to View (mapbox#494)
  Add missing javadoc for feedback methods in MapboxNavigation (mapbox#493)
  Update lane stylekit and then maneuver bias (mapbox#492)
  Fix bug with bottom sheet behavior null onConfigChange (mapbox#490)
  Fix issue where new route was not being detected (mapbox#478)
  Add telem absolute distance to destination track support (mapbox#427)
  Adjust Instruction Content Layout XML (mapbox#465)
  Fix bug with bottomsheet not hiding in night mode (mapbox#483)
  Cleanup / javadoc (mapbox#479)
  Initialize click listeners after presenter / viewmodel is set (mapbox#481)
  Create SpanUtil and SpanItem to more easily format Strings for our views (mapbox#477)
  Check for null or empty String speechUrl before playing (mapbox#475)
  Update location layer to 0.2.0 and re-add as lifecycle observer (mapbox#473)
  Check for null raw location before setting bearing (mapbox#476)

# Conflicts:
#	libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationMetricsWrapper.java
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.

3 participants