mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-09 16:41:21 +08:00
AP_Scripting: call reset_all_aux_auths on start
This commit is contained in:
1 parent
7b3a6434de
commit
f72022f606
1 file changed
+5
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user