mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-09 16:41:21 +08:00
AP_Scripting: mavlink: remove redundant Lua buffer usage
This commit is contained in:
1 parent
2b995b2087
commit
55a0cbbd9a
1 file changed
+1
-4
@@ -105,10 +105,7 @@ int lua_mavlink_receive_chan(lua_State *L) {
|
||||
}
|
||||
|
||||
if (rx_buffer->pop(msg)) {
|
||||
luaL_Buffer b;
|
||||
luaL_buffinit(L, &b);
|
||||
luaL_addlstring(&b, (char *)&msg.msg, sizeof(msg.msg));
|
||||
luaL_pushresult(&b);
|
||||
lua_pushlstring(L, (char *)&msg.msg, sizeof(msg.msg));
|
||||
lua_pushinteger(L, msg.chan);
|
||||
*new_uint32_t(L) = msg.timestamp_ms;
|
||||
return 3;
|
||||
|
||||
Reference in new issue
Block a user