mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-04 06:58:39 -04:00
GCS_MAVLink: added handle_rc_bind()
This commit is contained in:
parent
ba60cce0c1
commit
792f3b8a15
@ -269,6 +269,7 @@ protected:
|
||||
void handle_log_message(mavlink_message_t *msg, DataFlash_Class &dataflash);
|
||||
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);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -1764,3 +1764,18 @@ uint8_t GCS_MAVLINK::handle_preflight_reboot(const mavlink_command_long_t &packe
|
||||
}
|
||||
return MAV_RESULT_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
handle a R/C bind request (for spektrum)
|
||||
*/
|
||||
uint8_t 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
|
||||
// right one
|
||||
if (!hal.rcin->rc_bind(packet.param2>0?packet.param2:packet.param1)) {
|
||||
return MAV_RESULT_FAILED;
|
||||
}
|
||||
return MAV_RESULT_ACCEPTED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user