AP_Scripting: change some _INFO msgs to _CRITICAL/ERROR

This commit is contained in:
Tom Pittenger 2023-09-22 17:29:05 -07:00 committed by Tom Pittenger
parent d98a400d9e
commit b5e2f9aa0a
2 changed files with 4 additions and 4 deletions

View File

@ -317,7 +317,7 @@ void AP_Scripting::handle_mission_command(const AP_Mission::Mission_Command& cmd
mission_data = nullptr; mission_data = nullptr;
} }
if (mission_data == nullptr) { if (mission_data == nullptr) {
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Scripting: %s", "unable to receive mission command"); GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "Scripting: %s", "unable to receive mission command");
return; return;
} }
} }

View File

@ -240,7 +240,7 @@ void lua_scripts::load_all_scripts_in_dir(lua_State *L, const char *dirname) {
auto *d = AP::FS().opendir(dirname); auto *d = AP::FS().opendir(dirname);
if (d == nullptr) { if (d == nullptr) {
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Lua: open directory (%s) failed", dirname); GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "Lua: open directory (%s) failed", dirname);
return; return;
} }
@ -317,7 +317,7 @@ void lua_scripts::run_next_script(lua_State *L) {
// script has consumed an excessive amount of CPU time // script has consumed an excessive amount of CPU time
set_and_print_new_error_message(MAV_SEVERITY_CRITICAL, "%s exceeded time limit", script->name); set_and_print_new_error_message(MAV_SEVERITY_CRITICAL, "%s exceeded time limit", script->name);
} else { } else {
set_and_print_new_error_message(MAV_SEVERITY_INFO, "%s", lua_tostring(L, -1)); set_and_print_new_error_message(MAV_SEVERITY_CRITICAL, "%s", lua_tostring(L, -1));
} }
remove_script(L, script); remove_script(L, script);
lua_pop(L, 1); lua_pop(L, 1);
@ -452,7 +452,7 @@ void lua_scripts::run(void) {
bool succeeded_initial_load = false; bool succeeded_initial_load = false;
if (!_heap.available()) { if (!_heap.available()) {
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Lua: Unable to allocate a heap"); GCS_SEND_TEXT(MAV_SEVERITY_CRITICAL, "Lua: Unable to allocate a heap");
return; return;
} }