From 17aa86ac13040aa1dd141a93b11c188bd4ce5a8c Mon Sep 17 00:00:00 2001 From: benjinne Date: Tue, 18 Jun 2024 10:41:50 -0400 Subject: [PATCH] crsf_rc: bind only if not singlewire and return success ack if uart write is successful --- src/drivers/rc/crsf_rc/CrsfRc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/drivers/rc/crsf_rc/CrsfRc.cpp b/src/drivers/rc/crsf_rc/CrsfRc.cpp index 55d4406724d1..7740b1c191a4 100644 --- a/src/drivers/rc/crsf_rc/CrsfRc.cpp +++ b/src/drivers/rc/crsf_rc/CrsfRc.cpp @@ -194,9 +194,11 @@ void CrsfRc::Run() uint8_t cmd_ret = vehicle_command_ack_s::VEHICLE_CMD_RESULT_UNSUPPORTED; - if (!_armed) { - BindCRSF(); - cmd_ret = vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED; + if (!_is_singlewire && !_armed) { + if(BindCRSF()) + { + cmd_ret = vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED; + } } // publish acknowledgement