Browse Source

GCS_MAVLink: factor out a handle_common_param_message

master
Peter Barker 8 years ago committed by Francisco Ferreira
parent
commit
95ff94bfad
  1. 1
      libraries/GCS_MAVLink/GCS.h
  2. 4
      libraries/GCS_MAVLink/GCS_Common.cpp
  3. 9
      libraries/GCS_MAVLink/GCS_Param.cpp

1
libraries/GCS_MAVLink/GCS.h

@ -259,6 +259,7 @@ protected:
void handle_mission_write_partial_list(AP_Mission &mission, mavlink_message_t *msg); void handle_mission_write_partial_list(AP_Mission &mission, mavlink_message_t *msg);
bool handle_mission_item(mavlink_message_t *msg, AP_Mission &mission); 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_set(mavlink_message_t *msg, DataFlash_Class *DataFlash);
void handle_param_request_list(mavlink_message_t *msg); void handle_param_request_list(mavlink_message_t *msg);
void handle_param_request_read(mavlink_message_t *msg); void handle_param_request_read(mavlink_message_t *msg);

4
libraries/GCS_MAVLink/GCS_Common.cpp

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

9
libraries/GCS_MAVLink/GCS_Param.cpp

@ -436,3 +436,12 @@ void GCS_MAVLINK::send_parameter_reply(void)
reply.count, reply.count,
reply.param_index); 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;
}
}

Loading…
Cancel
Save