-
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
Fixed hard fault on rover_pos_control stop #12501
Conversation
It's probably worth switching this over entirely to ModuleBase to fix these problems. Take a look at the current FW position or attitude controllers as an example. |
Or look at the template: https://github.com/PX4/Firmware/tree/master/src/templates/module. Also for the parameters. |
a5232cd
to
c6255be
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 refactoring.
Can you remove these as well:
- https://github.com/PX4/Firmware/blob/106d25eab2d413cd00ed59032c083c916234b719/src/modules/rover_pos_control/RoverPositionControl.cpp#L50
- https://github.com/PX4/Firmware/blob/106d25eab2d413cd00ed59032c083c916234b719/src/modules/rover_pos_control/RoverPositionControl.cpp#L66
And call perf_free
in the destructor: https://github.com/PX4/Firmware/blob/106d25eab2d413cd00ed59032c083c916234b719/src/modules/rover_pos_control/RoverPositionControl.cpp#L73.
106d25e
to
2cd6c40
Compare
2cd6c40
to
90b9479
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.
All good, let's merge.
@@ -503,102 +428,85 @@ RoverPositionControl::task_main() | |||
orb_unsubscribe(_pos_sp_triplet_sub); | |||
orb_unsubscribe(_vehicle_attitude_sub); | |||
|
|||
_task_running = false; | |||
|
|||
warnx("exiting.\n"); |
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.
fyi you can remove that as well, and warnx
is deprecated, PX4_{WARN,INFO,ERR}
is used instead.
Describe problem solved by the proposed pull request
When running the command
rover_pos_control stop
, it hard-faults.Test data / coverage
Stopped and started
rover_pos_control
several times to make sure it did not hard-fault.Describe your preferred solution
An object was being double-deleted. That has been fixed.