mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04: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:
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);
|
||||
|
Loading…
Reference in New Issue
Block a user