-
Notifications
You must be signed in to change notification settings - Fork 319
NAVAND-940: fix buildings highlighting #6749
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
Conversation
9194db9
to
4873ca2
Compare
Codecov Report
@@ Coverage Diff @@
## main #6749 +/- ##
=========================================
Coverage 72.54% 72.54%
Complexity 5521 5521
=========================================
Files 772 772
Lines 29888 29888
Branches 3531 3531
=========================================
Hits 21682 21682
Misses 6793 6793
Partials 1413 1413 |
5c5f22d
to
0af4bcb
Compare
0af4bcb
to
1509cd8
Compare
val waypointIndex = action.progress.currentLegProgress?.legIndex!! + 1 | ||
val waypoint = waypoints.filter { it.isLegWaypoint() }.getOrNull(waypointIndex) | ||
return BuildingResult.GetDestination(waypoint?.target ?: waypoint?.location) | ||
val routeOptions = action.progress.route.routeOptions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the intention of doing this changed is EV waypoints, that added implicitly and this logic is not working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly is not working? I don't see anything here that would be affected by adding EV waypoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RingerJK could you demonstrate the issue with a unit test?
It seems we're trying to get this into the 2.10.0-rc.1, and it'd be nice to release that soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me provide the sample:
- the SDK requested an EV route with 2 waypoints (origin and destination);
- received the route with an additional waypoint in the middle (EV waypoint);
- so we have the route with 3 waypoints, 2 legs, but originally we requested 1 leg route (2 waypoints)
- as soon as we start to work with requested waypoints (RouteOptions) we get inconsistency because
routeProgerss#legIndex == 1
is actually not the destination, it's the EV waypoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have 2 APIs: queryBuildingOnWaypoint
and queryBuildingOnFinalDestination
. In the example provided above, I would guess that queryBuildingOnWaypoint
would be triggered when the user reaches the 1st waypoint and queryBuildingOnFinalDestination
will be triggered when they reach the final destination. What am I missing?
cc @RingerJK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, legIndex is also affected.
Then we can't merge it. Thanks, I'll continue investigating tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhishek1508 at my example when you arrive at the first waypoint and try to take waypoint data via queryBuildingOnWaypoint
you will receive data for destination
because the index of destination in RouteOptions
is actually 1
. Does it make sense?
Closing in favour of #6754. |
I basically reverted building related changed from #6005. We don't really deal with waypoints there, only waypoint targets (that have the same size as
RoutesOptions#coordinatesList
). And for these things we use leg index. So nothing waypoint related. All the indices and lists stay valid even after introducing EV waypoints.The question is whether we want to highlight EV chargers. If yes, I think we can do it separately. For now let's fix old behaviour.