GCS_MAVLink: move MAV_CMD_START_RX_PAIR handling to base class

This commit is contained in:
Peter Barker 2017-07-17 09:49:21 +10:00 committed by Francisco Ferreira
parent 73d994a834
commit a7e57aa3fc
2 changed files with 6 additions and 2 deletions

View File

@ -264,7 +264,7 @@ protected:
void handle_common_message(mavlink_message_t *msg);
void handle_setup_signing(const mavlink_message_t *msg);
uint8_t handle_preflight_reboot(const mavlink_command_long_t &packet, bool disable_overrides);
uint8_t handle_rc_bind(const mavlink_command_long_t &packet);
MAV_RESULT handle_rc_bind(const mavlink_command_long_t &packet);
void handle_device_op_read(mavlink_message_t *msg);
void handle_device_op_write(mavlink_message_t *msg);

View File

@ -1646,7 +1646,7 @@ uint8_t GCS_MAVLINK::handle_preflight_reboot(const mavlink_command_long_t &packe
/*
handle a R/C bind request (for spektrum)
*/
uint8_t GCS_MAVLINK::handle_rc_bind(const mavlink_command_long_t &packet)
MAV_RESULT GCS_MAVLINK::handle_rc_bind(const mavlink_command_long_t &packet)
{
// initiate bind procedure. We accept the DSM type from either
// param1 or param2 due to a past mixup with what parameter is the
@ -1841,6 +1841,10 @@ MAV_RESULT GCS_MAVLINK::handle_command_long_message(mavlink_command_long_t &pack
switch (packet.command) {
case MAV_CMD_START_RX_PAIR:
result = handle_rc_bind(packet);
break;
case MAV_CMD_DO_SET_SERVO:
/* fall through */
case MAV_CMD_DO_REPEAT_SERVO: