MAVLink: Switch to HOME_POSITION message

This commit is contained in:
Lorenz Meier
2015-09-27 18:06:53 +02:00
parent 5c52efece4
commit afb68cb0ab
3 changed files with 40 additions and 14 deletions
+11
View File
@@ -309,6 +309,10 @@ MavlinkReceiver::handle_message_command_long(mavlink_message_t *msg)
} else if (cmd_mavlink.command == MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES) {
/* send autopilot version message */
_mavlink->send_autopilot_capabilites();
} else if (cmd_mavlink.command == MAV_CMD_GET_HOME_POSITION) {
_mavlink->configure_stream_threadsafe("HOME_POSITION", 0.5f);
} else {
if (msg->sysid == mavlink_system.sysid && msg->compid == mavlink_system.compid) {
@@ -365,6 +369,13 @@ MavlinkReceiver::handle_message_command_int(mavlink_message_t *msg)
/* terminate other threads and this thread */
_mavlink->_task_should_exit = true;
} else if (cmd_mavlink.command == MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES) {
/* send autopilot version message */
_mavlink->send_autopilot_capabilites();
} else if (cmd_mavlink.command == MAV_CMD_GET_HOME_POSITION) {
_mavlink->configure_stream_threadsafe("HOME_POSITION", 0.5f);
} else {
if (msg->sysid == mavlink_system.sysid && msg->compid == mavlink_system.compid) {