AP_Scripting: call reset_all_aux_auths on start

This commit is contained in:
Bob Long authored and Andrew Tridgell committed 2025-02-25 11:19:59 +11:00
1 parent 7b3a6434de
commit f72022f606
1 file changed
+5
+5
View File
@@ -20,6 +20,7 @@
#include <AP_Scripting/AP_Scripting.h>
#include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink/GCS.h>
#include <AP_Arming/AP_Arming.h>
#include "lua_scripts.h"
@@ -316,6 +317,10 @@ void AP_Scripting::thread(void) {
// clear data in serial buffers that the script wasn't ready to
// receive
_serialdevice.clear();
#endif
#if AP_ARMING_ENABLED && AP_ARMING_AUX_AUTH_ENABLED
// Clear any dangling pre-arms from previous script loads
AP_Arming::get_singleton()->reset_all_aux_auths();
#endif
// run won't return while scripting is still active
lua->run();