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:
Michael Schaeuble
2025-11-24 10:13:53 +01:00
committed by Beat Küng
parent 276cab8d3c
commit a2299b02c8
9 changed files with 155 additions and 3 deletions
+1
View File
@@ -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