mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-13 02:54:09 +08:00
AP_Scripting: Reduce the sleep time with no scripts
Lowering the sleep time when no scripts are pending, causes starting a REPL session to respond much faster (this cuts the latency from up to 10 seconds to 1 second before the session is ready to start). Also lowers the default scripting debug level to hide the statustext from users, as in the general case this is just a spammy message if it occurs, and we should be finding better reporting bits to get this to the user.
This commit is contained in:
committed by
WickedShell
parent
13f2320138
commit
d7a59bc449
@@ -368,8 +368,6 @@ void lua_scripts::run(void) {
|
||||
return;
|
||||
}
|
||||
lua_atpanic(L, atpanic);
|
||||
// luaL_openlibs(L);
|
||||
// load_lua_bindings(L);
|
||||
load_generated_bindings(L);
|
||||
|
||||
// Scan the filesystem in an appropriate manner and autostart scripts
|
||||
@@ -430,8 +428,10 @@ void lua_scripts::run(void) {
|
||||
lua_gc(L, LUA_GCCOLLECT, 0);
|
||||
|
||||
} else {
|
||||
gcs().send_text(MAV_SEVERITY_DEBUG, "Lua: No scripts to run");
|
||||
hal.scheduler->delay(10000);
|
||||
if (_debug_level > 0) {
|
||||
gcs().send_text(MAV_SEVERITY_DEBUG, "Lua: No scripts to run");
|
||||
}
|
||||
hal.scheduler->delay(1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user