mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 17:50:34 +08:00
modes: make available modes user selectable with a registration option
Some modes should only be run within the context of a mode executor and the user should not be able to select them in the GCS. With this change, the external component registration request can be used to set if a mode is selectable or not.
This commit is contained in:
committed by
Beat Küng
parent
276cab8d3c
commit
a2299b02c8
@@ -232,6 +232,7 @@ void ModeManagement::checkNewRegistrations(UpdateRequest &update_request)
|
||||
static_assert(sizeof(request.name) == sizeof(reply.name), "size mismatch");
|
||||
memcpy(reply.name, request.name, sizeof(request.name));
|
||||
reply.request_id = request.request_id;
|
||||
reply.not_user_selectable = request.not_user_selectable;
|
||||
reply.px4_ros2_api_version = register_ext_component_request_s::LATEST_PX4_ROS2_API_VERSION;
|
||||
|
||||
// validate
|
||||
|
||||
Reference in New Issue
Block a user