mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 06:13:34 +08:00
Navigator: Forward trigger distance commands
This commit is contained in:
@@ -103,6 +103,7 @@ MissionBlock::is_mission_item_reached()
|
||||
return false;
|
||||
|
||||
case NAV_CMD_DO_DIGICAM_CONTROL:
|
||||
case NAV_CMD_DO_SET_CAM_TRIGG_DIST:
|
||||
return true;
|
||||
|
||||
case NAV_CMD_DO_VTOL_TRANSITION:
|
||||
@@ -307,6 +308,7 @@ MissionBlock::item_contains_position(const struct mission_item_s *item)
|
||||
{
|
||||
// XXX: maybe extend that check onto item properties
|
||||
if (item->nav_cmd == NAV_CMD_DO_DIGICAM_CONTROL ||
|
||||
item->nav_cmd == NAV_CMD_DO_SET_CAM_TRIGG_DIST ||
|
||||
item->nav_cmd == NAV_CMD_DO_VTOL_TRANSITION ||
|
||||
item->nav_cmd == NAV_CMD_DO_SET_SERVO) {
|
||||
return false;
|
||||
|
||||
@@ -243,6 +243,7 @@ bool MissionFeasibilityChecker::checkMissionItemValidity(dm_item_t dm_current, s
|
||||
missionitem.nav_cmd != NAV_CMD_DO_JUMP &&
|
||||
missionitem.nav_cmd != NAV_CMD_DO_SET_SERVO &&
|
||||
missionitem.nav_cmd != NAV_CMD_DO_DIGICAM_CONTROL &&
|
||||
missionitem.nav_cmd != NAV_CMD_DO_SET_CAM_TRIGG_DIST &&
|
||||
missionitem.nav_cmd != NAV_CMD_DO_VTOL_TRANSITION) {
|
||||
|
||||
mavlink_log_critical(_mavlink_fd, "Rejecting mission item %i: unsupported action.", (int)(i+1));
|
||||
|
||||
@@ -65,6 +65,7 @@ enum NAV_CMD {
|
||||
NAV_CMD_DO_SET_SERVO=183,
|
||||
NAV_CMD_DO_REPEAT_SERVO=184,
|
||||
NAV_CMD_DO_DIGICAM_CONTROL=203,
|
||||
NAV_CMD_DO_SET_CAM_TRIGG_DIST=206,
|
||||
NAV_CMD_DO_VTOL_TRANSITION=3000,
|
||||
NAV_CMD_INVALID=UINT16_MAX /* ensure that casting a large number results in a specific error */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user