AP_Scripting: add basic print

This commit is contained in:
Iampete1
2023-10-04 18:34:08 +11:00
committed by Andrew Tridgell
parent 020807a064
commit a068569f8a
4 changed files with 17 additions and 0 deletions
+10
View File
@@ -759,4 +759,14 @@ int lua_get_current_ref()
return scripting->get_current_ref();
}
// Simple print to GCS or over CAN
int lua_print(lua_State *L) {
// Only support a single argument
binding_argcheck(L, 1);
GCS_SEND_TEXT(MAV_SEVERITY_DEBUG, "%s", luaL_checkstring(L, 1));
return 0;
}
#endif // AP_SCRIPTING_ENABLED