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

Mission: Replay gimbal cached items before reaching mission waypoint #24085

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/modules/navigator/mission_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,14 @@ MissionBase::on_active()
replayCachedCameraModeItems();
}

// Replay cached gimbal commands immediately upon mission resume, but only after the vehicle has reached the final target altitude
if (haveCachedGimbalItems() && _work_item_type != WorkItemType::WORK_ITEM_TYPE_CLIMB) {
replayCachedGimbalItems();
}

// Replay cached mission commands once the last mission waypoint is re-reached after the mission interruption.
// Each replay function also clears the cached items afterwards
if (_mission.current_seq > _mission_activation_index) {
// replay gimbal commands
if (haveCachedGimbalItems()) {
replayCachedGimbalItems();
}

// replay trigger commands
if (cameraWasTriggering()) {
replayCachedTriggerItems();
Expand Down
Loading