diff --git a/libraries/AP_Scripting/AP_Scripting.cpp b/libraries/AP_Scripting/AP_Scripting.cpp index 85c2b6d864..df09b53c5e 100644 --- a/libraries/AP_Scripting/AP_Scripting.cpp +++ b/libraries/AP_Scripting/AP_Scripting.cpp @@ -236,6 +236,13 @@ void AP_Scripting::thread(void) { } delete lua; + // clear allocated i2c devices + for (uint8_t i=0; i