Skip to content

Commit

Permalink
AP_Scripting: change some _INFO msgs to _CRITICAL/ERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
magicrub committed Nov 22, 2023
1 parent d98a400 commit b5e2f9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libraries/AP_Scripting/AP_Scripting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void AP_Scripting::handle_mission_command(const AP_Mission::Mission_Command& cmd
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;
}
}
Expand Down
6 changes: 3 additions & 3 deletions libraries/AP_Scripting/lua_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void lua_scripts::load_all_scripts_in_dir(lua_State *L, const char *dirname) {

auto *d = AP::FS().opendir(dirname);
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;
}

Expand Down Expand Up @@ -317,7 +317,7 @@ void lua_scripts::run_next_script(lua_State *L) {
// script has consumed an excessive amount of CPU time
set_and_print_new_error_message(MAV_SEVERITY_CRITICAL, "%s exceeded time limit", script->name);
} 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);
lua_pop(L, 1);
Expand Down Expand Up @@ -452,7 +452,7 @@ void lua_scripts::run(void) {
bool succeeded_initial_load = false;

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;
}

Expand Down

0 comments on commit b5e2f9a

Please sign in to comment.