From 64e527f7839029ba3ce8bd70a5112fb647c0d822 Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Thu, 14 Sep 2023 17:18:49 +1000 Subject: [PATCH] AP_OpenDroneID: ensure Persistent memory is not read continuously --- libraries/AP_OpenDroneID/AP_OpenDroneID.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {