mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
ArduCopter: support for Mount following the lead vehicle in follow mode
This commit is contained in:
parent
d367483155
commit
edf9fbdb60
@ -20,6 +20,15 @@ bool ModeFollow::init(const bool ignore_checks)
|
|||||||
gcs().send_text(MAV_SEVERITY_WARNING, "Set FOLL_ENABLE = 1");
|
gcs().send_text(MAV_SEVERITY_WARNING, "Set FOLL_ENABLE = 1");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAL_MOUNT_ENABLED
|
||||||
|
AP_Mount *mount = AP_Mount::get_singleton();
|
||||||
|
// follow the lead vehicle using sysid
|
||||||
|
if (g2.follow.option_is_enabled(AP_Follow::Option::MOUNT_FOLLOW_ON_ENTER) && mount != nullptr) {
|
||||||
|
mount->set_target_sysid(g2.follow.get_target_sysid());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// re-use guided mode
|
// re-use guided mode
|
||||||
return ModeGuided::init(ignore_checks);
|
return ModeGuided::init(ignore_checks);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user