mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 10:47:35 +08:00
Mission: Replay gimbal cached items before reaching mission waypoint (#24085)
When flying patterns, photos are sometimes taken while the gimbal is pitching up or down. To address this, we orient the gimbal before reaching the mission waypoint, allowing more time to complete the action. Additionally, we verify if the vehicle is climbing to avoid orienting the gimbal while on the ground.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user