mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
AP_Scripting: clear alocated i2c devices on scripting stop
This commit is contained in:
parent
207efe3b03
commit
6571a95120
@ -236,6 +236,13 @@ void AP_Scripting::thread(void) {
|
|||||||
}
|
}
|
||||||
delete lua;
|
delete lua;
|
||||||
|
|
||||||
|
// clear allocated i2c devices
|
||||||
|
for (uint8_t i=0; i<SCRIPTING_MAX_NUM_I2C_DEVICE; i++) {
|
||||||
|
delete _i2c_dev[i];
|
||||||
|
_i2c_dev[i] = nullptr;
|
||||||
|
}
|
||||||
|
num_i2c_devices = 0;
|
||||||
|
|
||||||
bool cleared = false;
|
bool cleared = false;
|
||||||
while(true) {
|
while(true) {
|
||||||
// 1hz check if we should restart
|
// 1hz check if we should restart
|
||||||
|
Loading…
Reference in New Issue
Block a user