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

Fixed hard fault on rover_pos_control stop #12501

Merged
merged 4 commits into from
Jul 23, 2019

Conversation

AmeliaEScott
Copy link
Contributor

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.

@AmeliaEScott AmeliaEScott self-assigned this Jul 17, 2019
@AmeliaEScott AmeliaEScott requested a review from dagar July 17, 2019 11:46
@dagar
Copy link
Member

dagar commented Jul 17, 2019

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.

@bkueng
Copy link
Member

bkueng commented Jul 18, 2019

Or look at the template: https://github.com/PX4/Firmware/tree/master/src/templates/module. Also for the parameters.

@AmeliaEScott AmeliaEScott force-pushed the pr-rover-hardfault-fix branch 2 times, most recently from a5232cd to c6255be Compare July 18, 2019 14:31
Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

src/modules/rover_pos_control/RoverPositionControl.cpp Outdated Show resolved Hide resolved
src/modules/rover_pos_control/RoverPositionControl.cpp Outdated Show resolved Hide resolved
src/modules/rover_pos_control/RoverPositionControl.hpp Outdated Show resolved Hide resolved
@AmeliaEScott AmeliaEScott force-pushed the pr-rover-hardfault-fix branch from 106d25e to 2cd6c40 Compare July 19, 2019 07:37
Copy link
Member

@bkueng bkueng left a 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");
Copy link
Member

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.

@bkueng bkueng merged commit 2ed8ebf into PX4:master Jul 23, 2019
@AmeliaEScott AmeliaEScott deleted the pr-rover-hardfault-fix branch July 23, 2019 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants