-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GPS: Prepare for New Position Source #11722
Conversation
11b14f5
to
93cf25f
Compare
a437446
to
a41fee2
Compare
53e2a87
to
99cbbd7
Compare
99cbbd7
to
e6f495a
Compare
e6f495a
to
58bb83a
Compare
41b9afc
to
81bceee
Compare
77f8feb
to
bb20531
Compare
I'm concerned about removing the concept of accessing/initializing these managers through the toolbox. This removes the two-phase initialization aspect of these objects. This two phase approach was specifically added because there is ordering required for some of the tools. A specific example is that the SettingsManager must be created first and can only be referenced by other tools in the second phase of their initialization. If GPSManager is removed from the toolbox it means there can be a race condition between it and SettingsManager if GPSManager goes after settings in the constructor for it. If the goal is to remove the toolbox to move to a static instance pattern then the first step needs to be to move SettingsManager to be instance pattern to remove the race condition. I also wonder about the fact that the toolbar provides a level of readability on the code so you a number of the moving parts available all at once. That said though those moving parts are kinda unrelated so I guess there isn't much value there. |
Changing the toolbox part isn't a necessary part of this PR so I can remove that. However, I personally am not a fan of the toolbox paradigm, here are some thoughts:
|
All make sense to be a better way to do things. Could you convert everything over to instance based creation and get rid of toolbox in a separate pull? |
I could, although that would be a large error prone PR probably. Which is why I was going step by step for each tool |
dbc2c54
to
5c88155
Compare
5c88155
to
11a0bdb
Compare
Goal here is to eventually support external GPS in PositionManager, which will significantly help with Follow mode (currently can only use internal Android gps)
Tested on a ZED-F9P
Edit: Following Moved to Part2 PR