-
Notifications
You must be signed in to change notification settings - Fork 325
Break out events #1533
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
Break out events #1533
Conversation
9872c38
to
4d855c2
Compare
…ctly by establishing a `Router` dependency protocol.
…o's to rid Router of tightly-coupled properties
…ving `locationManager` dependency from RouteController entirely.
…represented in a way the JSON serializer could understand
@JThramer Saw an issue with a few drives yesterday where the reroute status view was shown constantly although it never actually needed to reroute nor did it actually end up rerouting. |
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.
A regression has occurred where the puck never moves on a real navigation session -- I suspect this has something to do with the routeController not emitting progress updates.
Issue with rerouting regression has been fixed. Still need to do one more regression test and make sure events are sending okay. |
Didn't mean to approve, just blow away the "Changes Requested." No biggie, we'll just have another approval before merge. |
NotificationCenter.default.addObserver(self, selector: #selector(progressDidChange(notification:)), name: .routeControllerProgressDidChange, object: self) | ||
NotificationCenter.default.addObserver(self, selector: #selector(willReroute(notification:)), name: .routeControllerWillReroute, object: self) | ||
NotificationCenter.default.addObserver(self, selector: #selector(didReroute(notification:)), name: .routeControllerDidReroute, object: self) | ||
NotificationCenter.default.addObserver(self, selector: #selector(didRecieveTerminationWarning), name: .UIApplicationWillTerminate, object: nil) |
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.
Recieve -> Receive
Ends the current navigation session. | ||
*/ | ||
@objc public func endNavigation(feedback: EndOfRouteFeedback? = nil) { | ||
if !didSendCancelEvent { |
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 change would result in under-logging events if RouteController
s are reused. Or is that already well known not to be valid?
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'm asking partly because this is a public method which may imply a certain semantic.
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.
AFAIK, RouteController
is not designed to be reused at this time.
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.
@akitchen hmm, so yeah in talking with @bsudekum , it sounds like it might be possible (although out of design scope) to reuse the RouteController
, possibly by changing RouteController.routeProgress
(as you’re replacing the thing that the Routecontroller is iterating over)… I could reset that flag on routeProgress
’ didSet
as a defensive measure, how's that sound?
…oop upon ending navigation.
🎵 Scooter Gang, Scooter Gang, Scooter Gang... 🎵 🎉 After extensive
I'm going to call this ✅ for purposes of regression-testing telemetry events. |
fba5542
to
ac774ff
Compare
Working towards #1500
routeLegProgress
,applicationState
, andstartTimestamp
RouteController
, and test-drive it into a new private component resembling aRouteControllerEventsDelegate
, who receivesRouteControllerDelegate
messages from theRouteController
, generates telemetry events and other notifications, and passesRouteControllerDelegate
messages onward--
Jerrad's Tasks
Make sure reroute status hides after reroute(Issue cut -- Reroute indication under instruction banner not dismissed beyond display threshold, during simulation mode. #1569)Router
dependency injected as argsendCancelEvent(rating:comments:)
signature is weird, also determine how EORVC feedback works (bad pattern - issue: Events manager should not rely on RouteController.deinit to send arrival messages #1563)dedupe(unacceptable side effects)checkForFasterRoute
andreroute