Skip to content

Commit

Permalink
AP_Scripting: call reset_all_aux_auths on start
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 authored and tridge committed Feb 25, 2025
1 parent 7b3a643 commit f72022f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/AP_Scripting/AP_Scripting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit f72022f

Please sign in to comment.