Skip to content
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

removed non used _getMaxCruiseSpeed #11615

Merged
merged 1 commit into from
Mar 10, 2019

Conversation

BazookaJoe1900
Copy link
Member

@BazookaJoe1900 BazookaJoe1900 commented Mar 10, 2019

as part of doing some cleanups of parameters related code, this line has jumped, as a dead code that can be removed.
in order to '_getMaxCruiseSpeed' we can just use MPC_XY_CRUISE.get()

@@ -87,7 +87,6 @@ class FlightTaskAuto : public FlightTask

protected:
void _setDefaultConstraints() override;
float _getMaxCruiseSpeed() {return MPC_XY_CRUISE.get();} /**< getter for default cruise speed */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkueng @dagar Has the param abstraction been audited for runtime performance when being used in tight control loops? The previous design with locally cached variables was a deliberate choice.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LorenzMeier in this point there is still dead code that can be removed.
you might want to refer your question to this point of the code:
https://github.com/PX4/Firmware/blob/1638a1cb45c18cd6f4af89bee58b8dd2b30f8c51/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp#L409

I am more than agree that the param abstraction mechanism must be more real-time oriented, than "code simplicity" oriented

Copy link
Member

@dagar dagar Mar 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dagar dagar merged commit 8947cb5 into PX4:master Mar 10, 2019
@BazookaJoe1900 BazookaJoe1900 deleted the cleanup_getMaxCruiseSpeed branch March 10, 2019 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants