diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 5e88807bc8..e68353eabd 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -185,6 +185,10 @@ MavlinkReceiver::handle_message(mavlink_message_t *msg) handle_message_odometry(msg); break; + case MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN: + handle_message_set_gps_global_origin(msg); + break; + case MAVLINK_MSG_ID_RADIO_STATUS: handle_message_radio_status(msg); break; @@ -603,10 +607,6 @@ void MavlinkReceiver::handle_message_command_both(mavlink_message_t *msg, const send_ack = true; } - } else if (cmd_mavlink.command == MAV_CMD_DO_SET_GLOBAL_ORIGIN) { - _cmd_pub.publish(vehicle_command); - result = handle_request_message_command(MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN); - send_ack = false; } else if (cmd_mavlink.command == MAV_CMD_DO_AUTOTUNE_ENABLE) { bool has_module = true;