AP_Scripting: move location_update to Location and rename to offset_bearing

This commit is contained in:
Pierre Kancir authored and Peter Barker committed 2019-04-06 09:10:28 +11:00
1 parent 72e4e69add
commit 3e122c19f3
1 file changed
+2 -3
+2 -3
View File
@@ -1,6 +1,7 @@
#include <AP_Common/AP_Common.h>
#include <GCS_MAVLink/GCS.h>
#include <SRV_Channel/SRV_Channel.h>
#include <AP_Common/Location.h>
#include "lua_bindings.h"
@@ -230,9 +231,7 @@ static int location_project(lua_State *L) {
return luaL_argerror(L, args, "too many arguments");
}
location_update(*check_location(L, -3),
luaL_checknumber(L, -2),
luaL_checknumber(L, -1));
(*check_location(L, -3)).offset_bearing(luaL_checknumber(L, -2), luaL_checknumber(L, -1));
lua_pop(L, 2);