mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-02-08 12:12:36 +08:00
AP_Scripting: Send lua errors to the console before status_text
This helps SITL where we frequently panic about to long a statustext, which means a user never sees the intresting part unless they comment out the sanity check, or run on a real board.
This commit is contained in:
committed by
WickedShell
parent
56035fa5a1
commit
0e70eabdb9
@@ -184,8 +184,8 @@ void lua_scripts::run_next_script(lua_State *L) {
|
||||
gcs().send_text(MAV_SEVERITY_CRITICAL, "Lua: %s exceeded time limit (%d)", script->name, (int)vm_steps);
|
||||
remove_script(L, script);
|
||||
} else {
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Lua: %s", lua_tostring(L, -1));
|
||||
hal.console->printf("Lua: Error: %s\n", lua_tostring(L, -1));
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Lua: %s", lua_tostring(L, -1));
|
||||
remove_script(L, script);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
Reference in New Issue
Block a user