mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-21 20:53:52 +08:00
AP_Scripting: add basic print
This commit is contained in:
committed by
Andrew Tridgell
parent
020807a064
commit
a068569f8a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user