Copter: Give better error in opendroneid build when DID_ENABLE=0.

This commit is contained in:
shipp02 2024-04-22 18:08:57 -07:00 committed by Andrew Tridgell
parent 8318109546
commit dcc526ec19
1 changed files with 5 additions and 0 deletions

View File

@ -166,6 +166,11 @@ bool AP_OpenDroneID::pre_arm_check(char* failmsg, uint8_t failmsg_len)
return true; 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) { if (pkt_basic_id.id_type == MAV_ODID_ID_TYPE_NONE) {
strncpy(failmsg, "UA_TYPE required in BasicID", failmsg_len); strncpy(failmsg, "UA_TYPE required in BasicID", failmsg_len);
return false; return false;