diff --git a/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp b/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp index f43289d248380c..042ab23efb564e 100644 --- a/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp +++ b/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp @@ -132,7 +132,7 @@ void AP_OpenDroneID::set_basic_id() { if (pkt_basic_id.id_type != MAV_ODID_ID_TYPE_NONE) { return; } - if (id_len == 0) { + if ((id_len == 0) && (_options & LockUASIDOnFirstBasicIDRx)) { load_UAS_ID_from_persistent_memory(); } if (id_len > 0) {