Skip to content

Commit

Permalink
crsf_rc: bind only if not singlewire and return success ack if uart w…
Browse files Browse the repository at this point in the history
…rite is successful
  • Loading branch information
benjinne committed Jun 18, 2024
1 parent 301f969 commit 17aa86a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/drivers/rc/crsf_rc/CrsfRc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 17aa86a

Please sign in to comment.