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

Disable camera trigger in Return mode #13983

Closed
wants to merge 1 commit into from
Closed

Conversation

moreba1
Copy link
Contributor

@moreba1 moreba1 commented Jan 19, 2020

@Antiheavy
Copy link
Contributor

I wonder if the reason the original function was not working in some RTL modes is that RTL_TYPE 1 and 2 remain in Mission Mode internally?
https://github.com/PX4/Firmware/blob/3e90cbe6868d0dfb0d1c4c72faf7dd15988cfa6c/src/modules/navigator/mission.cpp#L137-L146

Will this "unpause" function still work with this new PR?
https://github.com/PX4/Firmware/blob/3e90cbe6868d0dfb0d1c4c72faf7dd15988cfa6c/src/modules/navigator/mission.cpp#L165-L171

Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

I would say that makes sense.

Have you tested it @moreba1?

@moreba1
Copy link
Contributor Author

moreba1 commented Jan 24, 2020

I would say that makes sense.

Have you tested it @moreba1?

No , i have not tested it .

@julianoes
Copy link
Contributor

@Antiheavy you might be correct, yes.

Would be good if you could verify that this actually works correctly for you @moreba1.

@julianoes
Copy link
Contributor

@moreba1 this is pending testing.

@moreba1
Copy link
Contributor Author

moreba1 commented Mar 26, 2020

@julianoes I can not test it.

@LorenzMeier
Copy link
Member

@julianoes Could you do a quick SITL test? It looks good to me and it's easy enough to test after I fixed all the triggering logic in SITL.

@julianoes
Copy link
Contributor

No, I can't test it right now but I'm ok if it is merged.

@stale
Copy link

stale bot commented Jul 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@moreba1
Copy link
Contributor Author

moreba1 commented Aug 5, 2020

No, I can't test it right now but I'm ok if it is merged.

can you merge this commit ? i tested it.

Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

Ok thanks @moreba1, let's merge it once CI passed.

@stale stale bot removed the stale label Aug 5, 2020
@moreba1 moreba1 requested a review from julianoes December 3, 2020 18:19
@julianoes
Copy link
Contributor

Sorry, I wrote I would merge this but then I forgot about it.

I think the feature itself is now covered in Mission::inactivation:

Mission::on_inactivation()
{
// Disable camera trigger
vehicle_command_s cmd {};
cmd.command = vehicle_command_s::VEHICLE_CMD_DO_TRIGGER_CONTROL;
// Pause trigger
cmd.param1 = -1.0f;
cmd.param3 = 1.0f;
_navigator->publish_vehicle_cmd(&cmd);
_navigator->release_gimbal_control();
if (_navigator->get_precland()->is_activated()) {
_navigator->get_precland()->on_inactivation();
}
_time_mission_deactivated = hrt_absolute_time();
/* reset so current mission item gets restarted if mission was paused */
_work_item_type = WORK_ITEM_TYPE_DEFAULT;
}

I'll close this. If you disagree, let me know!

@julianoes julianoes closed this Dec 21, 2021
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.

4 participants