|
|
|
@ -1294,6 +1294,9 @@ void GCS_MAVLINK::packetReceived(const mavlink_status_t &status,
@@ -1294,6 +1294,9 @@ void GCS_MAVLINK::packetReceived(const mavlink_status_t &status,
|
|
|
|
|
// the routing code has indicated we should not handle this packet locally
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (msg.msgid == MAVLINK_MSG_ID_GLOBAL_POSITION_INT) { |
|
|
|
|
handle_mount_message(msg); |
|
|
|
|
} |
|
|
|
|
if (!accept_packet(status, msg)) { |
|
|
|
|
// e.g. enforce-sysid says we shouldn't look at this packet
|
|
|
|
|
return; |
|
|
|
@ -3628,6 +3631,9 @@ MAV_RESULT GCS_MAVLINK::handle_command_long_packet(const mavlink_command_long_t
@@ -3628,6 +3631,9 @@ MAV_RESULT GCS_MAVLINK::handle_command_long_packet(const mavlink_command_long_t
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
case MAV_CMD_DO_SET_ROI_SYSID: |
|
|
|
|
return handle_command_do_set_roi_sysid(packet); |
|
|
|
|
|
|
|
|
|
case MAV_CMD_DO_SET_ROI_LOCATION: |
|
|
|
|
case MAV_CMD_DO_SET_ROI: |
|
|
|
|
result = handle_command_do_set_roi(packet); |
|
|
|
@ -3835,6 +3841,27 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_do_set_home(const mavlink_command_int
@@ -3835,6 +3841,27 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_do_set_home(const mavlink_command_int
|
|
|
|
|
return MAV_RESULT_ACCEPTED; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MAV_RESULT GCS_MAVLINK::handle_command_do_set_roi_sysid(const uint8_t sysid) |
|
|
|
|
{ |
|
|
|
|
AP_Mount *mount = AP::mount(); |
|
|
|
|
if (mount == nullptr) { |
|
|
|
|
return MAV_RESULT_UNSUPPORTED; |
|
|
|
|
} |
|
|
|
|
mount->set_target_sysid(sysid); |
|
|
|
|
return MAV_RESULT_ACCEPTED; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MAV_RESULT GCS_MAVLINK::handle_command_do_set_roi_sysid(const mavlink_command_int_t &packet) |
|
|
|
|
{ |
|
|
|
|
return handle_command_do_set_roi_sysid((uint8_t)packet.param1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MAV_RESULT GCS_MAVLINK::handle_command_do_set_roi_sysid(const mavlink_command_long_t &packet) |
|
|
|
|
{ |
|
|
|
|
return handle_command_do_set_roi_sysid((uint8_t)packet.param1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MAV_RESULT GCS_MAVLINK::handle_command_do_set_roi(const mavlink_command_int_t &packet) |
|
|
|
|
{ |
|
|
|
|
// be aware that this method is called for both MAV_CMD_DO_SET_ROI
|
|
|
|
@ -3887,6 +3914,8 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_packet(const mavlink_command_int_t &p
@@ -3887,6 +3914,8 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_packet(const mavlink_command_int_t &p
|
|
|
|
|
case MAV_CMD_DO_SET_ROI: |
|
|
|
|
case MAV_CMD_DO_SET_ROI_LOCATION: |
|
|
|
|
return handle_command_do_set_roi(packet); |
|
|
|
|
case MAV_CMD_DO_SET_ROI_SYSID: |
|
|
|
|
return handle_command_do_set_roi_sysid(packet); |
|
|
|
|
case MAV_CMD_DO_SET_HOME: |
|
|
|
|
return handle_command_int_do_set_home(packet); |
|
|
|
|
default: |
|
|
|
|