From 4a530ace9e252d461c04db087970eb43a592dbb6 Mon Sep 17 00:00:00 2001 From: benjinne Date: Tue, 5 Nov 2024 07:50:41 -0500 Subject: [PATCH] CRSF bind based on rc_type 1 --- src/drivers/rc/crsf_rc/CrsfRc.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/drivers/rc/crsf_rc/CrsfRc.cpp b/src/drivers/rc/crsf_rc/CrsfRc.cpp index ca6b9fea0afb..b68a7149ca29 100644 --- a/src/drivers/rc/crsf_rc/CrsfRc.cpp +++ b/src/drivers/rc/crsf_rc/CrsfRc.cpp @@ -195,9 +195,15 @@ void CrsfRc::Run() uint8_t cmd_ret = vehicle_command_ack_s::VEHICLE_CMD_RESULT_UNSUPPORTED; if (!_is_singlewire && !_armed) { - if (BindCRSF()) { - cmd_ret = vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED; + if ((int)vcmd.param1 == 1) { + // CRSF binding command + if (BindCRSF()) { + cmd_ret = vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED; + } } + + } else { + cmd_ret = vehicle_command_ack_s::VEHICLE_CMD_RESULT_TEMPORARILY_REJECTED; } // publish acknowledgement