-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
FlightTasks Refactor #12492
Comments
Sounds good. Some smaller changes into that direction are already in #12072 and will hopefully not create too much conflicts with someone else starting to refactor. I'll try to really bring it into a mergable state now before it explodes. |
@MaEtUgR I presume the new docs come after this? Perhaps we should just create a placeholder doc and link your presentation from devday for now? |
yep. the refactor will also not happen within one day and will also not make the presentation obsolete. It is more about aligning on an overall structure such that new tasks follow the new idea instead of copying the existing framework. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
is resolved in 7e78eed The other points are definitely needed moving forward to scale the setup and make it more modular. Especially the library over inheritance strategy e.g. with FlightTaskManualAltitude getting more and more of a kitchen sink task accumulating logic to inherit. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
We fixed quite a couple of issues in the last years, let's re-open an issue with up-to-date tasks |
Given that FlightTasks library does not contain too many tasks yet, it makes sense to do a small refactor rather sooner than late based on the feedback that was received.
Originally the FlightTasks library was designed to simplify the process of adding a new flight maneuver without having to change the already existing tasks. Unfortunately, two implementation strategies evolved:
1.) functionality was shared via inheritance
Initially, it seemed to be a good idea to exploit inheritance for tasks which are similar in nature. However, often only one small part of an existing task needed to change for a "new" task that could not solely be resolved with inheritance but rather was resolved by duplicating the code or add another if-statement. In addition, inheritance made code readability much more difficult.
2.) sharing functionality via utility-classes/functions
This is the preferred way to share functionalities because it simplifies the process of creating new tasks by not having to mess around with existing tasks.
The current state of the FlightTasks library has the following issues:
short-term suggestions
update
-method to be overwrittenThe text was updated successfully, but these errors were encountered: