From b832dbaedd3b639ffa7b52e73efed9ebc105f72f Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Sat, 8 Feb 2025 13:19:02 -0600 Subject: [PATCH] AP_Scripting: mavlink: clearer error messages --- libraries/AP_Scripting/lua_bindings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Scripting/lua_bindings.cpp b/libraries/AP_Scripting/lua_bindings.cpp index 1c15d8ddaf..1fc7f76dee 100644 --- a/libraries/AP_Scripting/lua_bindings.cpp +++ b/libraries/AP_Scripting/lua_bindings.cpp @@ -101,7 +101,7 @@ int lua_mavlink_receive_chan(lua_State *L) { ObjectBuffer *rx_buffer = AP::scripting()->mavlink_data.rx_buffer; if (rx_buffer == nullptr) { - return luaL_error(L, "Never subscribed to a message"); + return luaL_error(L, "RX not initialized"); } if (rx_buffer->pop(msg)) { @@ -142,7 +142,7 @@ int lua_mavlink_register_rx_msgid(lua_State *L) { } if (i >= data.accept_msg_ids_size) { - return luaL_error(L, "Out of MAVLink ID's to monitor"); + return luaL_error(L, "no registrations free"); } {