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 peterbarker committed Sep 13, 2024
1 parent 09286e6 commit 56c1671
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/AP_OpenDroneID/AP_OpenDroneID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ bool AP_OpenDroneID::pre_arm_check(char* failmsg, uint8_t failmsg_len)
return true;
}

if(_enable == 0) {
strncpy(failmsg, "DID_ENABLE must be 1", failmsg_len);
return false;
}

if (pkt_basic_id.id_type == MAV_ODID_ID_TYPE_NONE) {
strncpy(failmsg, "UA_TYPE required in BasicID", failmsg_len);
return false;
Expand Down

0 comments on commit 56c1671

Please sign in to comment.