diff --git a/docs/en/camera/camera_architecture.md b/docs/en/camera/camera_architecture.md index 2919e2bb05..97b6c5ef9d 100644 --- a/docs/en/camera/camera_architecture.md +++ b/docs/en/camera/camera_architecture.md @@ -88,8 +88,8 @@ Commands supported in missions, including camera commands, are shown in these me - Mission items are executed when set active. - `issue_command(_mission_item)` is called at the end of this to send the current non-waypoint command - [`MissionBlock::issue_command(const mission_item_s &item)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/mission_block.cpp#L543-L562) - - Creates a vehicle command for the mission item then calls `publish_vehicle_cmd` to publish it (`_navigator->publish_vehicle_cmd(&vcmd);`) - - [`void Navigator::publish_vehicle_cmd(vehicle_command_s *vcmd)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358) + - Creates a vehicle command for the mission item then calls `publish_vehicle_command` to publish it (`_navigator->publish_vehicle_command(&vcmd);`) + - [`void Navigator::publish_vehicle_command(vehicle_command_s *vcmd)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358) - For some camera commands it sets the component ID to the camera component id (`vcmd->target_component = 100; // MAV_COMP_ID_CAMERA`) - All others just get published to default component ID. - The `VehicleCommand` UORB topic is published. diff --git a/docs/en/camera/mavlink_v2_camera.md b/docs/en/camera/mavlink_v2_camera.md index 525fd96d5f..95096e4252 100644 --- a/docs/en/camera/mavlink_v2_camera.md +++ b/docs/en/camera/mavlink_v2_camera.md @@ -83,10 +83,10 @@ void Mission::setActiveMissionItems() => https://github.com/PX4/PX4-Autopilot/bl Issuing command: MissionBlock::issue_command(const mission_item_s &item) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/mission_block.cpp#L543-L562 At end this publishes the current vehicle command - _navigator->publish_vehicle_cmd(&vcmd); + _navigator->publish_vehicle_command(&vcmd); Publishing command: -void Navigator::publish_vehicle_cmd(vehicle_command_s *vcmd) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358 +void Navigator::publish_vehicle_command(vehicle_command_s *vcmd) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358 For camera commands set to vcmd->target_component = 100; // MAV_COMP_ID_CAMERA All others just get published as-is --> diff --git a/docs/ko/camera/camera_architecture.md b/docs/ko/camera/camera_architecture.md index b14dc21913..a534948032 100644 --- a/docs/ko/camera/camera_architecture.md +++ b/docs/ko/camera/camera_architecture.md @@ -88,8 +88,8 @@ Commands supported in missions, including camera commands, are shown in these me - Mission items are executed when set active. - `issue_command(_mission_item)` is called at the end of this to send the current non-waypoint command - [`MissionBlock::issue_command(const mission_item_s &item)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/mission_block.cpp#L543-L562) - - Creates a vehicle command for the mission item then calls `publish_vehicle_cmd` to publish it (`_navigator->publish_vehicle_cmd(&vcmd);`) - - [`void Navigator::publish_vehicle_cmd(vehicle_command_s *vcmd)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358) + - Creates a vehicle command for the mission item then calls `publish_vehicle_command` to publish it (`_navigator->publish_vehicle_command(&vcmd);`) + - [`void Navigator::publish_vehicle_command(vehicle_command_s *vcmd)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358) - For some camera commands it sets the component ID to the camera component id (`vcmd->target_component = 100; // MAV_COMP_ID_CAMERA`) - All others just get published to default component ID. - The `VehicleCommand` UORB topic is published. diff --git a/docs/ko/camera/mavlink_v2_camera.md b/docs/ko/camera/mavlink_v2_camera.md index f288f885cc..ad27997a2f 100644 --- a/docs/ko/camera/mavlink_v2_camera.md +++ b/docs/ko/camera/mavlink_v2_camera.md @@ -83,10 +83,10 @@ void Mission::setActiveMissionItems() => https://github.com/PX4/PX4-Autopilot/bl Issuing command: MissionBlock::issue_command(const mission_item_s &item) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/mission_block.cpp#L543-L562 At end this publishes the current vehicle command - _navigator->publish_vehicle_cmd(&vcmd); + _navigator->publish_vehicle_command(&vcmd); Publishing command: -void Navigator::publish_vehicle_cmd(vehicle_command_s *vcmd) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358 +void Navigator::publish_vehicle_command(vehicle_command_s *vcmd) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358 For camera commands set to vcmd->target_component = 100; // MAV_COMP_ID_CAMERA All others just get published as-is --> diff --git a/docs/uk/camera/camera_architecture.md b/docs/uk/camera/camera_architecture.md index 7dc5adac68..49a4f602ca 100644 --- a/docs/uk/camera/camera_architecture.md +++ b/docs/uk/camera/camera_architecture.md @@ -88,8 +88,8 @@ PX4 повторно видає пункти камери, знайдені в - Предмети місії виконуються, коли вони активовані. - `issue_command(_mission_item)` викликається в кінці цього, щоб відправити поточну непунктову команду - [`MissionBlock::видача_команди(const mission_item_s &item)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/mission_block.cpp#L543-L562) - - Створює команду для місії транспортного засобу, а потім викликає `publish_vehicle_cmd` для публікації її (`_navigator->publish_vehicle_cmd(&vcmd);`) - - [`void Navigator::publish_vehicle_cmd(vehicle_command_s *vcmd)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358) + - Створює команду для місії транспортного засобу, а потім викликає `publish_vehicle_command` для публікації її (`_navigator->publish_vehicle_command(&vcmd);`) + - [`void Navigator::publish_vehicle_command(vehicle_command_s *vcmd)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358) - Для деяких команд камери це встановлює ідентифікатор компонента на ідентифікатор компонента камери (`vcmd->target_component = 100; // MAV_COMP_ID_CAMERA`) - Усі інші просто публікуються під стандартний компонент ID. - Тема UORB `VehicleCommand` публікується. diff --git a/docs/uk/camera/mavlink_v2_camera.md b/docs/uk/camera/mavlink_v2_camera.md index a127df0ac4..eefce0d573 100644 --- a/docs/uk/camera/mavlink_v2_camera.md +++ b/docs/uk/camera/mavlink_v2_camera.md @@ -83,10 +83,10 @@ void Mission::setActiveMissionItems() => https://github.com/PX4/PX4-Autopilot/bl Issuing command: MissionBlock::issue_command(const mission_item_s &item) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/mission_block.cpp#L543-L562 At end this publishes the current vehicle command - _navigator->publish_vehicle_cmd(&vcmd); + _navigator->publish_vehicle_command(&vcmd); Publishing command: -void Navigator::publish_vehicle_cmd(vehicle_command_s *vcmd) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358 +void Navigator::publish_vehicle_command(vehicle_command_s *vcmd) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358 For camera commands set to vcmd->target_component = 100; // MAV_COMP_ID_CAMERA All others just get published as-is --> diff --git a/docs/zh/camera/camera_architecture.md b/docs/zh/camera/camera_architecture.md index e628767723..e8ceee69e8 100644 --- a/docs/zh/camera/camera_architecture.md +++ b/docs/zh/camera/camera_architecture.md @@ -88,8 +88,8 @@ Commands supported in missions, including camera commands, are shown in these me - Mission items are executed when set active. - `issue_command(_mission_item)` is called at the end of this to send the current non-waypoint command - [`MissionBlock::issue_command(const mission_item_s &item)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/mission_block.cpp#L543-L562) - - Creates a vehicle command for the mission item then calls `publish_vehicle_cmd` to publish it (`_navigator->publish_vehicle_cmd(&vcmd);`) - - [`void Navigator::publish_vehicle_cmd(vehicle_command_s *vcmd)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358) + - Creates a vehicle command for the mission item then calls `publish_vehicle_command` to publish it (`_navigator->publish_vehicle_command(&vcmd);`) + - [`void Navigator::publish_vehicle_command(vehicle_command_s *vcmd)`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358) - For some camera commands it sets the component ID to the camera component id (`vcmd->target_component = 100; // MAV_COMP_ID_CAMERA`) - All others just get published to default component ID. - The `VehicleCommand` UORB topic is published. diff --git a/docs/zh/camera/mavlink_v2_camera.md b/docs/zh/camera/mavlink_v2_camera.md index 89a9f73f19..a2132bc664 100644 --- a/docs/zh/camera/mavlink_v2_camera.md +++ b/docs/zh/camera/mavlink_v2_camera.md @@ -83,10 +83,10 @@ void Mission::setActiveMissionItems() => https://github.com/PX4/PX4-Autopilot/bl Issuing command: MissionBlock::issue_command(const mission_item_s &item) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/mission_block.cpp#L543-L562 At end this publishes the current vehicle command - _navigator->publish_vehicle_cmd(&vcmd); + _navigator->publish_vehicle_command(&vcmd); Publishing command: -void Navigator::publish_vehicle_cmd(vehicle_command_s *vcmd) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358 +void Navigator::publish_vehicle_command(vehicle_command_s *vcmd) => https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/navigator/navigator_main.cpp#L1358 For camera commands set to vcmd->target_component = 100; // MAV_COMP_ID_CAMERA All others just get published as-is --> diff --git a/src/modules/navigator/land.cpp b/src/modules/navigator/land.cpp index 2c351ffa6e..8de99dd22c 100644 --- a/src/modules/navigator/land.cpp +++ b/src/modules/navigator/land.cpp @@ -120,6 +120,6 @@ Land::on_active() // and thus always climb MIS_LND_ABRT_ALT vcmd.param7 = _navigator->get_global_position()->alt + _navigator->get_landing_abort_min_alt(); - _navigator->publish_vehicle_cmd(&vcmd); + _navigator->publish_vehicle_command(&vcmd); } } diff --git a/src/modules/navigator/mission_base.cpp b/src/modules/navigator/mission_base.cpp index c24a791f8d..9cce7dffcc 100644 --- a/src/modules/navigator/mission_base.cpp +++ b/src/modules/navigator/mission_base.cpp @@ -924,7 +924,7 @@ MissionBase::do_abort_landing() vcmd.param6 = _mission_item.lon; vcmd.param7 = alt_sp; - _navigator->publish_vehicle_cmd(&vcmd); + _navigator->publish_vehicle_command(&vcmd); } void MissionBase::publish_navigator_mission_item() diff --git a/src/modules/navigator/mission_block.cpp b/src/modules/navigator/mission_block.cpp index 1b05628a6c..457efb41e0 100644 --- a/src/modules/navigator/mission_block.cpp +++ b/src/modules/navigator/mission_block.cpp @@ -549,7 +549,7 @@ MissionBlock::issue_command(const mission_item_s &item) } } - _navigator->publish_vehicle_cmd(&vcmd); + _navigator->publish_vehicle_command(&vcmd); if (item_has_timeout(item)) { _timestamp_command_timeout = hrt_absolute_time(); @@ -785,7 +785,7 @@ MissionBlock::set_land_item(struct mission_item_s *item) vcmd.command = NAV_CMD_DO_VTOL_TRANSITION; vcmd.param1 = vtol_vehicle_status_s::VEHICLE_VTOL_STATE_MC; vcmd.param2 = 0.0f; - _navigator->publish_vehicle_cmd(&vcmd); + _navigator->publish_vehicle_command(&vcmd); } /* set the land item */ diff --git a/src/modules/navigator/navigator.h b/src/modules/navigator/navigator.h index 5e30d22ccc..ac1de38a91 100644 --- a/src/modules/navigator/navigator.h +++ b/src/modules/navigator/navigator.h @@ -137,7 +137,7 @@ public: * * @param vcmd Vehicle command to execute */ - void publish_vehicle_cmd(vehicle_command_s *vcmd); + void publish_vehicle_command(vehicle_command_s *vcmd); #if CONFIG_NAVIGATOR_ADSB /** diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 34b4d2c00e..0a12405739 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -665,7 +665,7 @@ void Navigator::run() vehicle_command_s vcmd = {}; vcmd.command = vehicle_command_s::VEHICLE_CMD_MISSION_START; vcmd.param1 = _mission.get_land_start_index(); - publish_vehicle_cmd(&vcmd); + publish_vehicle_command(&vcmd); } else { PX4_WARN("planned mission landing not available"); @@ -867,7 +867,7 @@ void Navigator::run() vehicle_command_s vcmd = {}; vcmd.command = NAV_CMD_DO_VTOL_TRANSITION; vcmd.param1 = vtol_vehicle_status_s::VEHICLE_VTOL_STATE_MC; - publish_vehicle_cmd(&vcmd); + publish_vehicle_command(&vcmd); mavlink_log_info(&_mavlink_log_pub, "Transition to hover mode and descend.\t"); events::send(events::ID("navigator_transition_descend"), events::Log::Critical, "Transition to hover mode and descend"); @@ -1227,13 +1227,13 @@ void Navigator::take_traffic_conflict_action() case 2: { _rtl.set_return_alt_min(true); vcmd.command = vehicle_command_s::VEHICLE_CMD_NAV_RETURN_TO_LAUNCH; - publish_vehicle_cmd(&vcmd); + publish_vehicle_command(&vcmd); break; } case 3: { vcmd.command = vehicle_command_s::VEHICLE_CMD_NAV_LAND; - publish_vehicle_cmd(&vcmd); + publish_vehicle_command(&vcmd); break; } @@ -1241,7 +1241,7 @@ void Navigator::take_traffic_conflict_action() case 4: { vcmd.command = vehicle_command_s::VEHICLE_CMD_NAV_LOITER_UNLIM; - publish_vehicle_cmd(&vcmd); + publish_vehicle_command(&vcmd); break; } @@ -1392,7 +1392,7 @@ void Navigator::publish_navigator_status() } } -void Navigator::publish_vehicle_cmd(vehicle_command_s *vcmd) +void Navigator::publish_vehicle_command(vehicle_command_s *vcmd) { vcmd->timestamp = hrt_absolute_time(); vcmd->source_system = _vstatus.system_id; @@ -1537,7 +1537,7 @@ void Navigator::acquire_gimbal_control() vcmd.param2 = _vstatus.component_id; vcmd.param3 = -1.0f; // Leave unchanged. vcmd.param4 = -1.0f; // Leave unchanged. - publish_vehicle_cmd(&vcmd); + publish_vehicle_command(&vcmd); } void Navigator::release_gimbal_control() @@ -1548,7 +1548,7 @@ void Navigator::release_gimbal_control() vcmd.param2 = -3.0f; // Remove control if it had it. vcmd.param3 = -1.0f; // Leave unchanged. vcmd.param4 = -1.0f; // Leave unchanged. - publish_vehicle_cmd(&vcmd); + publish_vehicle_command(&vcmd); } @@ -1559,9 +1559,9 @@ Navigator::stop_capturing_images() vehicle_command_s vcmd = {}; vcmd.command = NAV_CMD_IMAGE_STOP_CAPTURE; vcmd.param1 = 0.0f; - publish_vehicle_cmd(&vcmd); + publish_vehicle_command(&vcmd); - // _is_capturing_images is reset inside publish_vehicle_cmd. + // _is_capturing_images is reset inside publish_vehicle_command. } } @@ -1612,7 +1612,7 @@ void Navigator::disable_camera_trigger() // Pause trigger cmd.param1 = -1.0f; cmd.param3 = 1.0f; - publish_vehicle_cmd(&cmd); + publish_vehicle_command(&cmd); } void Navigator::set_gimbal_neutral() @@ -1624,7 +1624,7 @@ void Navigator::set_gimbal_neutral() vcmd.param3 = NAN; vcmd.param4 = NAN; vcmd.param5 = gimbal_manager_set_attitude_s::GIMBAL_MANAGER_FLAGS_NEUTRAL; - publish_vehicle_cmd(&vcmd); + publish_vehicle_command(&vcmd); } void Navigator::sendWarningDescentStoppedDueToTerrain()