-
Notifications
You must be signed in to change notification settings - Fork 2
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
OTP-1458 Provide traveler with continue instruction #268
OTP-1458 Provide traveler with continue instruction #268
Conversation
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.
Can you address the wrong street name, and put back literals in the tests, please.
|
||
return Stream.of( | ||
Arguments.of( | ||
monitoredTrip, | ||
createPoint(firstStepCoords, 1, NORTH_EAST_BEARING), | ||
"IMMEDIATE: Head WEST on Adair Avenue Northeast", |
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.
I think we'll need the plain text to keep track of the kinds of instructions expected. Or, we can further break down the instructions, this one could be a "directional" instruction for instance.
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.
It would be cleaner to further break down the instruction. Also, this way eliminates time zone issues. But I think that is out of scope. Let me know.
|
||
@Override | ||
public String build() { | ||
if (isNotEmpty(legStep) && isNotEmpty(legStep.streetName)) { |
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.
For objects, can we use != null
and for strings, Strings.isBlank
(or what is the rationale for pulling in a new library)?
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.
Updated: 6a1a94a
Locale locale | ||
) { | ||
if (!travelerPosition.expectedLeg.transitLeg && nextStep != null) { | ||
Step currentStep = isPositionPastStep(travelerPosition, nextStep) |
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.
At times, this piece produces the incorrect street name. I'll send an example where the behavior is not what you/d expect.
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.
I've reworked this. Seems to work ok now with the example you provided.
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.
Thanks for the fixes!
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.
This looks good.
Checklist
dev
before they can be merged tomaster
)Description
Provide a "continue on street" reassurance instruction when the traveler is on track, but no immediate instruction is available.