Skip to content

Commit

Permalink
Copter: Give better error in opendroneid build when DID_ENABLE=0.
Browse files Browse the repository at this point in the history
  • Loading branch information
shipp02 authored and Aashay Shah committed Apr 23, 2024
1 parent 0eded27 commit 4df0a19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_OpenDroneID/AP_OpenDroneID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ void AP_OpenDroneID::get_persistent_params(ExpandingString &str) const
bool AP_OpenDroneID::pre_arm_check(char* failmsg, uint8_t failmsg_len)
{
WITH_SEMAPHORE(_sem);
if(_enable == 0) {
strncpy(failmsg, "DID_ENABLE must be 1", failmsg_len);
return false;
}

if (!option_enabled(Options::EnforceArming)) {
return true;
Expand Down

0 comments on commit 4df0a19

Please sign in to comment.