-
Notifications
You must be signed in to change notification settings - Fork 13.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
Clean up Transition Flighttask #24126
Conversation
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: -424 byte (-0.02 %)]
px4_fmu-v6x [Total VM Diff: -408 byte (-0.02 %)]
Updated: 2024-12-19T14:27:10 |
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.
Nice cleanup, impressive that that saved 400 bytes.
I only have one comment, and otherwise looked at the code plus tried to break it in simulation without success.
src/modules/flight_mode_manager/tasks/Transition/FlightTaskTransition.cpp
Outdated
Show resolved
Hide resolved
src/modules/flight_mode_manager/tasks/Transition/FlightTaskTransition.cpp
Show resolved
Hide resolved
54da80c
to
bb31767
Compare
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 initiative and diligent work!
Solved Problem
Follow-up to #23731
When looking for flash savings I realized flight task transition now uses 1.5+ kilobytes of flash which is completely useless on flash-constrained boards that do not support VTOLs so I thought about removing the task from flash constrained builds but we don't have a mechanism to enforce that no one will ever build a target with VTOL support but no transition flight task then.
After investigating this I was wondering why the transition task is so big now and cleaned up the logic while going through it.
Solution
First commit should be refactor as in:
param_get()
functionThe only intentional behavior change:
Changelog Entry
Test coverage
Honestly I cannot test my changes since I don't know how it should look like. @sfuhrer would you be able to verify it still works as intended?