GCS_MAVLink: factor out a handle_common_param_message

This commit is contained in:
Peter Barker 2017-08-19 20:17:09 +10:00 committed by Francisco Ferreira
parent 85ac69f701
commit 95ff94bfad
3 changed files with 13 additions and 1 deletions

View File

@ -259,6 +259,7 @@ protected:
void handle_mission_write_partial_list(AP_Mission &mission, mavlink_message_t *msg);
bool handle_mission_item(mavlink_message_t *msg, AP_Mission &mission);
void handle_common_param_message(mavlink_message_t *msg);
void handle_param_set(mavlink_message_t *msg, DataFlash_Class *DataFlash);
void handle_param_request_list(mavlink_message_t *msg);
void handle_param_request_read(mavlink_message_t *msg);

View File

@ -1784,9 +1784,11 @@ void GCS_MAVLINK::handle_common_message(mavlink_message_t *msg)
case MAVLINK_MSG_ID_SETUP_SIGNING:
handle_setup_signing(msg);
break;
case MAVLINK_MSG_ID_PARAM_REQUEST_READ:
handle_param_request_read(msg);
handle_common_param_message(msg);
break;
case MAVLINK_MSG_ID_DEVICE_OP_READ:
handle_device_op_read(msg);
break;

View File

@ -436,3 +436,12 @@ void GCS_MAVLINK::send_parameter_reply(void)
reply.count,
reply.param_index);
}
void GCS_MAVLINK::handle_common_param_message(mavlink_message_t *msg)
{
switch (msg->msgid) {
case MAVLINK_MSG_ID_PARAM_REQUEST_READ:
handle_param_request_read(msg);
break;
}
}