Skip to content

Commit

Permalink
ArduPlane: support MAVLINK_MSG_ID_MISSION_ITEM_INT
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 authored and tridge committed Apr 30, 2016
1 parent 5848d8a commit cd56061
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ArduPlane/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1662,8 +1662,8 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
break;
}


// XXX read a WP from EEPROM and send it to the GCS
case MAVLINK_MSG_ID_MISSION_REQUEST_INT:
case MAVLINK_MSG_ID_MISSION_REQUEST:
{
handle_mission_request(plane.mission, msg);
Expand Down Expand Up @@ -1735,6 +1735,15 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
}
break;
}

// GCS has sent us a mission item, store to EEPROM
case MAVLINK_MSG_ID_MISSION_ITEM_INT:
{
if (handle_mission_item(msg, plane.mission)) {
plane.DataFlash.Log_Write_EntireMission(plane.mission);
}
break;
}

#if GEOFENCE_ENABLED == ENABLED
// receive a fence point from GCS and store in EEPROM
Expand Down
1 change: 1 addition & 0 deletions ArduPlane/capabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ void Plane::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_COMMAND_INT);
hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_MISSION_INT);
}

0 comments on commit cd56061

Please sign in to comment.