From ddfa4c0ed7a51ce764f8d45c85e75c6c2beb1466 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 13 Oct 2023 10:28:19 +1100 Subject: [PATCH] AP_OpenDroneID: only load from persistent memory in init() we do not want to do this from update() as it is an expensive call --- libraries/AP_OpenDroneID/AP_OpenDroneID.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp b/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp index cec2a300c3..6736b13e2c 100644 --- a/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp +++ b/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp @@ -131,9 +131,6 @@ void AP_OpenDroneID::set_basic_id() { if (pkt_basic_id.id_type != MAV_ODID_ID_TYPE_NONE) { return; } - if ((id_len == 0) && (_options & LockUASIDOnFirstBasicIDRx)) { - load_UAS_ID_from_persistent_memory(); - } if (id_len > 0) { // prepare basic id pkt uint8_t val = gcs().sysid_this_mav();