Skip to content

Commit

Permalink
Adds target system and component ids to video commands to make Duocam…
Browse files Browse the repository at this point in the history
… receive them properly
  • Loading branch information
kpetrykin committed Aug 7, 2019
1 parent fd4955c commit 618d115
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/mavlink/mavlink_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,13 +594,17 @@ void MavlinkReceiver::handle_message_command_both(mavlink_message_t *msg, const
vcmd.timestamp = hrt_absolute_time();
vcmd.param2 = 2.0; // 1 - H264, 2 - raw TIFF sequence
vcmd.command = 2500;//vehicle_command_s::VEHICLE_CMD_VIDEO_START_CAPTURE;
vcmd.target_system = 1;
vcmd.target_component = MAV_COMP_ID_CAMERA;
orb_advertise_queue(ORB_ID(vehicle_command), &vcmd, vehicle_command_s::ORB_QUEUE_LENGTH);

} else if (cmd_mavlink.command == 2501) {
mavlink_log_info(&_mavlink_log_pub, "Video stop command received");
vehicle_command_s vcmd = {};
vcmd.timestamp = hrt_absolute_time();
vcmd.command = 2501;//vehicle_command_s::VEHICLE_CMD_VIDEO_START_CAPTURE;
vcmd.target_system = 1;
vcmd.target_component = MAV_COMP_ID_CAMERA;
orb_advertise_queue(ORB_ID(vehicle_command), &vcmd, vehicle_command_s::ORB_QUEUE_LENGTH);

} else if (cmd_mavlink.command == MAV_CMD_DO_CONTROL_VIDEO) {
Expand Down

0 comments on commit 618d115

Please sign in to comment.