Browse Source

ArduCopter: support MAVLINK_MSG_ID_MISSION_ITEM_INT

master
Michael Oborne 9 years ago committed by Andrew Tridgell
parent
commit
5848d8a5e6
  1. 11
      ArduCopter/GCS_Mavlink.cpp
  2. 1
      ArduCopter/capabilities.cpp

11
ArduCopter/GCS_Mavlink.cpp

@ -1070,9 +1070,18 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) @@ -1070,9 +1070,18 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
}
break;
}
case MAVLINK_MSG_ID_MISSION_ITEM_INT:
{
if (handle_mission_item(msg, copter.mission)) {
copter.DataFlash.Log_Write_EntireMission(copter.mission);
}
break;
}
// read an individual command from EEPROM and send it to the GCS
case MAVLINK_MSG_ID_MISSION_REQUEST: // MAV ID: 40
case MAVLINK_MSG_ID_MISSION_REQUEST_INT:
case MAVLINK_MSG_ID_MISSION_REQUEST: // MAV ID: 40, 51
{
handle_mission_request(copter.mission, msg);
break;

1
ArduCopter/capabilities.cpp

@ -6,6 +6,7 @@ void Copter::init_capabilities(void) @@ -6,6 +6,7 @@ void Copter::init_capabilities(void)
{
hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT);
hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT);
hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_MISSION_INT);
hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED);
hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT);
hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION);

Loading…
Cancel
Save